@@ -79,7 +79,7 @@ def even_page_footer(self):
79
79
"""|_Footer| object defining footer content for even pages.
80
80
81
81
The content of this footer definition is ignored unless the document setting
82
- :attr:`~Settings.odd_and_even_pages_header_footer` is set True.
82
+ :attr:`~. Settings.odd_and_even_pages_header_footer` is set True.
83
83
"""
84
84
return _Footer (self ._sectPr , self ._document_part , WD_HEADER_FOOTER .EVEN_PAGE )
85
85
@@ -88,7 +88,7 @@ def even_page_header(self):
88
88
"""|_Header| object defining header content for even pages.
89
89
90
90
The content of this header definition is ignored unless the document setting
91
- :attr:`~Settings.odd_and_even_pages_header_footer` is set True.
91
+ :attr:`~. Settings.odd_and_even_pages_header_footer` is set True.
92
92
"""
93
93
return _Header (self ._sectPr , self ._document_part , WD_HEADER_FOOTER .EVEN_PAGE )
94
94
@@ -106,7 +106,7 @@ def first_page_header(self):
106
106
"""|_Header| object defining header content for the first page of this section.
107
107
108
108
The content of this header definition is ignored unless the property
109
- :attr:`.different_first_page_header_header ` is set True.
109
+ :attr:`.different_first_page_header_footer ` is set True.
110
110
"""
111
111
return _Header (self ._sectPr , self ._document_part , WD_HEADER_FOOTER .FIRST_PAGE )
112
112
@@ -270,9 +270,9 @@ def __init__(self, sectPr, document_part, header_footer_index):
270
270
271
271
@property
272
272
def is_linked_to_previous (self ):
273
- """True if this header/footer uses the definition from the preceding section.
273
+ """`` True`` if this header/footer uses the definition from the prior section.
274
274
275
- False if this header/footer has an explicit definition.
275
+ `` False`` if this header/footer has an explicit definition.
276
276
277
277
Assigning ``True`` to this property removes the header/footer definition for
278
278
this section, causing it to "inherit" the corresponding definition of the prior
@@ -357,7 +357,14 @@ def _prior_headerfooter(self):
357
357
358
358
359
359
class _Footer (_BaseHeaderFooter ):
360
- """Page footer."""
360
+ """Page footer, used for all three types (default, even-page, and first-page).
361
+
362
+ Note that, like a document or table cell, a footer must contain a minimum of one
363
+ paragraph and a new or otherwise "empty" footer contains a single empty paragraph.
364
+ This first paragraph can be accessed as `footer.paragraphs[0]` for purposes of
365
+ adding content to it. Using :meth:`add_paragraph()` by itself to add content will
366
+ leave an empty paragraph above the newly added one.
367
+ """
361
368
362
369
def _add_definition (self ):
363
370
"""Return newly-added footer part."""
@@ -393,7 +400,14 @@ def _prior_headerfooter(self):
393
400
394
401
395
402
class _Header (_BaseHeaderFooter ):
396
- """Page header."""
403
+ """Page header, used for all three types (default, even-page, and first-page).
404
+
405
+ Note that, like a document or table cell, a header must contain a minimum of one
406
+ paragraph and a new or otherwise "empty" header contains a single empty paragraph.
407
+ This first paragraph can be accessed as `header.paragraphs[0]` for purposes of
408
+ adding content to it. Using :meth:`add_paragraph()` by itself to add content will
409
+ leave an empty paragraph above the newly added one.
410
+ """
397
411
398
412
def _add_definition (self ):
399
413
"""Return newly-added header part."""
0 commit comments