File tree Expand file tree Collapse file tree 4 files changed +42
-10
lines changed
Expand file tree Collapse file tree 4 files changed +42
-10
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,24 @@ formatting consistency thoroughout a document and across related documents
1010and allows formatting changes to be made globally by changing the definition
1111in the appropriate style.
1212
13- .. currentmodule :: docx.styles.style
13+
14+ |Styles | objects
15+ ----------------
16+
17+ .. currentmodule :: docx.styles.styles
18+
19+ .. autoclass :: Styles()
20+ :members:
21+ :inherited-members:
22+ :exclude-members:
23+ get_by_id, get_style_id, part
1424
1525
1626|BaseStyle | objects
1727-------------------
1828
29+ .. currentmodule :: docx.styles.style
30+
1931.. autoclass :: BaseStyle()
2032 :members:
2133 :inherited-members:
@@ -61,3 +73,25 @@ in the appropriate style.
6173
6274.. autoclass :: _NumberingStyle()
6375 :members:
76+
77+
78+ |LatentStyles | objects
79+ ----------------------
80+
81+ .. currentmodule :: docx.styles.latent
82+
83+ .. autoclass :: LatentStyles()
84+ :members:
85+ :inherited-members:
86+ :exclude-members:
87+ part
88+
89+
90+ |_LatentStyle | objects
91+ ----------------------
92+
93+ .. autoclass :: _LatentStyle()
94+ :members:
95+ :inherited-members:
96+ :exclude-members:
97+ part
Original file line number Diff line number Diff line change 149149
150150.. |str| replace:: :class:`.str`
151151
152- .. |Style| replace:: :class:`.Style`
153-
154152.. |Styles| replace:: :class:`.Styles`
155153
156154.. |StylesPart| replace:: :class:`.StylesPart`
Original file line number Diff line number Diff line change 3636 are accessed with the name exactly as it appears in the Word UI.
3737
3838The |Styles | object is also iterable. By using the identification properties
39- on |Style |, various subsets of the defined styles can be generated. For
39+ on |BaseStyle |, various subsets of the defined styles can be generated. For
4040example, this code will produce a list of the defined paragraph styles::
4141
4242 >>> from docx.enum.style import WD_STYLE_TYPE
@@ -56,7 +56,7 @@ Apply a style
5656-------------
5757
5858The |Paragraph |, |Run |, and |Table | objects each have a :attr: `style `
59- attribute. Assigning a | Style | object to this attribute applies that style::
59+ attribute. Assigning a style object to this attribute applies that style::
6060
6161 >>> document = Document()
6262 >>> paragraph = document.add_paragraph()
@@ -77,8 +77,8 @@ lookup for you::
7777 >>> paragraph.style.name
7878 'List Bullet'
7979
80- A style can also be applied at creation time using either the | Style | object
81- or its name::
80+ A style can also be applied at creation time using either the style object or
81+ its name::
8282
8383 >>> paragraph = document.add_paragraph(style='Body Text')
8484 >>> paragraph.style.name
Original file line number Diff line number Diff line change 1515
1616class Styles (ElementProxy ):
1717 """
18- A collection of |Style| objects defined in a document. Supports
19- `` len()``, iteration, and dictionary-style access by style id and style
20- UI name.
18+ A collection providing access to the styles defined in a document.
19+ Accessed using the :attr:`.Document.styles` property. Supports `` len()``,
20+ iteration, and dictionary-style access by style name.
2121 """
2222
2323 __slots__ = ()
You can’t perform that action at this time.
0 commit comments