Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1b7682

Browse files
committed
fix: small documentation fixes
1 parent 5001c62 commit c1b7682

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,4 @@
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}

docs/dev/analysis/features/styles/style.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ contents does not cause the `w:semiHidden` element to be removed.
182182
Candidate 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`.
243245
Candidate protocol
244246
~~~~~~~~~~~~~~~~~~
245247

248+
.. highlight:: python
249+
246250
::
247251

248252
>>> style = document.styles['Foo']
@@ -300,6 +304,8 @@ Behavior
300304
Candidate protocol
301305
~~~~~~~~~~~~~~~~~~
302306

307+
.. highlight:: python
308+
303309
::
304310

305311
>>> style = document.styles['Foo']
@@ -344,6 +350,8 @@ used when writing XML::
344350
Candidate protocols
345351
-------------------
346352

353+
.. highlight:: python
354+
347355
Identification::
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"/>

docs/dev/analysis/features/table/cell-merge.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Basic merge protocol
6060
A 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
::

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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))

docs/user/quickstart.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ the sequence::
132132
You can also add rows to a table incrementally like so::
133133

134134
row = table.add_row()
135-
135+
136136
This can be very handy for the variable length table scenario we mentioned
137137
above::
138138

@@ -282,14 +282,14 @@ Note that you can set bold or italic right on the result of ``.add_run()`` if
282282
you 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

294294
It's not necessary to provide text to the ``.add_paragraph()`` method. This can
295295
make 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

303303
Applying a character style
304304
--------------------------

docs/user/sections.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

104104
Page margins

0 commit comments

Comments
 (0)