File tree Expand file tree Collapse file tree 6 files changed +20
-12
lines changed
Expand file tree Collapse file tree 6 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 371371
372372
373373# Example configuration for intersphinx: refer to the Python standard library.
374- intersphinx_mapping = {'http://docs.python.org/' : None }
374+ intersphinx_mapping = {'http://docs.python.org/3/ ' : None }
Original file line number Diff line number Diff line change @@ -182,6 +182,8 @@ contents does not cause the `w:semiHidden` element to be removed.
182182Candidate protocol
183183~~~~~~~~~~~~~~~~~~
184184
185+ .. highlight :: python
186+
185187::
186188
187189 >>> style = document.styles['Foo']
@@ -243,6 +245,8 @@ will appear in the gallery in the order specified by `w:uiPriority`.
243245Candidate protocol
244246~~~~~~~~~~~~~~~~~~
245247
248+ .. highlight :: python
249+
246250::
247251
248252 >>> style = document.styles['Foo']
@@ -300,6 +304,8 @@ Behavior
300304Candidate protocol
301305~~~~~~~~~~~~~~~~~~
302306
307+ .. highlight :: python
308+
303309::
304310
305311 >>> style = document.styles['Foo']
@@ -344,6 +350,8 @@ used when writing XML::
344350Candidate protocols
345351-------------------
346352
353+ .. highlight :: python
354+
347355Identification::
348356
349357 >>> style = document.styles['Body Text']
@@ -385,7 +393,7 @@ Example XML
385393
386394 <w:styles>
387395
388- <!-- ... -->
396+ <!-- ... -->
389397
390398 <w:style w:type="paragraph" w:default="1" w:styleId="Normal">
391399 <w:name w:val="Normal"/>
Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ Basic merge protocol
6060A merge is specified using two diagonal cells::
6161
6262 >>> table = document.add_table(3, 3)
63- >>> a = table.cells (0, 0)
64- >>> b = table.cells (1, 1)
63+ >>> a = table.cell (0, 0)
64+ >>> b = table.cell (1, 1)
6565 >>> A = a.merge(b)
6666
6767::
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ Here's an example of what |docx| can do:
3131 p.add_run('italic.').italic = True
3232
3333 document.add_heading('Heading, level 1', level=1)
34- document.add_paragraph('Intense quote', style='IntenseQuote ')
34+ document.add_paragraph('Intense quote', style='Intense Quote ')
3535
3636 document.add_paragraph(
37- 'first item in unordered list', style='ListBullet '
37+ 'first item in unordered list', style='List Bullet '
3838 )
3939 document.add_paragraph(
40- 'first item in ordered list', style='ListNumber '
40+ 'first item in ordered list', style='List Number '
4141 )
4242
4343 document.add_picture('monty-truth.png', width=Inches(1.25))
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ the sequence::
132132You can also add rows to a table incrementally like so::
133133
134134 row = table.add_row()
135-
135+
136136This can be very handy for the variable length table scenario we mentioned
137137above::
138138
@@ -282,14 +282,14 @@ Note that you can set bold or italic right on the result of ``.add_run()`` if
282282you don't need it for anything else::
283283
284284 paragraph.add_run('dolor').bold = True
285-
285+
286286 # is equivalent to:
287287
288288 run = paragraph.add_run('dolor')
289289 run.bold = True
290290
291291 # except you don't have a reference to `run` afterward
292-
292+
293293
294294It's not necessary to provide text to the ``.add_paragraph() `` method. This can
295295make your code simpler if you're building the paragraph up from runs anyway::
@@ -298,7 +298,7 @@ make your code simpler if you're building the paragraph up from runs anyway::
298298 paragraph.add_run('Lorem ipsum ')
299299 paragraph.add_run('dolor').bold = True
300300 paragraph.add_run(' sit amet.')
301-
301+
302302
303303Applying a character style
304304--------------------------
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ from portrait to landscape::
9898 >>> section.page_width = new_width
9999 >>> section.page_height = new_height
100100 >>> section.orientation, section.page_width, section.page_height
101- (LANDSCAPE (1), 10058400, 7772400)
101+ (LANDSCAPE (1), 10058400, 7772400)
102102
103103
104104Page margins
You can’t perform that action at this time.
0 commit comments