Skip to content

Commit efc8678

Browse files
author
Steve Canny
committed
docs: fix screenshot layout anomaly
CSS on RTD.org must be different or something because screenshot on docs/index.rst was showing up teeny-tiny. Add some column width by adding width to left column of table the screenshot appears in.
1 parent 2252677 commit efc8678

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

docs/index.rst

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,48 @@ What it can do
1414

1515
Here's an example of what |docx| can do:
1616

17-
====== ======================================================================
18-
|img| ::
17+
============================================ ===============================================================
18+
|img| ::
1919

20-
from docx import Document
21-
from docx.shared import Inches
20+
from docx import Document
21+
from docx.shared import Inches
2222

23-
document = Document()
23+
document = Document()
2424

25-
document.add_heading('Document Title', 0)
25+
document.add_heading('Document Title', 0)
2626

27-
p = document.add_paragraph('A plain paragraph having some ')
28-
p.add_run('bold').bold = True
29-
p.add_run(' and some ')
30-
p.add_run('italic.').italic = True
27+
p = document.add_paragraph('A plain paragraph having some ')
28+
p.add_run('bold').bold = True
29+
p.add_run(' and some ')
30+
p.add_run('italic.').italic = True
3131

32-
document.add_heading('Heading, level 1', level=1)
33-
document.add_paragraph('Intense quote', style='IntenseQuote')
32+
document.add_heading('Heading, level 1', level=1)
33+
document.add_paragraph('Intense quote', style='IntenseQuote')
3434

35-
document.add_paragraph(
36-
'first item in unordered list', style='ListBullet'
37-
)
38-
document.add_paragraph(
39-
'first item in ordered list', style='ListNumber'
40-
)
35+
document.add_paragraph(
36+
'first item in unordered list', style='ListBullet'
37+
)
38+
document.add_paragraph(
39+
'first item in ordered list', style='ListNumber'
40+
)
4141

42-
document.add_picture('monty-truth.png', width=Inches(1.25))
42+
document.add_picture('monty-truth.png', width=Inches(1.25))
4343

44-
table = document.add_table(rows=1, cols=3)
45-
hdr_cells = table.rows[0].cells
46-
hdr_cells[0].text = 'Qty'
47-
hdr_cells[1].text = 'Id'
48-
hdr_cells[2].text = 'Desc'
49-
for item in recordset:
50-
row_cells = table.add_row().cells
51-
row_cells[0].text = str(item.qty)
52-
row_cells[1].text = str(item.id)
53-
row_cells[2].text = item.desc
44+
table = document.add_table(rows=1, cols=3)
45+
hdr_cells = table.rows[0].cells
46+
hdr_cells[0].text = 'Qty'
47+
hdr_cells[1].text = 'Id'
48+
hdr_cells[2].text = 'Desc'
49+
for item in recordset:
50+
row_cells = table.add_row().cells
51+
row_cells[0].text = str(item.qty)
52+
row_cells[1].text = str(item.id)
53+
row_cells[2].text = item.desc
5454

55-
document.add_page_break()
55+
document.add_page_break()
5656

57-
document.save('demo.docx')
58-
====== ======================================================================
57+
document.save('demo.docx')
58+
============================================ ===============================================================
5959

6060

6161
User Guide

0 commit comments

Comments
 (0)