pulpweaver4 0.0.88 → 0.0.185
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/ast/djot.d.ts +2 -1
- package/dist/ast/djot.js +31 -2
- package/dist/ast/djot.js.map +1 -1
- package/dist/ast/index.d.ts +1 -0
- package/dist/ast/index.js +1 -0
- package/dist/ast/index.js.map +1 -1
- package/dist/ast/nodes.d.ts +72 -9
- package/dist/ast/nodes.js +8 -0
- package/dist/ast/nodes.js.map +1 -1
- package/dist/ast/table.d.ts +27 -0
- package/dist/ast/table.js +32 -0
- package/dist/ast/table.js.map +1 -0
- package/dist/browser.js +2420 -0
- package/dist/citations/book.d.ts +2 -0
- package/dist/citations/book.js +17 -6
- package/dist/citations/book.js.map +1 -1
- package/dist/citations/collect.d.ts +5 -1
- package/dist/citations/collect.js +5 -1
- package/dist/citations/collect.js.map +1 -1
- package/dist/citations/index.d.ts +1 -1
- package/dist/citations/index.js +1 -1
- package/dist/citations/index.js.map +1 -1
- package/dist/citations/notes.js +54 -11
- package/dist/citations/notes.js.map +1 -1
- package/dist/citations/positions.js +4 -4
- package/dist/citations/positions.js.map +1 -1
- package/dist/citations/project.d.ts +12 -2
- package/dist/citations/project.js +21 -7
- package/dist/citations/project.js.map +1 -1
- package/dist/colour/images.d.ts +11 -2
- package/dist/colour/images.js +53 -3
- package/dist/colour/images.js.map +1 -1
- package/dist/colour/ink-limit.d.ts +2 -2
- package/dist/colour/ink-limit.js +6 -0
- package/dist/colour/ink-limit.js.map +1 -1
- package/dist/colour/intents.d.ts +10 -0
- package/dist/colour/intents.js +10 -0
- package/dist/colour/intents.js.map +1 -1
- package/dist/colour/previews.d.ts +8 -4
- package/dist/colour/previews.js +11 -8
- package/dist/colour/previews.js.map +1 -1
- package/dist/config/config.d.ts +99 -6
- package/dist/config/config.js +217 -6
- package/dist/config/config.js.map +1 -1
- package/dist/config/project-schema.d.ts +0 -8
- package/dist/config/project-schema.js +221 -12
- package/dist/config/project-schema.js.map +1 -1
- package/dist/config/schema.js +10 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/config/secrets.d.ts +11 -0
- package/dist/config/secrets.js +19 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/csl/processor.d.ts +3 -1
- package/dist/csl/processor.js +19 -13
- package/dist/csl/processor.js.map +1 -1
- package/dist/csl/project.d.ts +19 -4
- package/dist/csl/project.js +31 -11
- package/dist/csl/project.js.map +1 -1
- package/dist/djot/djot.js/src/ast.d.ts +4 -1
- package/dist/djot/djot.js/src/ast.js +8 -1
- package/dist/djot/djot.js/src/ast.js.map +1 -1
- package/dist/djot/djot.js/src/djot-renderer.js +3 -3
- package/dist/djot/djot.js/src/djot-renderer.js.map +1 -1
- package/dist/djot/djot.js/src/html.js +2 -1
- package/dist/djot/djot.js/src/html.js.map +1 -1
- package/dist/djot/djot.js/src/inline.d.ts +1 -1
- package/dist/djot/djot.js/src/inline.js +25 -12
- package/dist/djot/djot.js/src/inline.js.map +1 -1
- package/dist/djot/djot.js/src/pandoc.js +81 -11
- package/dist/djot/djot.js/src/pandoc.js.map +1 -1
- package/dist/djot/djot.js/src/parse.js +12 -3
- package/dist/djot/djot.js/src/parse.js.map +1 -1
- package/dist/fonts/index.d.ts +1 -1
- package/dist/fonts/index.js +1 -1
- package/dist/fonts/index.js.map +1 -1
- package/dist/fonts/lint.d.ts +51 -0
- package/dist/fonts/lint.js +101 -16
- package/dist/fonts/lint.js.map +1 -1
- package/dist/fonts/walk.d.ts +13 -0
- package/dist/fonts/walk.js +50 -33
- package/dist/fonts/walk.js.map +1 -1
- package/dist/html/css.d.ts +4 -0
- package/dist/html/css.js +11 -3
- package/dist/html/css.js.map +1 -1
- package/dist/html/dom.d.ts +6 -1
- package/dist/html/dom.js +28 -6
- package/dist/html/dom.js.map +1 -1
- package/dist/html/generated.d.ts +17 -0
- package/dist/html/generated.js +21 -0
- package/dist/html/generated.js.map +1 -0
- package/dist/html/images.d.ts +18 -0
- package/dist/html/images.js +49 -2
- package/dist/html/images.js.map +1 -1
- package/dist/html/index.d.ts +1 -0
- package/dist/html/index.js +1 -0
- package/dist/html/index.js.map +1 -1
- package/dist/html/render.d.ts +5 -4
- package/dist/html/render.js +34 -9
- package/dist/html/render.js.map +1 -1
- package/dist/hyphenation/exceptions.d.ts +5 -0
- package/dist/hyphenation/exceptions.js +11 -0
- package/dist/hyphenation/exceptions.js.map +1 -1
- package/dist/hyphenation/index.d.ts +1 -1
- package/dist/hyphenation/index.js +1 -1
- package/dist/hyphenation/index.js.map +1 -1
- package/dist/import/convert.d.ts +21 -0
- package/dist/import/convert.js +65 -0
- package/dist/import/convert.js.map +1 -0
- package/dist/incremental/cache.d.ts +59 -0
- package/dist/incremental/cache.js +64 -0
- package/dist/incremental/cache.js.map +1 -0
- package/dist/incremental/index.d.ts +3 -0
- package/dist/incremental/index.js +4 -0
- package/dist/incremental/index.js.map +1 -0
- package/dist/incremental/keys.d.ts +27 -0
- package/dist/incremental/keys.js +89 -0
- package/dist/incremental/keys.js.map +1 -0
- package/dist/incremental/session.d.ts +180 -0
- package/dist/incremental/session.js +401 -0
- package/dist/incremental/session.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/indexes/layout.d.ts +8 -2
- package/dist/indexes/layout.js +6 -4
- package/dist/indexes/layout.js.map +1 -1
- package/dist/layout/cache.d.ts +174 -0
- package/dist/layout/cache.js +150 -0
- package/dist/layout/cache.js.map +1 -0
- package/dist/layout/converge.d.ts +28 -0
- package/dist/layout/converge.js +102 -9
- package/dist/layout/converge.js.map +1 -1
- package/dist/layout/counters.d.ts +4 -0
- package/dist/layout/counters.js +15 -0
- package/dist/layout/counters.js.map +1 -1
- package/dist/layout/index.d.ts +5 -2
- package/dist/layout/index.js +3 -0
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/lists.d.ts +52 -3
- package/dist/layout/lists.js +513 -46
- package/dist/layout/lists.js.map +1 -1
- package/dist/layout/lookahead.d.ts +151 -0
- package/dist/layout/lookahead.js +581 -0
- package/dist/layout/lookahead.js.map +1 -0
- package/dist/layout/margin-boxes.d.ts +11 -1
- package/dist/layout/margin-boxes.js +24 -1
- package/dist/layout/margin-boxes.js.map +1 -1
- package/dist/layout/page-box.d.ts +2 -0
- package/dist/layout/page-box.js +6 -4
- package/dist/layout/page-box.js.map +1 -1
- package/dist/layout/page-rules.d.ts +8 -1
- package/dist/layout/page-rules.js +46 -2
- package/dist/layout/page-rules.js.map +1 -1
- package/dist/layout/page.js +4 -2
- package/dist/layout/page.js.map +1 -1
- package/dist/layout/pagebuilder.d.ts +248 -3
- package/dist/layout/pagebuilder.js +512 -19
- package/dist/layout/pagebuilder.js.map +1 -1
- package/dist/layout/pages.d.ts +116 -3
- package/dist/layout/pages.js +1396 -162
- package/dist/layout/pages.js.map +1 -1
- package/dist/layout/paragraph.d.ts +14 -0
- package/dist/layout/paragraph.js +304 -31
- package/dist/layout/paragraph.js.map +1 -1
- package/dist/layout/pre.js +4 -0
- package/dist/layout/pre.js.map +1 -1
- package/dist/layout/protrusion.d.ts +26 -0
- package/dist/layout/protrusion.js +39 -0
- package/dist/layout/protrusion.js.map +1 -0
- package/dist/layout/ranges.d.ts +2 -0
- package/dist/layout/ranges.js +22 -0
- package/dist/layout/ranges.js.map +1 -0
- package/dist/layout/region.d.ts +2 -1
- package/dist/layout/region.js +9 -5
- package/dist/layout/region.js.map +1 -1
- package/dist/layout/templates.d.ts +71 -0
- package/dist/layout/templates.js +290 -0
- package/dist/layout/templates.js.map +1 -0
- package/dist/layout/vlist.d.ts +3 -3
- package/dist/linebreak/items.d.ts +27 -2
- package/dist/linebreak/items.js +10 -3
- package/dist/linebreak/items.js.map +1 -1
- package/dist/linebreak/knuth-plass.d.ts +20 -0
- package/dist/linebreak/knuth-plass.js +68 -16
- package/dist/linebreak/knuth-plass.js.map +1 -1
- package/dist/lint/book.d.ts +13 -0
- package/dist/lint/book.js +52 -0
- package/dist/lint/book.js.map +1 -0
- package/dist/lint/config.d.ts +9 -0
- package/dist/lint/config.js +40 -6
- package/dist/lint/config.js.map +1 -1
- package/dist/lint/linter.js +1 -0
- package/dist/lint/linter.js.map +1 -1
- package/dist/lint/project.js +1 -1
- package/dist/lint/project.js.map +1 -1
- package/dist/lint/rules/layout.d.ts +3 -1
- package/dist/lint/rules/layout.js +8 -6
- package/dist/lint/rules/layout.js.map +1 -1
- package/dist/lint/rules/source.d.ts +3 -1
- package/dist/lint/rules/source.js +9 -4
- package/dist/lint/rules/source.js.map +1 -1
- package/dist/lint/testing.js +1 -0
- package/dist/lint/testing.js.map +1 -1
- package/dist/measure/bidi-data.d.ts +14 -0
- package/dist/measure/bidi-data.js +69 -0
- package/dist/measure/bidi-data.js.map +1 -0
- package/dist/measure/bidi.d.ts +70 -0
- package/dist/measure/bidi.js +225 -0
- package/dist/measure/bidi.js.map +1 -0
- package/dist/measure/css.d.ts +5 -0
- package/dist/measure/css.js +2 -0
- package/dist/measure/css.js.map +1 -1
- package/dist/measure/measurer.d.ts +36 -2
- package/dist/measure/measurer.js +220 -22
- package/dist/measure/measurer.js.map +1 -1
- package/dist/measure/model.d.ts +20 -2
- package/dist/measure/model.js +13 -6
- package/dist/measure/model.js.map +1 -1
- package/dist/measure/script-data.d.ts +6 -0
- package/dist/measure/script-data.js +34 -0
- package/dist/measure/script-data.js.map +1 -0
- package/dist/measure/scripts.d.ts +36 -0
- package/dist/measure/scripts.js +293 -0
- package/dist/measure/scripts.js.map +1 -0
- package/dist/output/output.d.ts +35 -3
- package/dist/output/output.js +26 -4
- package/dist/output/output.js.map +1 -1
- package/dist/paint/backgrounds.js +7 -20
- package/dist/paint/backgrounds.js.map +1 -1
- package/dist/paint/blend.d.ts +33 -13
- package/dist/paint/blend.js +73 -21
- package/dist/paint/blend.js.map +1 -1
- package/dist/paint/cache.d.ts +80 -0
- package/dist/paint/cache.js +537 -0
- package/dist/paint/cache.js.map +1 -0
- package/dist/paint/canvas.d.ts +4 -13
- package/dist/paint/canvas.js +45 -5
- package/dist/paint/canvas.js.map +1 -1
- package/dist/paint/context.d.ts +2 -0
- package/dist/paint/emphasis.js +1 -1
- package/dist/paint/emphasis.js.map +1 -1
- package/dist/paint/flatten.d.ts +24 -2
- package/dist/paint/flatten.js +55 -12
- package/dist/paint/flatten.js.map +1 -1
- package/dist/paint/forms.d.ts +64 -0
- package/dist/paint/forms.js +319 -0
- package/dist/paint/forms.js.map +1 -0
- package/dist/paint/images.d.ts +4 -1
- package/dist/paint/images.js +13 -2
- package/dist/paint/images.js.map +1 -1
- package/dist/paint/layers.d.ts +64 -0
- package/dist/paint/layers.js +137 -0
- package/dist/paint/layers.js.map +1 -0
- package/dist/paint/painter.d.ts +19 -6
- package/dist/paint/painter.js +15 -135
- package/dist/paint/painter.js.map +1 -1
- package/dist/paint/stacking.d.ts +1 -1
- package/dist/paint/stacking.js +9 -2
- package/dist/paint/stacking.js.map +1 -1
- package/dist/paint/text.d.ts +14 -3
- package/dist/paint/text.js +25 -4
- package/dist/paint/text.js.map +1 -1
- package/dist/paint/vertical.js +2 -2
- package/dist/paint/vertical.js.map +1 -1
- package/dist/pdf/encoded.d.ts +16 -0
- package/dist/pdf/encoded.js +35 -0
- package/dist/pdf/encoded.js.map +1 -0
- package/dist/pdf/include/colour.d.ts +105 -0
- package/dist/pdf/include/colour.js +349 -0
- package/dist/pdf/include/colour.js.map +1 -0
- package/dist/pdf/include/functions.d.ts +17 -0
- package/dist/pdf/include/functions.js +389 -0
- package/dist/pdf/include/functions.js.map +1 -0
- package/dist/pdf/include/pages.d.ts +14 -0
- package/dist/pdf/include/pages.js +27 -0
- package/dist/pdf/include/pages.js.map +1 -0
- package/dist/pdf/include/pdfjs/LICENSE +177 -0
- package/dist/pdf/include/pdfjs/pdf.min.mjs +27 -0
- package/dist/pdf/include/pdfjs/pdf.worker.min.mjs +27 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/pdf/include/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/pdf/include/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/pdf/include/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/dist/pdf/include/pdfjs/wasm/quickjs-eval.wasm +0 -0
- package/dist/pdf/include/prepare.d.ts +58 -0
- package/dist/pdf/include/prepare.js +266 -0
- package/dist/pdf/include/prepare.js.map +1 -0
- package/dist/pdf/include/preview.d.ts +38 -0
- package/dist/pdf/include/preview.js +101 -0
- package/dist/pdf/include/preview.js.map +1 -0
- package/dist/pdf/include/rewrite.d.ts +57 -0
- package/dist/pdf/include/rewrite.js +803 -0
- package/dist/pdf/include/rewrite.js.map +1 -0
- package/dist/pdf/include/serialize.d.ts +32 -0
- package/dist/pdf/include/serialize.js +158 -0
- package/dist/pdf/include/serialize.js.map +1 -0
- package/dist/pdf/include/testing.d.ts +26 -0
- package/dist/pdf/include/testing.js +50 -0
- package/dist/pdf/include/testing.js.map +1 -0
- package/dist/pdf/index.d.ts +1 -0
- package/dist/pdf/index.js +1 -0
- package/dist/pdf/index.js.map +1 -1
- package/dist/pdf/structure/annotations.d.ts +33 -0
- package/dist/pdf/structure/annotations.js +112 -0
- package/dist/pdf/structure/annotations.js.map +1 -0
- package/dist/pdf/structure/forms.d.ts +10 -0
- package/dist/pdf/structure/forms.js +46 -0
- package/dist/pdf/structure/forms.js.map +1 -0
- package/dist/pdf/structure/index.d.ts +41 -5
- package/dist/pdf/structure/index.js +40 -5
- package/dist/pdf/structure/index.js.map +1 -1
- package/dist/pdf/structure/links.d.ts +2 -0
- package/dist/pdf/structure/links.js +1 -1
- package/dist/pdf/structure/links.js.map +1 -1
- package/dist/pdf/structure/presentation.d.ts +28 -0
- package/dist/pdf/structure/presentation.js +79 -0
- package/dist/pdf/structure/presentation.js.map +1 -0
- package/dist/pdf/structure/tags.d.ts +34 -2
- package/dist/pdf/structure/tags.js +117 -14
- package/dist/pdf/structure/tags.js.map +1 -1
- package/dist/pdf/types.d.ts +378 -15
- package/dist/pdf/wasm/pulpweaver4_pdf.d.ts +44 -2
- package/dist/pdf/wasm/pulpweaver4_pdf.js +191 -2
- package/dist/pdf/wasm/pulpweaver4_pdf_bg.wasm +0 -0
- package/dist/pdf/writer.d.ts +13 -1
- package/dist/pdf/writer.js +26 -1
- package/dist/pdf/writer.js.map +1 -1
- package/dist/plugin/define.d.ts +200 -15
- package/dist/plugin/define.js +124 -15
- package/dist/plugin/define.js.map +1 -1
- package/dist/plugin/failure.d.ts +1 -1
- package/dist/plugin/index.d.ts +5 -4
- package/dist/plugin/index.js +5 -4
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/reference.d.ts +38 -0
- package/dist/plugin/reference.js +287 -0
- package/dist/plugin/reference.js.map +1 -0
- package/dist/plugin/register.d.ts +39 -7
- package/dist/plugin/register.js +83 -2
- package/dist/plugin/register.js.map +1 -1
- package/dist/preflight/index.d.ts +1 -1
- package/dist/preflight/index.js +1 -1
- package/dist/preflight/index.js.map +1 -1
- package/dist/preflight/pdfx.d.ts +35 -0
- package/dist/preflight/pdfx.js +37 -4
- package/dist/preflight/pdfx.js.map +1 -1
- package/dist/preflight/reader.d.ts +10 -3
- package/dist/preflight/reader.js +86 -5
- package/dist/preflight/reader.js.map +1 -1
- package/dist/print/impose.d.ts +66 -0
- package/dist/print/impose.js +331 -0
- package/dist/print/impose.js.map +1 -0
- package/dist/print/output.js +426 -60
- package/dist/print/output.js.map +1 -1
- package/dist/problem.js +4 -3
- package/dist/problem.js.map +1 -1
- package/dist/profile/index.d.ts +1 -0
- package/dist/profile/index.js +1 -0
- package/dist/profile/index.js.map +1 -1
- package/dist/profile/lint.d.ts +1 -1
- package/dist/profile/lint.js +29 -1
- package/dist/profile/lint.js.map +1 -1
- package/dist/profile/list-table.d.ts +51 -0
- package/dist/profile/list-table.js +137 -0
- package/dist/profile/list-table.js.map +1 -0
- package/dist/profile/metadata.js +3 -0
- package/dist/profile/metadata.js.map +1 -1
- package/dist/profile/profile.d.ts +3 -0
- package/dist/profile/profile.js +9 -1
- package/dist/profile/profile.js.map +1 -1
- package/dist/project.js +3 -0
- package/dist/project.js.map +1 -1
- package/dist/qpdf/index.d.ts +2 -0
- package/dist/qpdf/index.js +3 -0
- package/dist/qpdf/index.js.map +1 -0
- package/dist/qpdf/qpdf.d.ts +125 -0
- package/dist/qpdf/qpdf.js +205 -0
- package/dist/qpdf/qpdf.js.map +1 -0
- package/dist/qpdf/testing.d.ts +12 -0
- package/dist/qpdf/testing.js +9 -0
- package/dist/qpdf/testing.js.map +1 -0
- package/dist/qpdf/wasm/LICENSE-qpdf +202 -0
- package/dist/qpdf/wasm/LICENSE-zlib +22 -0
- package/dist/qpdf/wasm/NOTICE-qpdf.md +42 -0
- package/dist/qpdf/wasm/qpdf.wasm +0 -0
- package/dist/render/index.d.ts +3 -0
- package/dist/render/index.js +2 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/render.d.ts +98 -0
- package/dist/render/render.js +243 -0
- package/dist/render/render.js.map +1 -0
- package/dist/reproducible/clock.d.ts +4 -5
- package/dist/reproducible/clock.js +4 -5
- package/dist/reproducible/clock.js.map +1 -1
- package/dist/spike/spike-page.chromium.json +4 -4
- package/dist/style/colours.d.ts +7 -2
- package/dist/style/colours.js +24 -2
- package/dist/style/colours.js.map +1 -1
- package/dist/style/compile.js +1 -1
- package/dist/style/compile.js.map +1 -1
- package/dist/style/defaults.d.ts +9 -3
- package/dist/style/defaults.js +14 -2
- package/dist/style/defaults.js.map +1 -1
- package/dist/style/gcpm.d.ts +1 -1
- package/dist/style/gcpm.js +17 -5
- package/dist/style/gcpm.js.map +1 -1
- package/dist/style/properties.js +84 -0
- package/dist/style/properties.js.map +1 -1
- package/dist/test/book.d.ts +22 -2
- package/dist/test/book.js +35 -2
- package/dist/test/book.js.map +1 -1
- package/dist/test/build.d.ts +23 -0
- package/dist/test/build.js +86 -33
- package/dist/test/build.js.map +1 -1
- package/dist/test/layout.js +132 -22
- package/dist/test/layout.js.map +1 -1
- package/dist/test/limits.d.ts +8 -0
- package/dist/test/limits.js +9 -0
- package/dist/test/limits.js.map +1 -0
- package/dist/test/pipeline.d.ts +26 -0
- package/dist/test/pipeline.js +4 -2
- package/dist/test/pipeline.js.map +1 -1
- package/dist/test/render.d.ts +26 -3
- package/dist/test/render.js +151 -23
- package/dist/test/render.js.map +1 -1
- package/dist/test/runner.d.ts +6 -3
- package/dist/test/runner.js +172 -105
- package/dist/test/runner.js.map +1 -1
- package/dist/test/text.js +2 -2
- package/dist/test/text.js.map +1 -1
- package/dist/text/output.js +2 -2
- package/dist/text/output.js.map +1 -1
- package/dist/text/render.d.ts +4 -3
- package/dist/text/render.js +128 -6
- package/dist/text/render.js.map +1 -1
- package/dist/transform/index.d.ts +1 -1
- package/dist/transform/index.js +1 -1
- package/dist/transform/index.js.map +1 -1
- package/dist/transform/run.d.ts +2 -0
- package/dist/transform/run.js +32 -16
- package/dist/transform/run.js.map +1 -1
- package/dist/web/output.js +116 -10
- package/dist/web/output.js.map +1 -1
- package/dist/web/runtime/justify.js.txt +2 -2
- package/dist/web/site.d.ts +2 -0
- package/dist/web/site.js +8 -1
- package/dist/web/site.js.map +1 -1
- package/docs/README.md +6 -1
- package/docs/manual/chapters/front.dj +34 -0
- package/docs/manual/chapters/guides/citations.dj +426 -0
- package/docs/manual/chapters/guides/colour-and-prepress.dj +261 -0
- package/docs/manual/chapters/guides/editions.dj +329 -0
- package/docs/manual/chapters/guides/in-a-web-page.dj +143 -0
- package/docs/manual/chapters/guides/lines-and-pages.dj +681 -0
- package/docs/manual/chapters/guides/lint-rules.dj +355 -0
- package/docs/manual/chapters/guides/pdfs.dj +501 -0
- package/docs/manual/chapters/guides/plugins.dj +425 -0
- package/docs/manual/chapters/guides/testing.dj +264 -0
- package/docs/manual/chapters/guides/writing-in-djot.dj +537 -0
- package/docs/manual/chapters/start/for-latex-users.dj +256 -0
- package/docs/manual/chapters/start/getting-started.dj +167 -0
- package/docs/manual/chapters/start/your-first-book.dj +426 -0
- package/docs/manual/fonts/CrimsonPro-Italic-VF.ttf +0 -0
- package/docs/manual/fonts/CrimsonPro-VF.ttf +0 -0
- package/docs/manual/fonts/JetBrainsMono-Regular.otf +0 -0
- package/docs/manual/fonts/NotoSansSymbols2-Boxes.ttf +0 -0
- package/docs/manual/fonts/OFL.txt +95 -0
- package/docs/manual/pulpweaver4.toml +39 -0
- package/docs/manual/styles/manual.css +137 -0
- package/docs/reference/css-properties/index.md +9 -0
- package/docs/reference/css-properties/pw-expansion.md +31 -0
- package/docs/reference/css-properties/pw-flow-into.md +31 -0
- package/docs/reference/css-properties/pw-knockout.md +26 -0
- package/docs/reference/css-properties/pw-layer.md +24 -0
- package/docs/reference/css-properties/pw-page-breaking.md +30 -0
- package/docs/reference/css-properties/pw-page-duration.md +28 -0
- package/docs/reference/css-properties/pw-page-rotate.md +29 -0
- package/docs/reference/css-properties/pw-page-transition.md +29 -0
- package/docs/reference/css-properties/pw-protrusion.md +31 -0
- package/docs/reference/lint-rules/ibid-across-page.md +2 -2
- package/docs/reference/lint-rules/unused-entry.md +3 -1
- package/docs/reference/plugin-api/capabilities.md +2 -2
- package/docs/reference/plugin-api/claim-kind.md +1 -1
- package/docs/reference/plugin-api/combine-exceptions.md +19 -0
- package/docs/reference/plugin-api/element-break-context.md +34 -0
- package/docs/reference/plugin-api/element-break-item.md +24 -0
- package/docs/reference/plugin-api/element-breaker.md +24 -0
- package/docs/reference/plugin-api/flow-definition.md +30 -0
- package/docs/reference/plugin-api/generated-reference.md +32 -0
- package/docs/reference/plugin-api/index-definition.md +32 -0
- package/docs/reference/plugin-api/index-titles.md +18 -0
- package/docs/reference/plugin-api/index.md +27 -3
- package/docs/reference/plugin-api/insert-class-definition.md +46 -0
- package/docs/reference/plugin-api/insert-placement.md +22 -0
- package/docs/reference/plugin-api/insert-placements.md +18 -0
- package/docs/reference/plugin-api/layout-definition.md +9 -5
- package/docs/reference/plugin-api/layout-slot.md +6 -16
- package/docs/reference/plugin-api/lint-context.md +3 -1
- package/docs/reference/plugin-api/lint-definition.md +1 -1
- package/docs/reference/plugin-api/lint-edition.md +2 -0
- package/docs/reference/plugin-api/page-builder-event.md +22 -0
- package/docs/reference/plugin-api/page-builder-hook.md +7 -3
- package/docs/reference/plugin-api/page-builder-page-event.md +30 -0
- package/docs/reference/plugin-api/page-template-definition.md +34 -0
- package/docs/reference/plugin-api/page-template-region-definition.md +46 -0
- package/docs/reference/plugin-api/plugin-definition.md +5 -1
- package/docs/reference/plugin-api/plugin-reference-options.md +32 -0
- package/docs/reference/plugin-api/plugin-reference.md +22 -0
- package/docs/reference/plugin-api/plugin-registry.md +15 -5
- package/docs/reference/plugin-api/plugin-stage.md +1 -1
- package/docs/reference/plugin-api/plugin.md +9 -2
- package/docs/reference/plugin-api/reference-page.md +34 -0
- package/docs/reference/plugin-api/render-reference-page.md +18 -0
- package/docs/reference/plugin-api/renderers.md +1 -1
- package/docs/reference/pulpweaver4-toml/editions.md +253 -2
- package/docs/reference/pulpweaver4-toml/index.md +57 -1
- package/docs/reference/pulpweaver4-toml/inks.md +15 -4
- package/docs/reference/pulpweaver4-toml/lint.md +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
``` =meta
|
|
2
|
+
description = 'The pulpweaver profile of Djot — labels and cross-references, page references, footnotes, figures and tables, math, verse, the contents, index terms, content for some editions only, a file’s own language, and comments.'
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
{#writing-in-djot}
|
|
6
|
+
# Writing in Djot
|
|
7
|
+
|
|
8
|
+
A pulpweaver4 book is written in [Djot](https://djot.net), a light markup
|
|
9
|
+
by the author of Pandoc. Djot is close to Markdown, but its rules have no
|
|
10
|
+
exceptions, and nearly everything can carry attributes: an id, classes, or
|
|
11
|
+
`key="value"`. pulpweaver4 reads Djot through its _profile_, a handful of
|
|
12
|
+
conventions built from those attributes, divs and spans. The profile adds
|
|
13
|
+
no syntax to Djot but citations, so any Djot tool can still read a
|
|
14
|
+
pulpweaver4 chapter.
|
|
15
|
+
|
|
16
|
+
This guide covers the profile. For Djot itself (emphasis, links, lists,
|
|
17
|
+
tables, code, footnotes), [Djot’s syntax
|
|
18
|
+
reference](https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html)
|
|
19
|
+
is short and complete.
|
|
20
|
+
|
|
21
|
+
{#chapters-and-sections}
|
|
22
|
+
## Chapters and sections
|
|
23
|
+
|
|
24
|
+
Each file in `chapters` is read in order, and each `#` heading starts a
|
|
25
|
+
chapter. A file may hold several chapters, though one each is easiest to
|
|
26
|
+
work with. `##` and `###` headings are sections, numbered within their
|
|
27
|
+
chapter: chapter 1, section 1.1, section 1.1.1. Deeper headings aren’t
|
|
28
|
+
numbered.
|
|
29
|
+
|
|
30
|
+
{project=profile}
|
|
31
|
+
``` djot
|
|
32
|
+
{.unnumbered}
|
|
33
|
+
# Preface
|
|
34
|
+
|
|
35
|
+
{#intro}
|
|
36
|
+
# Introduction
|
|
37
|
+
|
|
38
|
+
## A first section
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- *`{.unnumbered}`* before a heading leaves its section, and the sections
|
|
42
|
+
inside it, out of the numbering: here the preface has no number and the
|
|
43
|
+
introduction is chapter 1.
|
|
44
|
+
- *`{.appendix}`* before a `#` heading letters that chapter and every one
|
|
45
|
+
after it: appendix A, section A.1, Figure A.1.
|
|
46
|
+
|
|
47
|
+
Numbers are fixed when the book is read, so “Figure 3” reads the same in the
|
|
48
|
+
PDF, on the web and in the text edition, and doesn’t depend on which edition
|
|
49
|
+
shows what.
|
|
50
|
+
|
|
51
|
+
{#labels-and-cross-references}
|
|
52
|
+
## Labels and cross-references
|
|
53
|
+
|
|
54
|
+
A _label_ names a block: `{#name}` on the line before it. An empty link to
|
|
55
|
+
a label is a _cross-reference_, whose text pulpweaver4 fills in. Here is a
|
|
56
|
+
figure of a box, drawn by an SVG file in the project:
|
|
57
|
+
|
|
58
|
+
{project=profile file="images/box.svg"}
|
|
59
|
+
``` svg
|
|
60
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="80" viewBox="0 0 120 80">
|
|
61
|
+
<rect x="10" y="10" width="100" height="60" fill="#3b5bdb"/>
|
|
62
|
+
</svg>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
{project=profile}
|
|
66
|
+
``` djot
|
|
67
|
+
{#fig:box}
|
|
68
|
+
::: figure
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
A box, the caption.
|
|
72
|
+
:::
|
|
73
|
+
|
|
74
|
+
See [](#fig:box), [](#tab:prices), [](#eq:euler) and [](#intro).
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
reads “See Figure 1.1, Table 1.1, Equation 1.1 and chapter 1.”
|
|
78
|
+
|
|
79
|
+
- *What is filled in* depends on what the label names: `chapter 2`,
|
|
80
|
+
`appendix A`, `section 1.1`, `Figure 1.1`, `Table 1.1` or `Equation 1.3`.
|
|
81
|
+
An unnumbered section reads as its title.
|
|
82
|
+
- *Figures, tables and equations are numbered within their chapter*
|
|
83
|
+
(1.1, 1.2, then 2.1), and before the first chapter without a prefix.
|
|
84
|
+
- *A link with text of its own*, `[the box](#fig:box)`, keeps its text.
|
|
85
|
+
- *The references are links*, on the web and in the PDF.
|
|
86
|
+
- *The words are English* for now, whatever the book’s `language`, and
|
|
87
|
+
there is no setting to change them.
|
|
88
|
+
|
|
89
|
+
Edit the example to see the numbers follow: move the table into the second
|
|
90
|
+
section, or add a section before the first.
|
|
91
|
+
|
|
92
|
+
{data-example=cross-references}
|
|
93
|
+
::: live-example
|
|
94
|
+
_Live example: Cross-references_, two numbered sections and a table, and the references between them. On the site, at
|
|
95
|
+
<https://pulpweaver.inkylabs.com/guides/writing-in-djot>, it is a small project you can edit, and
|
|
96
|
+
pulpweaver4 sets its pages again in your browser as you type.
|
|
97
|
+
:::
|
|
98
|
+
|
|
99
|
+
A label can also go on a span, `[the turning point]{#turn}`, or a paragraph,
|
|
100
|
+
but those have no number or title, so a cross-reference to one is an error;
|
|
101
|
+
link to it with your own text instead.
|
|
102
|
+
|
|
103
|
+
A misspelled label is an error that names the nearest label (“did you mean
|
|
104
|
+
writing?”), and so is a label used twice. The reference is reported once,
|
|
105
|
+
where it is, and the build leaves its link empty.
|
|
106
|
+
|
|
107
|
+
{#page-references}
|
|
108
|
+
## Page references
|
|
109
|
+
|
|
110
|
+
In print, `{.page}` on a cross-reference gives the page its label lands on:
|
|
111
|
+
|
|
112
|
+
{project=profile}
|
|
113
|
+
``` djot
|
|
114
|
+
{.print-only}
|
|
115
|
+
The figure is on page [](#fig:box){.page}.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
reads “The figure is on page 3.” A web edition and a text edition have no
|
|
119
|
+
pages, so there a page reference is filled in as a cross-reference would
|
|
120
|
+
be (“Figure 1.1”), which rarely reads well: put page references in
|
|
121
|
+
something `{.print-only}`, as above. pulpweaver4 lays the book out again if
|
|
122
|
+
filling in page numbers moves a label to another page, until every number is
|
|
123
|
+
right.
|
|
124
|
+
|
|
125
|
+
{#writing-in-djot-footnotes}
|
|
126
|
+
## Footnotes
|
|
127
|
+
|
|
128
|
+
Djot’s footnotes are pulpweaver4’s:
|
|
129
|
+
|
|
130
|
+
{project=profile}
|
|
131
|
+
``` djot
|
|
132
|
+
The pilgrim lighted on a den.[^den]
|
|
133
|
+
|
|
134
|
+
[^den]: A cave or a lair.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Notes are numbered within each chapter. In print a note goes to the foot of
|
|
138
|
+
the page where it is called; on the web it opens where it is called, as a
|
|
139
|
+
pop-over; in the text edition the notes are collected at the end of their
|
|
140
|
+
chapter. Under a note style, a citation becomes a footnote by itself:
|
|
141
|
+
see [Citations](#citations).
|
|
142
|
+
|
|
143
|
+
{#figures-and-tables}
|
|
144
|
+
## Figures and tables
|
|
145
|
+
|
|
146
|
+
`::: figure` makes a figure. Its last paragraph is its caption, unless the
|
|
147
|
+
figure holds nothing else or that paragraph is only an image:
|
|
148
|
+
|
|
149
|
+
{project=profile file="images/press.svg"}
|
|
150
|
+
``` svg
|
|
151
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120">
|
|
152
|
+
<rect x="20" y="10" width="80" height="12" fill="#444"/>
|
|
153
|
+
<rect x="55" y="22" width="10" height="50" fill="#444"/>
|
|
154
|
+
<rect x="15" y="72" width="90" height="10" fill="#444"/>
|
|
155
|
+
<rect x="10" y="82" width="10" height="28" fill="#444"/>
|
|
156
|
+
<rect x="100" y="82" width="10" height="28" fill="#444"/>
|
|
157
|
+
</svg>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
{project=profile}
|
|
161
|
+
``` djot
|
|
162
|
+
{#fig:press}
|
|
163
|
+
::: figure
|
|
164
|
+

|
|
165
|
+
|
|
166
|
+
A hand press of the seventeenth century.
|
|
167
|
+
:::
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
gives “Figure 1.1: A hand press of the seventeenth century.” under the
|
|
171
|
+
image. An image’s path is relative to its chapter’s file, or else to the
|
|
172
|
+
project’s folder. An image whose file isn’t in the project is an error at
|
|
173
|
+
the image, naming the editions it is missing from and the nearest file.
|
|
174
|
+
With `images/press.svg` in the project, a typo:
|
|
175
|
+
|
|
176
|
+
{project=missing file="images/press.svg"}
|
|
177
|
+
``` svg
|
|
178
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120">
|
|
179
|
+
<rect x="20" y="10" width="80" height="100" fill="#444"/>
|
|
180
|
+
</svg>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
{project=missing}
|
|
184
|
+
``` djot
|
|
185
|
+

|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
{project=missing output="pw build"}
|
|
189
|
+
``` text
|
|
190
|
+
chapters/02-writing.dj:18:2: error: the image images/pres.svg is not in the project [missing-image] [web, paperback, letter]
|
|
191
|
+
|
|
|
192
|
+
16 | _pw build_, check it with _pw lint_ and test it with _pw test_.
|
|
193
|
+
17 |
|
|
194
|
+
18 | 
|
|
195
|
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
196
|
+
fix: did you mean images/press.svg?
|
|
197
|
+
|
|
198
|
+
1 error
|
|
199
|
+
...
|
|
200
|
+
pw build: failed, with 1 error
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
A table is Djot’s, with its caption after it in a line starting `^`. A table
|
|
204
|
+
is numbered only if it has a caption or a label:
|
|
205
|
+
|
|
206
|
+
{project=profile}
|
|
207
|
+
``` djot
|
|
208
|
+
{#tab:prices}
|
|
209
|
+
| Edition | Price |
|
|
210
|
+
|----|---:|
|
|
211
|
+
| Paperback | $12 |
|
|
212
|
+
| Letter | free |
|
|
213
|
+
|
|
214
|
+
^ What each edition costs.
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
A pipe table’s cells hold a line of text each. A table whose cells hold
|
|
218
|
+
paragraphs or lists, or span columns or rows, is a `::: list-table`, as
|
|
219
|
+
reStructuredText’s `list-table`: a list of rows, each a list of its cells.
|
|
220
|
+
A paragraph after the rows is its caption:
|
|
221
|
+
|
|
222
|
+
{project=profile}
|
|
223
|
+
``` djot
|
|
224
|
+
{#tab:editions header-rows=1 stub-columns=1 widths="1 2 1"}
|
|
225
|
+
::: list-table
|
|
226
|
+
- - Edition
|
|
227
|
+
- {colspan=2}
|
|
228
|
+
What it is
|
|
229
|
+
|
|
230
|
+
- - {rowspan=2}
|
|
231
|
+
Print
|
|
232
|
+
- The paperback, 5.5 × 8.5 in.
|
|
233
|
+
- {align=right}
|
|
234
|
+
$12
|
|
235
|
+
|
|
236
|
+
- - The letter edition, for home printers:
|
|
237
|
+
|
|
238
|
+
- US Letter,
|
|
239
|
+
- with wider margins.
|
|
240
|
+
- {align=right}
|
|
241
|
+
free
|
|
242
|
+
|
|
243
|
+
What each edition is.
|
|
244
|
+
:::
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
`header-rows` makes the first rows header rows, repeated at the top of
|
|
248
|
+
each page the table goes on to; `stub-columns` makes the first columns’
|
|
249
|
+
cells headers of their rows; `widths` gives each column its share of the
|
|
250
|
+
width. `{colspan=…}`, `{rowspan=…}` and `{align=…}` go before a cell’s
|
|
251
|
+
first block. As in HTML, a row leaves out the cells that a cell above it
|
|
252
|
+
covers: the third row above has two. A print edition breaks a table only
|
|
253
|
+
between rows, and never inside a cell spanning rows; the text edition sets
|
|
254
|
+
it in columns, each cell’s paragraphs wrapped to its own. A list table
|
|
255
|
+
written wrong stays a list, and `pw lint` says why.
|
|
256
|
+
|
|
257
|
+
`{.unnumbered}` before a figure or a table leaves it out of the numbering.
|
|
258
|
+
|
|
259
|
+
{#math}
|
|
260
|
+
## Math
|
|
261
|
+
|
|
262
|
+
Math is TeX’s notation between Djot’s math delimiters: ``$`…` `` inline,
|
|
263
|
+
``$$`…` `` displayed.
|
|
264
|
+
|
|
265
|
+
{project=profile}
|
|
266
|
+
``` djot
|
|
267
|
+
Euler’s identity, $`e^{i\pi} + 1 = 0`, is
|
|
268
|
+
|
|
269
|
+
{#eq:euler}
|
|
270
|
+
$$`e^{i\pi} + 1 = 0`
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Every displayed equation is numbered, “(1.1)” at its right; `{.unnumbered}`
|
|
274
|
+
before a paragraph that holds only a displayed equation leaves it
|
|
275
|
+
unnumbered. In print, math is set by MathJax in New Computer Modern and drawn
|
|
276
|
+
as paths in the PDF, whatever the book’s fonts.
|
|
277
|
+
|
|
278
|
+
On the web, math is MathML, which the reader’s browser sets in its math
|
|
279
|
+
font (CSS’s `font-family: math`) and a screen reader reads as it is. The
|
|
280
|
+
text edition writes math as its TeX.
|
|
281
|
+
|
|
282
|
+
{#verse}
|
|
283
|
+
## Verse
|
|
284
|
+
|
|
285
|
+
`::: verse` keeps each line of the source as a line of verse, and each
|
|
286
|
+
paragraph as a stanza:
|
|
287
|
+
|
|
288
|
+
{project=profile}
|
|
289
|
+
``` djot
|
|
290
|
+
::: verse
|
|
291
|
+
O God, thou art my God,
|
|
292
|
+
early will I seek thee:
|
|
293
|
+
|
|
294
|
+
{.refrain}
|
|
295
|
+
my soul thirsteth for thee.
|
|
296
|
+
:::
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Each line is a `div.verse-line` in a `div.stanza` (here the second stanza
|
|
300
|
+
also has the class `refrain`), which a stylesheet can indent or keep
|
|
301
|
+
together. Leading spaces in the source are dropped, so indent lines with CSS
|
|
302
|
+
and a class, not with spaces. `::: stanza` alone holds one stanza.
|
|
303
|
+
|
|
304
|
+
{#content-for-some-editions}
|
|
305
|
+
## Content for some editions
|
|
306
|
+
|
|
307
|
+
A class before a block, or on a span, shows it in some editions only:
|
|
308
|
+
|
|
309
|
+
{project=profile}
|
|
310
|
+
``` djot
|
|
311
|
+
{.print-only}
|
|
312
|
+
This paragraph is only in the PDFs.
|
|
313
|
+
|
|
314
|
+
{.screen-only}
|
|
315
|
+
This one is only on the web.
|
|
316
|
+
|
|
317
|
+
{.edition-letter}
|
|
318
|
+
This one is only in the letter edition.
|
|
319
|
+
|
|
320
|
+
{.edition-paperback .edition-web}
|
|
321
|
+
This one is in the paperback and on the web.
|
|
322
|
+
|
|
323
|
+
The price is [$12]{.print-only}[free]{.screen-only}.
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
- *`.print-only` and `.screen-only`* go by the edition’s `media`. A text
|
|
327
|
+
edition has no medium, so it shows neither; name it with
|
|
328
|
+
`.edition-<name>` to include it.
|
|
329
|
+
- *`.edition-<name>`* names editions from `pulpweaver4.toml`; several
|
|
330
|
+
name any of them. A misspelled edition is a lint error, with a
|
|
331
|
+
did-you-mean.
|
|
332
|
+
- *Before a heading, a condition applies to its whole section*, up to the
|
|
333
|
+
next heading of the same or a higher level.
|
|
334
|
+
- *Numbers ignore conditions:* a print-only section still takes its
|
|
335
|
+
number, so the web’s numbers match the paperback’s.
|
|
336
|
+
|
|
337
|
+
To _style_ editions differently rather than include different text, use the
|
|
338
|
+
stylesheet: see [Editions and media queries](#editions).
|
|
339
|
+
|
|
340
|
+
{#index-terms}
|
|
341
|
+
## Index terms
|
|
342
|
+
|
|
343
|
+
A span with `index` marks its text as an entry in the subject index, and
|
|
344
|
+
`{.xi}` indexes a word as it stands:
|
|
345
|
+
|
|
346
|
+
{project=profile}
|
|
347
|
+
``` djot
|
|
348
|
+
[Parachurch ministries amass sizable revenues]{index="Cru; parachurch!revenues"},
|
|
349
|
+
and [tithing]{.xi} is older still.
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Terms are separated by `;`, and the levels of a term by `!`, as in LaTeX’s
|
|
353
|
+
`\index` and makeindex. `sort@text` sorts an entry by `sort`;
|
|
354
|
+
`term|seealso{other}` and `term|see{other}` refer to another entry; and
|
|
355
|
+
`term|(` and `term|)`, each on an empty span such as
|
|
356
|
+
`[]{index="tithing|("}`, mark the ends of a range of pages.
|
|
357
|
+
|
|
358
|
+
`::: index` prints the index where it stands, in a section of its own
|
|
359
|
+
headed “Index”, in the book’s contents and the PDF’s bookmarks:
|
|
360
|
+
|
|
361
|
+
{project=profile}
|
|
362
|
+
``` djot
|
|
363
|
+
::: index
|
|
364
|
+
:::
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
In print each entry has its pages, three or more in a row as a range, in two
|
|
368
|
+
balanced columns; on the web and in the text edition, it has the sections
|
|
369
|
+
its terms are in. Entries are sorted in the book’s language’s order, under
|
|
370
|
+
their letters. A book with index terms and no `::: index` prints no index,
|
|
371
|
+
and the `unplaced-index` lint rule warns of it, at the first term.
|
|
372
|
+
|
|
373
|
+
{#the-contents}
|
|
374
|
+
## The contents
|
|
375
|
+
|
|
376
|
+
`::: contents` prints a table of contents where it stands, as LaTeX’s
|
|
377
|
+
`\tableofcontents` does: every section with a heading, numbered or not, so
|
|
378
|
+
an unnumbered preface, the bibliography and the index are listed too.
|
|
379
|
+
|
|
380
|
+
{project=profile}
|
|
381
|
+
``` djot
|
|
382
|
+
{depth=2 title="Table of Contents"}
|
|
383
|
+
::: contents
|
|
384
|
+
:::
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
- *`depth`* is how many heading levels deep it goes: 3 by default, `#`
|
|
388
|
+
to `###`.
|
|
389
|
+
- *`title`* is its heading, “Contents” by default. The block makes a
|
|
390
|
+
section of its own, unnumbered and labelled `contents`, so
|
|
391
|
+
`[](#contents)` refers to it, unless it opens a section you wrote.
|
|
392
|
+
- *`{.unlisted}`* before a heading leaves its section out.
|
|
393
|
+
|
|
394
|
+
In print each entry is its number, its title, a leader of dots and its page,
|
|
395
|
+
as LaTeX’s book class sets them, and a link to the section; the PDF tags it
|
|
396
|
+
as a table of contents. The web edition keeps the entries as links, without
|
|
397
|
+
pages, and the text edition lists the titles. The leaders are the engine’s,
|
|
398
|
+
`--pw-leader` in CSS: see [Lines and pages](#leaders).
|
|
399
|
+
|
|
400
|
+
{#divs-for-your-own-blocks}
|
|
401
|
+
## Divs for your own blocks
|
|
402
|
+
|
|
403
|
+
Any other `::: name` is a div with that class, which you can style:
|
|
404
|
+
|
|
405
|
+
{project=profile}
|
|
406
|
+
``` djot
|
|
407
|
+
::: note
|
|
408
|
+
Page references appear only in print.
|
|
409
|
+
:::
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
is `<div class="note">`. A plugin can claim a name, `::: questions` say, and
|
|
413
|
+
render it its own way: see [Writing a plugin](#plugins). If a div has
|
|
414
|
+
several classes, its name is the _last_. The core claims `figure` and
|
|
415
|
+
`bibliography`, `contents` and `index`.
|
|
416
|
+
|
|
417
|
+
{#a-files-own-language-and-title}
|
|
418
|
+
## A file’s own language, title and description
|
|
419
|
+
|
|
420
|
+
A chapter in another language than the book’s says so in a ```` ``` =meta````
|
|
421
|
+
block, TOML, before anything else in its file:
|
|
422
|
+
|
|
423
|
+
{project=meta file="chapters/03-latin.dj"}
|
|
424
|
+
```` djot
|
|
425
|
+
``` =meta
|
|
426
|
+
language = "la"
|
|
427
|
+
title = "Caput tertium"
|
|
428
|
+
description = "Caesar’s Gaul, in Latin."
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
{#caput}
|
|
432
|
+
# Caput Tertium
|
|
433
|
+
|
|
434
|
+
Gallia est omnis divisa in partes tres.
|
|
435
|
+
````
|
|
436
|
+
|
|
437
|
+
- *`language`* is the file’s, in every edition: its hyphenation patterns,
|
|
438
|
+
its quotation marks and its language in the PDF’s tags and the HTML. The
|
|
439
|
+
web site’s own words stay in the book’s language.
|
|
440
|
+
- *`title`* names the file’s page on the web, in its `<title>`, the site’s
|
|
441
|
+
contents and the links to the next and previous pages, where the
|
|
442
|
+
chapter’s heading would otherwise.
|
|
443
|
+
- *`description`* says in a sentence what the file is about. It is the
|
|
444
|
+
description of the file’s web page, which search engines and link
|
|
445
|
+
previews show: each of this manual’s chapters has one, for its page on
|
|
446
|
+
pulpweaver.inkylabs.com.
|
|
447
|
+
|
|
448
|
+
{#comments}
|
|
449
|
+
## Comments
|
|
450
|
+
|
|
451
|
+
`{% … %}` is a comment, in any edition left out:
|
|
452
|
+
|
|
453
|
+
{project=profile}
|
|
454
|
+
``` djot
|
|
455
|
+
{% Check this date against the 1678 edition. %}
|
|
456
|
+
As I walked through the wilderness of this world…
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
HTML comments, `<!-- … -->`, aren’t comments in Djot: they would print, and
|
|
460
|
+
the linter says so.
|
|
461
|
+
|
|
462
|
+
{#turning-a-rule-off}
|
|
463
|
+
## Turning a rule off
|
|
464
|
+
|
|
465
|
+
`lint-disable` on a block or span turns lint rules off for what it covers,
|
|
466
|
+
`""` for every rule:
|
|
467
|
+
|
|
468
|
+
{project=profile}
|
|
469
|
+
``` djot
|
|
470
|
+
{lint-disable="profile"}
|
|
471
|
+
The :shrug: here is meant literally.
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
{#quotes-dashes-and-symbols}
|
|
475
|
+
## Quotes, dashes and symbols
|
|
476
|
+
|
|
477
|
+
Djot makes straight quotes curly, in the book’s language’s style (“...” in
|
|
478
|
+
English, „...“ in German), `--` an en dash, `---` an em dash and `...` an
|
|
479
|
+
ellipsis. Djot’s `:name:` symbols mean nothing to the core yet, so they are
|
|
480
|
+
printed as written, and the linter reports each.
|
|
481
|
+
|
|
482
|
+
Raw HTML, `` `<b>`{=html}``, is kept on the web and in print but left out of
|
|
483
|
+
the text edition, with a lint warning: style a span with a class instead.
|
|
484
|
+
Raw LaTeX, `` `\hfill`{=latex}``, is left out everywhere: pulpweaver4 has no
|
|
485
|
+
TeX to give it to.
|
|
486
|
+
|
|
487
|
+
{#what-the-profile-checks}
|
|
488
|
+
## What the profile checks
|
|
489
|
+
|
|
490
|
+
`pw lint` runs the `profile` rule, which reports Djot that the profile
|
|
491
|
+
doesn’t understand, with the fix: `{.page}` on a link that has text, a
|
|
492
|
+
condition naming an edition that doesn’t exist, a misspelled class close to
|
|
493
|
+
one of the profile’s, an empty `[](#)`, a stanza with two paragraphs, an
|
|
494
|
+
HTML comment, a symbol nobody defines, a `=meta` block that isn’t a file’s
|
|
495
|
+
first. Run it as you write; `pw build` runs it too.
|
|
496
|
+
|
|
497
|
+
{project=check}
|
|
498
|
+
``` djot
|
|
499
|
+
{.pirnt-only}
|
|
500
|
+
Only in the PDFs, or so it was meant.
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
{project=check output="pw lint"}
|
|
504
|
+
``` text
|
|
505
|
+
chapters/02-writing.dj:19:1: warning: .pirnt-only means nothing to the profile or a plugin, so it only styles [unknown-class]
|
|
506
|
+
|
|
|
507
|
+
17 |
|
|
508
|
+
18 | {.pirnt-only}
|
|
509
|
+
19 | Only in the PDFs, or so it was meant.
|
|
510
|
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
511
|
+
fix: did you mean .print-only?
|
|
512
|
+
|
|
513
|
+
1 warning
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
An unknown class or symbol is a warning, since it may be meant only for
|
|
517
|
+
the stylesheet; Djot the profile can’t read, such as `{.page}` on a link
|
|
518
|
+
with text, is an error. A project that sets the rule, `profile = "error"`,
|
|
519
|
+
sets all its problems to that level.
|
|
520
|
+
|
|
521
|
+
A plugin’s own blocks and spans are Djot too, a class it claims: a
|
|
522
|
+
scripture reference, `[1Ti 5:18]{.v}`, is
|
|
523
|
+
[`pulpweaver4-scripture`](https://pulpweaver.inkylabs.com/plugins/scripture)’s,
|
|
524
|
+
read as a reference, linked and indexed; an answer blank,
|
|
525
|
+
`[answer]{.ans}`, is the [example
|
|
526
|
+
workbook](https://gitlab.com/inkylabs/pulpweaver4/-/tree/master/examples/workbook)’s
|
|
527
|
+
own plugin’s, a form field to fill in on screen and a line to write on in
|
|
528
|
+
print. The profile knows a plugin’s classes once the project loads it.
|
|
529
|
+
|
|
530
|
+
{#writing-in-djot-not-yet}
|
|
531
|
+
## Not yet
|
|
532
|
+
|
|
533
|
+
- *A citation with only a locator*, whose syntax waits on Djot’s.
|
|
534
|
+
Narrative citations, `[=@bauckham]`, and works listed uncited,
|
|
535
|
+
`[~@hays]`, are [Citations](#citing)’; they follow jgm’s
|
|
536
|
+
proposal until Djot settles its syntax
|
|
537
|
+
([#154](https://gitlab.com/inkylabs/pulpweaver4/-/issues/154)).
|