Question:
Following this tutorial, https://docx.js.org/#/usage/table-of-contents, I would like to do the following two things:
- Change the font & size of entries in the table as the default
Times New Roman - 10is too small. - Remove the "leading dots" from entries to page numbers:
a.......1toa 1
What I tried (with no success):
All my entries are based on
Heading1so their level is 1.stylesWithLevels: [new StyleLevel("Style", 1)]. This produces no change whatsoever.entryAndPageNumberSeparator: "\t"gives leading dots (a.......1), whileentryAndPageNumberSeparator: " "givesa 1. I tried other combinations likeentryAndPageNumberSeparator: " \t"to no avail. It seems like only the first character is taken into consideration.
Both of these were tested individually with a working TOC (modified from the above tutorial):
new TableOfContents("Example", {
hyperlink: true,
headingStyleRange: "1-1",
}),