fix: no letter headings in the exported INDEX field
The \h "A" switch made Word insert an alphabet heading between the index entries on field update — a row the editor's index never draws.
This commit is contained in:
1 parent
e752b4ca10
commit
1660e07873
1 file changed
+3
-2
@@ -2224,8 +2224,9 @@ function blocksToDocx(content: TiptapNode[], num: Numbering, contentWidthCm: num
|
||||
if (tocTitle) out.push(new Paragraph({ children: [new TextRun({ text: tocTitle, bold: true, size: 32 })], spacing: { after: cmToTwip(0.3) } }));
|
||||
if (kind === 'alphabetical') {
|
||||
// Word's INDEX field, which it fills from the XE entries on a field update —
|
||||
// the same contract the TOC field above works under.
|
||||
out.push(new Paragraph({ children: [new SimpleField('INDEX \\h "A" \\c "1" \\e "\t"')] }));
|
||||
// the same contract the TOC field above works under. No \h: a letter heading
|
||||
// between the entries is a row the editor's index never draws.
|
||||
out.push(new Paragraph({ children: [new SimpleField('INDEX \\c "1" \\e "\t"')] }));
|
||||
continue;
|
||||
}
|
||||
if (kind === 'bibliography') {
|
||||
|
||||
Reference in new issue
Block a user