Formatting
This commit is contained in:
@ -38,7 +38,7 @@ If you want more head
|
|||||||
|
|
||||||
Example showing basic header and footer
|
Example showing basic header and footer
|
||||||
|
|
||||||
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/8-header-footer.ts ":include")
|
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/8-header-footer.ts ':include')
|
||||||
|
|
||||||
_Source: https://github.com/dolanmiu/docx/blob/master/demo/8-header-footer.ts_
|
_Source: https://github.com/dolanmiu/docx/blob/master/demo/8-header-footer.ts_
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ All you need to do is create a `TableOfContents` object and assign it to the doc
|
|||||||
const toc = new TableOfContents("Summary", {
|
const toc = new TableOfContents("Summary", {
|
||||||
hyperlink: true,
|
hyperlink: true,
|
||||||
headingStyleRange: "1-5",
|
headingStyleRange: "1-5",
|
||||||
stylesWithLevels: [new StyleLevel("MySpectacularStyle", 1)]
|
stylesWithLevels: [new StyleLevel("MySpectacularStyle", 1)],
|
||||||
});
|
});
|
||||||
|
|
||||||
doc.addTableOfContents(toc);
|
doc.addTableOfContents(toc);
|
||||||
@ -27,8 +27,8 @@ doc.addTableOfContents(toc);
|
|||||||
Here is the list of all options that you can use to generate your tables of contents:
|
Here is the list of all options that you can use to generate your tables of contents:
|
||||||
|
|
||||||
| Option | Type | TOC Field Switch | Description |
|
| Option | Type | TOC Field Switch | Description |
|
||||||
| --- | --- | --- | --- |
|
| ------------------------------- | ------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|captionLabel|string|`\a`|Includes captioned items, but omits caption labels and numbers. The identifier designated by `text` in this switch's field-argument corresponds to the caption label. Use ``\c`` to build a table of captions with labels and numbers.|
|
| captionLabel | string | `\a` | Includes captioned items, but omits caption labels and numbers. The identifier designated by `text` in this switch's field-argument corresponds to the caption label. Use `\c` to build a table of captions with labels and numbers. |
|
||||||
| entriesFromBookmark | string | `\b` | Includes entries only from the portion of the document marked by the bookmark named by `text` in this switch's field-argument. |
|
| entriesFromBookmark | string | `\b` | Includes entries only from the portion of the document marked by the bookmark named by `text` in this switch's field-argument. |
|
||||||
| captionLabelIncludingNumbers | string | `\c` | Includes figures, tables, charts, and other items that are numbered by a SEQ field (§17.16.5.56). The sequence identifier designated by `text` in this switch's field-argument, which corresponds to the caption label, shall match the identifier in the corresponding SEQ field. |
|
| captionLabelIncludingNumbers | string | `\c` | Includes figures, tables, charts, and other items that are numbered by a SEQ field (§17.16.5.56). The sequence identifier designated by `text` in this switch's field-argument, which corresponds to the caption label, shall match the identifier in the corresponding SEQ field. |
|
||||||
| sequenceAndPageNumbersSeparator | string | `\d` | When used with `\s`, the `text` in this switch's field-argument defines the separator between sequence and page numbers. The default separator is a hyphen (-). |
|
| sequenceAndPageNumbersSeparator | string | `\d` | When used with `\s`, the `text` in this switch's field-argument defines the separator between sequence and page numbers. The default separator is a hyphen (-). |
|
||||||
@ -53,7 +53,7 @@ Here is the list of all options that you can use to generate your tables of cont
|
|||||||
const toc = new TableOfContents("Summary", {
|
const toc = new TableOfContents("Summary", {
|
||||||
hyperlink: true,
|
hyperlink: true,
|
||||||
headingStyleRange: "1-5",
|
headingStyleRange: "1-5",
|
||||||
stylesWithLevels: [new StyleLevel("MySpectacularStyle", 1)]
|
stylesWithLevels: [new StyleLevel("MySpectacularStyle", 1)],
|
||||||
});
|
});
|
||||||
|
|
||||||
doc.addTableOfContents(toc);
|
doc.addTableOfContents(toc);
|
||||||
|
Reference in New Issue
Block a user