postext 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/design/imageAltText.test.js +1 -2
- package/dist/__tests__/design/imageAltText.test.js.map +1 -1
- package/dist/__tests__/design/titleTextMarks.test.d.ts +2 -0
- package/dist/__tests__/design/titleTextMarks.test.d.ts.map +1 -0
- package/dist/__tests__/design/titleTextMarks.test.js +67 -0
- package/dist/__tests__/design/titleTextMarks.test.js.map +1 -0
- package/dist/__tests__/exports.test.js +7 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js.map +1 -1
- package/dist/__tests__/parse/citations.test.js +33 -2
- package/dist/__tests__/parse/citations.test.js.map +1 -1
- package/dist/__tests__/pipeline/bibliographyNumbering.test.d.ts +2 -0
- package/dist/__tests__/pipeline/bibliographyNumbering.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/bibliographyNumbering.test.js +100 -0
- package/dist/__tests__/pipeline/bibliographyNumbering.test.js.map +1 -0
- package/dist/__tests__/pipeline/citationAffixesCaptions.test.d.ts +2 -0
- package/dist/__tests__/pipeline/citationAffixesCaptions.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/citationAffixesCaptions.test.js +156 -0
- package/dist/__tests__/pipeline/citationAffixesCaptions.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingBoxSingleColumn.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingBoxSingleColumn.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingBoxSingleColumn.test.js +58 -0
- package/dist/__tests__/pipeline/closingBoxSingleColumn.test.js.map +1 -0
- package/dist/__tests__/pipeline/footnoteSymbols.test.d.ts +2 -0
- package/dist/__tests__/pipeline/footnoteSymbols.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/footnoteSymbols.test.js +96 -0
- package/dist/__tests__/pipeline/footnoteSymbols.test.js.map +1 -0
- package/dist/__tests__/pipeline/inlineRefRender.test.js +18 -0
- package/dist/__tests__/pipeline/inlineRefRender.test.js.map +1 -1
- package/dist/__tests__/pipeline/inlineSpanEmbed.test.d.ts +2 -0
- package/dist/__tests__/pipeline/inlineSpanEmbed.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/inlineSpanEmbed.test.js +67 -0
- package/dist/__tests__/pipeline/inlineSpanEmbed.test.js.map +1 -0
- package/dist/__tests__/pipeline/snippetMath.test.d.ts +2 -0
- package/dist/__tests__/pipeline/snippetMath.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/snippetMath.test.js +113 -0
- package/dist/__tests__/pipeline/snippetMath.test.js.map +1 -0
- package/dist/__tests__/pipeline/spanHeadingMidPage.test.d.ts +2 -0
- package/dist/__tests__/pipeline/spanHeadingMidPage.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/spanHeadingMidPage.test.js +94 -0
- package/dist/__tests__/pipeline/spanHeadingMidPage.test.js.map +1 -0
- package/dist/__tests__/pipeline/statementNumbering.test.d.ts +2 -0
- package/dist/__tests__/pipeline/statementNumbering.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/statementNumbering.test.js +217 -0
- package/dist/__tests__/pipeline/statementNumbering.test.js.map +1 -0
- package/dist/bundle/book.js +1 -1
- package/dist/bundle/book.js.map +1 -1
- package/dist/canvas-backend/blockRender.d.ts +4 -1
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +3 -1
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +8 -0
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/citations/bibtex.d.ts +7 -1
- package/dist/citations/bibtex.d.ts.map +1 -1
- package/dist/citations/bibtex.js +14 -1
- package/dist/citations/bibtex.js.map +1 -1
- package/dist/citations/context.d.ts +26 -2
- package/dist/citations/context.d.ts.map +1 -1
- package/dist/citations/context.js +81 -8
- package/dist/citations/context.js.map +1 -1
- package/dist/citations/data.d.ts.map +1 -1
- package/dist/citations/data.js +3 -1
- package/dist/citations/data.js.map +1 -1
- package/dist/configWarnings.d.ts.map +1 -1
- package/dist/configWarnings.js +6 -3
- package/dist/configWarnings.js.map +1 -1
- package/dist/defaults/calloutStyles.d.ts.map +1 -1
- package/dist/defaults/calloutStyles.js +22 -0
- package/dist/defaults/calloutStyles.js.map +1 -1
- package/dist/defaults/citations.d.ts.map +1 -1
- package/dist/defaults/citations.js +4 -0
- package/dist/defaults/citations.js.map +1 -1
- package/dist/defaults/footnotes.d.ts +5 -1
- package/dist/defaults/footnotes.d.ts.map +1 -1
- package/dist/defaults/footnotes.js +38 -4
- package/dist/defaults/footnotes.js.map +1 -1
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +9 -0
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +1 -1
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +1 -1
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/math.d.ts +3 -1
- package/dist/defaults/math.d.ts.map +1 -1
- package/dist/defaults/math.js +42 -1
- package/dist/defaults/math.js.map +1 -1
- package/dist/design/layout.d.ts +2 -2
- package/dist/design/layout.d.ts.map +1 -1
- package/dist/design/layout.js +6 -3
- package/dist/design/layout.js.map +1 -1
- package/dist/design/placeholders.d.ts +10 -1
- package/dist/design/placeholders.d.ts.map +1 -1
- package/dist/design/placeholders.js +7 -2
- package/dist/design/placeholders.js.map +1 -1
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +10 -1
- package/dist/html-backend.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +3 -2
- package/dist/parse/blockParser.js.map +1 -1
- package/dist/parse/citations.d.ts +16 -1
- package/dist/parse/citations.d.ts.map +1 -1
- package/dist/parse/citations.js +39 -3
- package/dist/parse/citations.js.map +1 -1
- package/dist/parse/equationLabels.d.ts +16 -0
- package/dist/parse/equationLabels.d.ts.map +1 -0
- package/dist/parse/equationLabels.js +44 -0
- package/dist/parse/equationLabels.js.map +1 -0
- package/dist/parse/index.d.ts +1 -1
- package/dist/parse/index.d.ts.map +1 -1
- package/dist/parse/index.js +1 -1
- package/dist/parse/index.js.map +1 -1
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +59 -8
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/inlineMath.d.ts +6 -1
- package/dist/parse/inlineMath.d.ts.map +1 -1
- package/dist/parse/inlineMath.js +24 -1
- package/dist/parse/inlineMath.js.map +1 -1
- package/dist/parse/inlineSnippet.d.ts +26 -5
- package/dist/parse/inlineSnippet.d.ts.map +1 -1
- package/dist/parse/inlineSnippet.js +36 -7
- package/dist/parse/inlineSnippet.js.map +1 -1
- package/dist/parse/sourceMapping.d.ts.map +1 -1
- package/dist/parse/sourceMapping.js +24 -6
- package/dist/parse/sourceMapping.js.map +1 -1
- package/dist/parse/types.d.ts +4 -0
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/anchors.d.ts.map +1 -1
- package/dist/pipeline/anchors.js +6 -0
- package/dist/pipeline/anchors.js.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +119 -22
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildMeasurement.d.ts +3 -0
- package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
- package/dist/pipeline/buildMeasurement.js +1 -0
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/citations.d.ts +20 -1
- package/dist/pipeline/citations.d.ts.map +1 -1
- package/dist/pipeline/citations.js +179 -42
- package/dist/pipeline/citations.js.map +1 -1
- package/dist/pipeline/columnBalancing.d.ts.map +1 -1
- package/dist/pipeline/columnBalancing.js +6 -1
- package/dist/pipeline/columnBalancing.js.map +1 -1
- package/dist/pipeline/continuation.d.ts.map +1 -1
- package/dist/pipeline/continuation.js +8 -1
- package/dist/pipeline/continuation.js.map +1 -1
- package/dist/pipeline/crossRefs.d.ts +3 -0
- package/dist/pipeline/crossRefs.d.ts.map +1 -1
- package/dist/pipeline/crossRefs.js +21 -1
- package/dist/pipeline/crossRefs.js.map +1 -1
- package/dist/pipeline/footnotes.d.ts +23 -5
- package/dist/pipeline/footnotes.d.ts.map +1 -1
- package/dist/pipeline/footnotes.js +23 -2
- package/dist/pipeline/footnotes.js.map +1 -1
- package/dist/pipeline/headerFooter.d.ts.map +1 -1
- package/dist/pipeline/headerFooter.js +26 -12
- package/dist/pipeline/headerFooter.js.map +1 -1
- package/dist/pipeline/measureContentBlock.d.ts +3 -0
- package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/measureContentBlock.js +8 -1
- package/dist/pipeline/measureContentBlock.js.map +1 -1
- package/dist/pipeline/outline.d.ts +6 -2
- package/dist/pipeline/outline.d.ts.map +1 -1
- package/dist/pipeline/outline.js +20 -3
- package/dist/pipeline/outline.js.map +1 -1
- package/dist/pipeline/placement.d.ts +12 -0
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +51 -0
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +11 -1
- package/dist/pipeline/resourceLayout.d.ts.map +1 -1
- package/dist/pipeline/resourceLayout.js +28 -8
- package/dist/pipeline/resourceLayout.js.map +1 -1
- package/dist/pipeline/resourceNumbering.d.ts +7 -1
- package/dist/pipeline/resourceNumbering.d.ts.map +1 -1
- package/dist/pipeline/resourceNumbering.js +12 -0
- package/dist/pipeline/resourceNumbering.js.map +1 -1
- package/dist/pipeline/spanEmbeds.d.ts +32 -0
- package/dist/pipeline/spanEmbeds.d.ts.map +1 -0
- package/dist/pipeline/spanEmbeds.js +94 -0
- package/dist/pipeline/spanEmbeds.js.map +1 -0
- package/dist/pipeline/statementNumbering.d.ts +93 -0
- package/dist/pipeline/statementNumbering.d.ts.map +1 -0
- package/dist/pipeline/statementNumbering.js +360 -0
- package/dist/pipeline/statementNumbering.js.map +1 -0
- package/dist/react/createLayout.d.ts.map +1 -1
- package/dist/react/createLayout.js +2 -1
- package/dist/react/createLayout.js.map +1 -1
- package/dist/types.d.ts +155 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/worker/layout.worker.js +6 -3
- package/dist/worker/layout.worker.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -259,7 +259,8 @@ export interface TableCell {
|
|
|
259
259
|
/** Cell content (plain text / inline markdown). A newline, or `\\` as in
|
|
260
260
|
* captions and notes, starts a new paragraph. A paragraph of ordinary
|
|
261
261
|
* spaces sets nothing; one holding a no-break space (U+00A0) sets a line.
|
|
262
|
-
*
|
|
262
|
+
* `$…$` is an inline formula, read by Pandoc's rule (#541), and `\$`
|
|
263
|
+
* prints a dollar sign. */
|
|
263
264
|
content: string;
|
|
264
265
|
/** Optional image drawn inside the cell, above the content. */
|
|
265
266
|
image?: TableCellImage;
|
|
@@ -516,6 +517,11 @@ export interface OutlineEntry {
|
|
|
516
517
|
/** The page-number format of the entry's page, once laid out (an index
|
|
517
518
|
* merges consecutive pages of one format into a range). */
|
|
518
519
|
pageFormat?: string;
|
|
520
|
+
/** What a reference to a counted anchor prints by default (#530): a
|
|
521
|
+
* labelled equation's number in its `format` ("(3)", what `\eqref`
|
|
522
|
+
* prints), a numbered statement's label and number ("Theorem 2").
|
|
523
|
+
* `number` holds the bare number. Absent on every other entry. */
|
|
524
|
+
numberLabel?: string;
|
|
519
525
|
}
|
|
520
526
|
/** Heading counters (1-indexed by level) in effect at a point in a document. */
|
|
521
527
|
export interface HeadingCounters {
|
|
@@ -592,6 +598,15 @@ export interface LayoutContinuation {
|
|
|
592
598
|
* last chapter. It only feeds running heads and design text, never the
|
|
593
599
|
* page breaks, so a host can take it from a layout of the same book. */
|
|
594
600
|
bookPageCount?: number;
|
|
601
|
+
/** The counters of labelled equations and numbered statements at the
|
|
602
|
+
* end of the preceding content (#530), by counter name — `'equation'`
|
|
603
|
+
* for the equations (`math.equationNumbering`), a callout style's
|
|
604
|
+
* `numbering.counter` for its statements — each with the heading
|
|
605
|
+
* counters of its last count, which decide `resetOn`. */
|
|
606
|
+
statementCounters?: Record<string, {
|
|
607
|
+
counter: number;
|
|
608
|
+
heading: HeadingCounters;
|
|
609
|
+
}>;
|
|
595
610
|
}
|
|
596
611
|
/** A part (section) as the running heads see it: number and title as
|
|
597
612
|
* written on the fence, plus the colour-palette entries the fence
|
|
@@ -2199,6 +2214,62 @@ export interface CalloutStyleConfig {
|
|
|
2199
2214
|
continuesMarkerAlign?: CalloutMarkerTextAlign;
|
|
2200
2215
|
/** Set the marker in italics. Default `true`. */
|
|
2201
2216
|
continuesMarkerItalic?: boolean;
|
|
2217
|
+
/** Count the boxes of this style as numbered statements — theorems,
|
|
2218
|
+
* lemmas, definitions (#530): each prints its label and number
|
|
2219
|
+
* ("Theorem 2."), and a reference to the fence's `{#id}` prints them
|
|
2220
|
+
* too. Unset: the boxes are not counted. */
|
|
2221
|
+
numbering?: CalloutNumberingConfig;
|
|
2222
|
+
/** A mark set flush right at the end of the box's last line, as
|
|
2223
|
+
* amsthm's `\qed` ends a proof: `'∎'` or `'□'`. It goes on the last
|
|
2224
|
+
* line when there is room for it after a space, else on a line of its
|
|
2225
|
+
* own. Default `''` (none). */
|
|
2226
|
+
endMark?: string;
|
|
2227
|
+
}
|
|
2228
|
+
/** How the boxes of a callout style are counted (#530): the counter they
|
|
2229
|
+
* advance, how its number is written and where the label goes. */
|
|
2230
|
+
export interface CalloutNumberingConfig {
|
|
2231
|
+
/** The word before the number: `'Theorem'`, `'Lemma'`, `'Definition'`. */
|
|
2232
|
+
label: string;
|
|
2233
|
+
/** The counter the boxes advance. Styles that name one counter share
|
|
2234
|
+
* it, as amsthm's `\newtheorem{lemma}[theorem]` does: Lemma 1, then
|
|
2235
|
+
* Theorem 2. `'equation'` counts with the labelled equations. `false`
|
|
2236
|
+
* prints the label with no number ("Proof."). Default: the style's id. */
|
|
2237
|
+
counter?: string | false;
|
|
2238
|
+
/** Template of the number: `{n}` (the counter) and `{h1}`..`{h6}`
|
|
2239
|
+
* (heading numbers), as a resource type's. Default `'{n}'`;
|
|
2240
|
+
* `'{h1}.{n}'` numbers by chapter (with `resetOn: 'h1'`). */
|
|
2241
|
+
numberingTemplate?: string;
|
|
2242
|
+
/** When the counter starts again at 1. Default `'never'`. */
|
|
2243
|
+
resetOn?: ResourceCounterReset;
|
|
2244
|
+
/** How `{n}` is written. Default `'decimal'`. */
|
|
2245
|
+
counterFormat?: ResourceCounterFormat;
|
|
2246
|
+
/** Where the label goes: `'runIn'` (default) opens the box's first
|
|
2247
|
+
* paragraph ("**Theorem 2** (Bradley–Terry)**.** Let…"); `'title'`
|
|
2248
|
+
* makes it the box's title, in the title style ("Theorem 2
|
|
2249
|
+
* (Bradley–Terry)"). The fence's `title` follows the number, in
|
|
2250
|
+
* parentheses. */
|
|
2251
|
+
placement?: 'runIn' | 'title';
|
|
2252
|
+
/** Set the run-in label (and its suffix) in bold. Default `true`. The
|
|
2253
|
+
* `title` in parentheses is set in the regular weight. */
|
|
2254
|
+
bold?: boolean;
|
|
2255
|
+
/** Set the run-in label in italics, whatever the box's body (an italic
|
|
2256
|
+
* body leaves an upright label upright). Default `false`. */
|
|
2257
|
+
italic?: boolean;
|
|
2258
|
+
/** Set after the run-in label (and its title). Default `'.'`. */
|
|
2259
|
+
suffix?: string;
|
|
2260
|
+
}
|
|
2261
|
+
/** {@link CalloutNumberingConfig} with every value resolved; `counter` is
|
|
2262
|
+
* `''` for a label without a number. */
|
|
2263
|
+
export interface ResolvedCalloutNumberingConfig {
|
|
2264
|
+
label: string;
|
|
2265
|
+
counter: string;
|
|
2266
|
+
numberingTemplate: string;
|
|
2267
|
+
resetOn: ResourceCounterReset;
|
|
2268
|
+
counterFormat: ResourceCounterFormat;
|
|
2269
|
+
placement: 'runIn' | 'title';
|
|
2270
|
+
bold: boolean;
|
|
2271
|
+
italic: boolean;
|
|
2272
|
+
suffix: string;
|
|
2202
2273
|
}
|
|
2203
2274
|
/** Alignment of a split callout's continuation marker. */
|
|
2204
2275
|
export type CalloutMarkerTextAlign = 'left' | 'center' | 'right';
|
|
@@ -2347,6 +2418,9 @@ export interface ResolvedCalloutStyleConfig {
|
|
|
2347
2418
|
continuesMarker: string;
|
|
2348
2419
|
continuesMarkerAlign: CalloutMarkerTextAlign;
|
|
2349
2420
|
continuesMarkerItalic: boolean;
|
|
2421
|
+
/** Absent when the style counts nothing. */
|
|
2422
|
+
numbering?: ResolvedCalloutNumberingConfig;
|
|
2423
|
+
endMark: string;
|
|
2350
2424
|
}
|
|
2351
2425
|
/**
|
|
2352
2426
|
* A named chip style, selected by the inline `:chip[text]{style="<id>"}`
|
|
@@ -2552,6 +2626,18 @@ export interface HeadingLevelConfig {
|
|
|
2552
2626
|
* line that opener paints, even where the heading's own measure fits the
|
|
2553
2627
|
* title on fewer (a justified title, a forced break). */
|
|
2554
2628
|
span?: HeadingSpan;
|
|
2629
|
+
/** Whether a `span: 'page'` heading starts a new page. Default `true`:
|
|
2630
|
+
* it opens the next page (and `breakBefore` picks its side). `false`,
|
|
2631
|
+
* with `breakBefore.enabled: false`, opens it where the text reaches
|
|
2632
|
+
* (#539), as a page-span box does: the columns above end level (the
|
|
2633
|
+
* band is balanced, `headings.balancing.trailing`), the heading's band
|
|
2634
|
+
* (its design, or the default opener) is set across the content area
|
|
2635
|
+
* under them, and the text goes on in every column below it — a second
|
|
2636
|
+
* article of a bulletin under the end of the first. When the room left
|
|
2637
|
+
* would not hold the heading and the widow minimum of lines under it,
|
|
2638
|
+
* it opens the next page as before. No effect on a `span: 'column'`
|
|
2639
|
+
* heading. */
|
|
2640
|
+
spanBreak?: boolean;
|
|
2555
2641
|
/** When enabled, the heading renders as a design slot. */
|
|
2556
2642
|
advancedDesign?: HeadingAdvancedDesignConfig;
|
|
2557
2643
|
/** Letter-case transform applied to the heading title (after any
|
|
@@ -2623,6 +2709,9 @@ export interface ResolvedHeadingLevelConfig {
|
|
|
2623
2709
|
letterSpacing: Dimension;
|
|
2624
2710
|
breakBefore: ResolvedHeadingBreakBeforeConfig;
|
|
2625
2711
|
span: HeadingSpan;
|
|
2712
|
+
/** `false` when set so (see {@link HeadingLevelConfig.spanBreak});
|
|
2713
|
+
* absent, the default, is `true`. */
|
|
2714
|
+
spanBreak?: boolean;
|
|
2626
2715
|
advancedDesign: ResolvedHeadingAdvancedDesignConfig;
|
|
2627
2716
|
textTransform: HeadingTextTransform;
|
|
2628
2717
|
hidden: boolean;
|
|
@@ -2694,7 +2783,8 @@ export interface HeadingsConfig {
|
|
|
2694
2783
|
* `span: 'page'` heading without a design sets the bold, italic and
|
|
2695
2784
|
* script runs too; a heading design (a designed opener band, an
|
|
2696
2785
|
* in-column `advancedDesign`) prints `{titleText}` as plain text either
|
|
2697
|
-
* way
|
|
2786
|
+
* way, unless its text element reads inline marks (`inlineMarks: true`):
|
|
2787
|
+
* there `{titleText}` keeps the heading's runs (#539). Default `true`; configurations stored earlier whose
|
|
2698
2788
|
* headings carry marks are read with `false` (see `migrateConfig` in
|
|
2699
2789
|
* `postext/bundle`). */
|
|
2700
2790
|
inlineMarks?: boolean;
|
|
@@ -3275,6 +3365,37 @@ export interface MathConfig {
|
|
|
3275
3365
|
* when `avoidWidows` is on). The carried line stands alone at the head
|
|
3276
3366
|
* of the next column. Default `false`: the formula alone moves on. */
|
|
3277
3367
|
keepWithLeadIn?: boolean;
|
|
3368
|
+
/** Number the display formulas that carry a `\label` (#530). */
|
|
3369
|
+
equationNumbering?: EquationNumberingConfig;
|
|
3370
|
+
}
|
|
3371
|
+
/** How labelled display formulas are numbered (#530): a `\label{eq:x}`
|
|
3372
|
+
* in a display formula (on a row of an `align` or `gather`) numbers it in
|
|
3373
|
+
* reading order, unless the row says `\nonumber` or `\notag`. An
|
|
3374
|
+
* explicit `\tag{…}` prints as written and is not counted. */
|
|
3375
|
+
export interface EquationNumberingConfig {
|
|
3376
|
+
/** Default `true`. `false` prints no number (a `\label` is dropped)
|
|
3377
|
+
* and a reference prints the equation's page. */
|
|
3378
|
+
enabled?: boolean;
|
|
3379
|
+
/** Template of the number: `{n}` (the counter) and `{h1}`..`{h6}`
|
|
3380
|
+
* (heading numbers), as a resource type's. Default `'{n}'`;
|
|
3381
|
+
* `'{h1}.{n}'` numbers by chapter (with `resetOn: 'h1'`). */
|
|
3382
|
+
numberingTemplate?: string;
|
|
3383
|
+
/** When the counter starts again at 1. Default `'never'`. */
|
|
3384
|
+
resetOn?: ResourceCounterReset;
|
|
3385
|
+
/** How `{n}` is written. Default `'decimal'`. */
|
|
3386
|
+
counterFormat?: ResourceCounterFormat;
|
|
3387
|
+
/** The number as the formula and `\eqref` print it, `{n}` standing for
|
|
3388
|
+
* the number: `'({n})'` (default), `'[{n}]'`, `'{n}'`. `\ref` prints
|
|
3389
|
+
* the bare number. */
|
|
3390
|
+
format?: string;
|
|
3391
|
+
}
|
|
3392
|
+
/** {@link EquationNumberingConfig} with every value resolved. */
|
|
3393
|
+
export interface ResolvedEquationNumberingConfig {
|
|
3394
|
+
enabled: boolean;
|
|
3395
|
+
numberingTemplate: string;
|
|
3396
|
+
resetOn: ResourceCounterReset;
|
|
3397
|
+
counterFormat: ResourceCounterFormat;
|
|
3398
|
+
format: string;
|
|
3278
3399
|
}
|
|
3279
3400
|
export interface ResolvedMathConfig {
|
|
3280
3401
|
enabled: boolean;
|
|
@@ -3284,6 +3405,7 @@ export interface ResolvedMathConfig {
|
|
|
3284
3405
|
marginBottom: Dimension;
|
|
3285
3406
|
indentAfterDisplay: boolean;
|
|
3286
3407
|
keepWithLeadIn: boolean;
|
|
3408
|
+
equationNumbering: ResolvedEquationNumberingConfig;
|
|
3287
3409
|
}
|
|
3288
3410
|
/** Where footnotes (`[^id]` markers) are set:
|
|
3289
3411
|
* - `'column'`: at the foot of the column that holds the line citing the
|
|
@@ -3309,6 +3431,9 @@ export type FootnotePlacement = 'column' | 'chapterEnd' | 'spread';
|
|
|
3309
3431
|
* the column foot or on the spread only: with `placement: 'chapterEnd'`
|
|
3310
3432
|
* they number by chapter. */
|
|
3311
3433
|
export type FootnoteNumbering = 'chapter' | 'document' | 'page' | 'column' | 'spread';
|
|
3434
|
+
/** How footnote numbers are written: a numeral style, or `'symbols'`
|
|
3435
|
+
* (* † ‡ § ‖ ¶, then doubled; see {@link FootnotesConfig.symbols}). */
|
|
3436
|
+
export type FootnoteNumberFormat = NumberFormatStyle | 'symbols';
|
|
3312
3437
|
/** How the marker in the text is set:
|
|
3313
3438
|
* - `'superscript'`: raised and reduced, as a superscript (`text¹`);
|
|
3314
3439
|
* - `'inline'`: on the baseline at `markerSize` (`text①`), centred in its
|
|
@@ -3378,6 +3503,15 @@ export interface CitationsConfig {
|
|
|
3378
3503
|
* says) or, in Chinese text, as an inline two-row note (`'warichu'`,
|
|
3379
3504
|
* 夹注). */
|
|
3380
3505
|
notes?: 'footnote' | 'warichu';
|
|
3506
|
+
/** How far the citations run together (#537): through the book
|
|
3507
|
+
* (`'book'`, default), or each chapter on its own (`'chapter'`, a new
|
|
3508
|
+
* one at each document and each level-1 heading): a numbered style
|
|
3509
|
+
* numbers each chapter's citations from 1 and a work cited in two
|
|
3510
|
+
* chapters takes each chapter's number; a note style writes a work in
|
|
3511
|
+
* full at its first citation in each chapter. Meant for chapter lists
|
|
3512
|
+
* (`bibliography.scope: 'chapter'`): the proceedings, the bulletin, the
|
|
3513
|
+
* edited volume. */
|
|
3514
|
+
numbering?: 'book' | 'chapter';
|
|
3381
3515
|
/** The list of works cited. */
|
|
3382
3516
|
bibliography?: {
|
|
3383
3517
|
/** Title printed above the list (a bold paragraph). Unset: the
|
|
@@ -3427,6 +3561,7 @@ export interface ResolvedCitationsConfig {
|
|
|
3427
3561
|
marker: 'style' | 'brackets' | 'parentheses' | 'superscript' | 'corner';
|
|
3428
3562
|
collapseRanges: boolean;
|
|
3429
3563
|
notes: 'footnote' | 'warichu';
|
|
3564
|
+
numbering: 'book' | 'chapter';
|
|
3430
3565
|
bibliography: {
|
|
3431
3566
|
title?: string;
|
|
3432
3567
|
scope: 'book' | 'chapter';
|
|
@@ -3484,8 +3619,18 @@ export interface FootnotesConfig {
|
|
|
3484
3619
|
/** How the numbers are written, in any spelling of a number format
|
|
3485
3620
|
* (`decimal`, `lower-roman`, `circled-decimal` / `①`, `cjk-decimal`…, see
|
|
3486
3621
|
* `parseNumberFormat`). Default `'decimal'`. `circled-decimal` writes
|
|
3487
|
-
* numbers past 50 in decimal.
|
|
3622
|
+
* numbers past 50 in decimal. `'symbols'` (or `'*'`) marks the notes
|
|
3623
|
+
* with reference symbols, {@link symbols} in turn: * † ‡ § ‖ ¶, then
|
|
3624
|
+
* doubled (** †† …), tripled… (#538); its notes are counted again on
|
|
3625
|
+
* every page unless `numbering` says otherwise. */
|
|
3488
3626
|
numberFormat?: string;
|
|
3627
|
+
/** The sequence `numberFormat: 'symbols'` writes, doubled and then
|
|
3628
|
+
* tripled once it runs out. Default `['*', '†', '‡', '§', '‖', '¶']`.
|
|
3629
|
+
* The Latin files of Google Fonts / Fontsource carry * † § ¶ but not
|
|
3630
|
+
* ‡ or ‖: with such a face, leave those two out or set the notes in a
|
|
3631
|
+
* face that has them. Empty strings are dropped; an empty list keeps
|
|
3632
|
+
* the default. */
|
|
3633
|
+
symbols?: string[];
|
|
3489
3634
|
/** Default `'auto'` (see {@link FootnoteMarkerPosition}). The number
|
|
3490
3635
|
* that opens the note itself follows it too: raised, or set at the size
|
|
3491
3636
|
* of the note text. */
|
|
@@ -3543,7 +3688,10 @@ export interface FootnotesConfig {
|
|
|
3543
3688
|
export interface ResolvedFootnotesConfig {
|
|
3544
3689
|
placement: FootnotePlacement;
|
|
3545
3690
|
numbering: FootnoteNumbering;
|
|
3546
|
-
numberFormat:
|
|
3691
|
+
numberFormat: FootnoteNumberFormat;
|
|
3692
|
+
/** Set when it is not the default sequence (see
|
|
3693
|
+
* {@link FootnotesConfig.symbols}). */
|
|
3694
|
+
symbols?: string[];
|
|
3547
3695
|
/** `'auto'` resolved against the number format. */
|
|
3548
3696
|
markerPosition: 'superscript' | 'inline' | 'side' | 'right';
|
|
3549
3697
|
markerSize: Dimension;
|
|
@@ -4246,7 +4394,9 @@ export interface DesignTextElement {
|
|
|
4246
4394
|
* the marker character itself (`\*`). Bold runs take weight 700 (the
|
|
4247
4395
|
* element's own weight when it is heavier); italic runs flip the
|
|
4248
4396
|
* element's slant; scripts are set smaller and raised or lowered, as in
|
|
4249
|
-
* the body text.
|
|
4397
|
+
* the body text. In a heading design, `{titleText}` then keeps the
|
|
4398
|
+
* heading's own bold, italic and script runs (#539). Default `false`:
|
|
4399
|
+
* the text is set exactly as written. */
|
|
4250
4400
|
inlineMarks?: boolean;
|
|
4251
4401
|
/** Outline drawn around the glyphs (see `DesignTextStroke`). */
|
|
4252
4402
|
stroke?: DesignTextStroke;
|