Fix transcript DOCX line numbering (invalid 'eachPage' value)
- Replace invalid 'eachPage' with valid 'newPage' for w:lnNumType restart attribute - This ensures Word starts line numbering at 1 on the first page
This commit is contained in:
@@ -335,8 +335,8 @@ def _enable_line_numbering(section, start_at=1, count_by=1, restart=True):
|
|||||||
lnNumType.set(qn("w:start"), str(start_at))
|
lnNumType.set(qn("w:start"), str(start_at))
|
||||||
lnNumType.set(qn("w:countBy"), str(count_by))
|
lnNumType.set(qn("w:countBy"), str(count_by))
|
||||||
|
|
||||||
# 'eachPage' restarts numbering on every page; 'continuous' keeps it going
|
# 'newPage' restarts numbering on every page; 'continuous' keeps it going
|
||||||
restart_mode = "eachPage" if restart else "continuous"
|
restart_mode = "newPage" if restart else "continuous"
|
||||||
lnNumType.set(qn("w:restart"), restart_mode)
|
lnNumType.set(qn("w:restart"), restart_mode)
|
||||||
|
|
||||||
sectPr.append(lnNumType)
|
sectPr.append(lnNumType)
|
||||||
|
|||||||
Reference in New Issue
Block a user