pulpweaver4 0.0.91 → 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.js +23 -0
- 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 +59 -5
- 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/index.d.ts +1 -1
- package/dist/citations/index.js +1 -1
- package/dist/citations/index.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/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 +91 -3
- package/dist/config/config.js +200 -3
- package/dist/config/config.js.map +1 -1
- package/dist/config/project-schema.d.ts +0 -8
- package/dist/config/project-schema.js +207 -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/project.d.ts +19 -4
- package/dist/csl/project.js +23 -10
- package/dist/csl/project.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 +24 -6
- 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-rules.d.ts +6 -1
- package/dist/layout/page-rules.js +42 -1
- 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 +108 -1
- package/dist/layout/pages.js +1362 -159
- 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.js +1 -1
- 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 +357 -11
- 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 +33 -2
- 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 +400 -50
- 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 +128 -19
- 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 +23 -0
- 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 +126 -4
- 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/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 +239 -2
- package/docs/reference/pulpweaver4-toml/index.md +44 -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,426 @@
|
|
|
1
|
+
``` =meta
|
|
2
|
+
description = 'What pw new makes, and how to turn it into your own book — chapters in Djot, one stylesheet for every edition, the editions in pulpweaver4.toml, lint and tests.'
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
{#your-first-book}
|
|
6
|
+
# Your first book
|
|
7
|
+
|
|
8
|
+
[Getting started](#getting-started) made a project with `pw new` and built
|
|
9
|
+
it. This chapter goes through that project, file by file, changing it as a book
|
|
10
|
+
of your own would.
|
|
11
|
+
|
|
12
|
+
{#the-project}
|
|
13
|
+
## The project
|
|
14
|
+
|
|
15
|
+
A pulpweaver4 project is a folder. `pw new` made this one:
|
|
16
|
+
|
|
17
|
+
{.untested}
|
|
18
|
+
``` text
|
|
19
|
+
my-first-book/
|
|
20
|
+
├── pulpweaver4.toml the book: its title, chapters and editions
|
|
21
|
+
├── chapters/
|
|
22
|
+
│ ├── 01-beginning.dj
|
|
23
|
+
│ └── 02-writing.dj
|
|
24
|
+
├── styles/
|
|
25
|
+
│ └── book.css one stylesheet for every edition
|
|
26
|
+
├── fonts/
|
|
27
|
+
│ ├── CrimsonPro-VF.ttf
|
|
28
|
+
│ ├── CrimsonPro-Italic-VF.ttf
|
|
29
|
+
│ ├── NotoSansSymbols2-Boxes.ttf the task list’s boxes, ☐ ☑ ☒
|
|
30
|
+
│ └── OFL.txt the fonts’ licence
|
|
31
|
+
├── tests/
|
|
32
|
+
│ └── book.test.ts facts about this book, checked by pw test
|
|
33
|
+
├── dist/ what pw build writes
|
|
34
|
+
└── .gitignore
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Everything in it is plain text but the fonts, so it suits version control:
|
|
38
|
+
`.gitignore` already leaves out `dist/`. All of it but the fonts is CC0, yours
|
|
39
|
+
to do anything with; the fonts are Crimson Pro and a cut of Noto Sans
|
|
40
|
+
Symbols 2, under the SIL Open Font License.
|
|
41
|
+
|
|
42
|
+
{#pulpweaver4toml}
|
|
43
|
+
## pulpweaver4.toml
|
|
44
|
+
|
|
45
|
+
`pulpweaver4.toml` says what the book is and which editions to build:
|
|
46
|
+
|
|
47
|
+
{project=first file="pulpweaver4.toml" .replace}
|
|
48
|
+
``` toml
|
|
49
|
+
# The book: https://pulpweaver.inkylabs.com says what each key does.
|
|
50
|
+
title = "My First Book"
|
|
51
|
+
language = "en-US"
|
|
52
|
+
chapters = ["chapters/*.dj"]
|
|
53
|
+
|
|
54
|
+
# Each edition is built into dist/<edition>/ by `pw build`.
|
|
55
|
+
[editions.web]
|
|
56
|
+
media = "screen"
|
|
57
|
+
|
|
58
|
+
[editions.paperback]
|
|
59
|
+
media = "print"
|
|
60
|
+
page = "5.5in 8.5in"
|
|
61
|
+
|
|
62
|
+
[editions.letter]
|
|
63
|
+
media = "print"
|
|
64
|
+
page = "letter"
|
|
65
|
+
|
|
66
|
+
[editions.text]
|
|
67
|
+
output = "text"
|
|
68
|
+
wrap = 72
|
|
69
|
+
|
|
70
|
+
[lint]
|
|
71
|
+
extends = ["recommended"]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- *`title`* goes on the web edition, the text edition and each PDF’s
|
|
75
|
+
metadata.
|
|
76
|
+
- *`language`* is a language tag. It chooses the hyphenation patterns and
|
|
77
|
+
goes into the HTML and the PDFs.
|
|
78
|
+
- *`chapters`* are the source files, in order. A pattern’s files come in
|
|
79
|
+
the order of their names, which is why the chapters are numbered.
|
|
80
|
+
- *Each `[editions.<name>]`* is something `pw build` writes, into
|
|
81
|
+
`dist/<name>/`. A `print` edition is a PDF at its `page` size, a `screen`
|
|
82
|
+
edition a web site, and a `text` edition a `.txt` file. The name is yours:
|
|
83
|
+
call the paperback `trade` or the letter edition `proof` if you like.
|
|
84
|
+
- *`[lint]`* turns on the lint rules; [Lint rules for your
|
|
85
|
+
press](#lint-rules) says more.
|
|
86
|
+
|
|
87
|
+
[Editions and media queries](#editions) has the rest: page sizes,
|
|
88
|
+
CMYK editions for an offset printer, PDF/A and PDF/X, and styling each
|
|
89
|
+
edition its own way.
|
|
90
|
+
|
|
91
|
+
{#chapters}
|
|
92
|
+
## Chapters
|
|
93
|
+
|
|
94
|
+
Each chapter is a [Djot](https://djot.net) file. Djot is a light markup,
|
|
95
|
+
close to Markdown but stricter: paragraphs are separated by a blank line,
|
|
96
|
+
`_emphasis_` is between underscores and `*strong*` between asterisks, and a
|
|
97
|
+
heading starts with `#`. Here is the first chapter:
|
|
98
|
+
|
|
99
|
+
{project=first file="chapters/01-beginning.dj" .replace}
|
|
100
|
+
``` djot
|
|
101
|
+
{#beginning}
|
|
102
|
+
# The Beginning
|
|
103
|
+
|
|
104
|
+
This is the first chapter of your book. It is written in Djot, a light
|
|
105
|
+
markup whose whole syntax is at <https://djot.net>: paragraphs are
|
|
106
|
+
separated by a blank line, _emphasis_ is written between underscores and
|
|
107
|
+
*strong emphasis* between asterisks, and a note goes where its call
|
|
108
|
+
is.[^notes]
|
|
109
|
+
|
|
110
|
+
Every chapter is a file in the chapters folder, and they follow one
|
|
111
|
+
another in the order of their names. The next one, [](#writing), says a little more.
|
|
112
|
+
|
|
113
|
+
[^notes]: In print a note sits at the foot of its page; on the web it
|
|
114
|
+
opens where it is called.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Three things in it are pulpweaver4’s own conventions, which [Writing in
|
|
118
|
+
Djot](#writing-in-djot) covers in full:
|
|
119
|
+
|
|
120
|
+
- *`{#beginning}`* on the line before the heading is a _label_, a name for
|
|
121
|
+
the chapter.
|
|
122
|
+
- *`[](#writing)`*, a link with no text to a label, is a
|
|
123
|
+
_cross-reference_: pulpweaver4 fills in the text, here “chapter 2”, and
|
|
124
|
+
keeps it right as chapters move.
|
|
125
|
+
- *`[^notes]`* calls a footnote. In print the note goes to the foot of the
|
|
126
|
+
page where it is called; on the web it opens where it is called.
|
|
127
|
+
|
|
128
|
+
Add a chapter by adding a file. Save this as `chapters/03-ending.dj`:
|
|
129
|
+
|
|
130
|
+
{project=first file="chapters/03-ending.dj" .replace}
|
|
131
|
+
``` djot
|
|
132
|
+
{#ending}
|
|
133
|
+
# The Ending
|
|
134
|
+
|
|
135
|
+
As [](#writing) said, and as [](#beginning) did, it's "done".
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
and build again. The paperback has a third chapter, on a right-hand page of
|
|
139
|
+
its own, whose line reads “As chapter 2 said, and as chapter 1 did, it’s
|
|
140
|
+
“done”.”: the references are filled in, and the quotes are curly.
|
|
141
|
+
|
|
142
|
+
{#a-table-of-contents}
|
|
143
|
+
### A table of contents
|
|
144
|
+
|
|
145
|
+
A `::: contents` block lists the book’s chapters and sections where you put
|
|
146
|
+
it. Give the contents a file of their own, first in the order of names, as
|
|
147
|
+
`chapters/00-contents.dj`:
|
|
148
|
+
|
|
149
|
+
{project=first file="chapters/00-contents.dj" .replace}
|
|
150
|
+
``` djot
|
|
151
|
+
{depth=1}
|
|
152
|
+
::: contents
|
|
153
|
+
:::
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The block makes a section headed “Contents”, unnumbered, so the book’s
|
|
157
|
+
chapters keep their numbers. In print each entry has its page number, after
|
|
158
|
+
a row of dots, as LaTeX’s `\tableofcontents` sets it; on the web its entries
|
|
159
|
+
are links, and in the text edition a list of titles. `{depth=1}` lists the
|
|
160
|
+
chapters alone; without it the contents go three heading levels deep, `#`
|
|
161
|
+
to `###`. `{.unlisted}` before a heading leaves its section out.
|
|
162
|
+
|
|
163
|
+
{#when-something-is-wrong}
|
|
164
|
+
## When something is wrong
|
|
165
|
+
|
|
166
|
+
Misspell a label:
|
|
167
|
+
|
|
168
|
+
{project=mistake file="chapters/03-ending.dj" .replace}
|
|
169
|
+
``` djot
|
|
170
|
+
{#ending}
|
|
171
|
+
# The Ending
|
|
172
|
+
|
|
173
|
+
As [](#writing) said, and as [](#writng) did not, it's "done".
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
and the build says so, at the problem’s place in the source:
|
|
177
|
+
|
|
178
|
+
{project=mistake output="pw build"}
|
|
179
|
+
``` text
|
|
180
|
+
chapters/03-ending.dj:4:30: error: unknown label writng [unknown-label]
|
|
181
|
+
|
|
|
182
|
+
2 | # The Ending
|
|
183
|
+
3 |
|
|
184
|
+
4 | As [](#writing) said, and as [](#writng) did not, it's "done".
|
|
185
|
+
| ^^^^^^^^^^^
|
|
186
|
+
fix: did you mean writing?
|
|
187
|
+
|
|
188
|
+
1 error
|
|
189
|
+
pw build: web: dist/web/ (7 files)
|
|
190
|
+
pw build: paperback: dist/paperback/paperback.pdf
|
|
191
|
+
pw build: letter: dist/letter/letter.pdf
|
|
192
|
+
pw build: text: dist/text/book.txt
|
|
193
|
+
pw build: failed, with 1 error
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
pw goes on after a problem and lists every one it finds, as a compiler
|
|
197
|
+
does, and exits with an error, so a book with problems never quietly ships;
|
|
198
|
+
the files are still written, to look at. The name in brackets,
|
|
199
|
+
`unknown-label`, is the problem’s code.
|
|
200
|
+
|
|
201
|
+
{#the-stylesheet}
|
|
202
|
+
## The stylesheet
|
|
203
|
+
|
|
204
|
+
`styles/book.css` styles every edition. It is ordinary CSS, with
|
|
205
|
+
`@media print` and `@media screen` for what differs between paper and
|
|
206
|
+
screen. Its text is hyphenated, `hyphens: auto` from `:root`, but its
|
|
207
|
+
headings, which `hyphens: manual` breaks only where you write a soft hyphen:
|
|
208
|
+
|
|
209
|
+
{project=first}
|
|
210
|
+
``` css
|
|
211
|
+
:root {
|
|
212
|
+
font-family: "Crimson Pro", "Noto Sans Symbols 2";
|
|
213
|
+
font-size: 12pt;
|
|
214
|
+
line-height: 1.35;
|
|
215
|
+
hyphens: auto;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
p {
|
|
219
|
+
margin: 0;
|
|
220
|
+
text-align: justify;
|
|
221
|
+
}
|
|
222
|
+
/* A paragraph after another is indented, but for a table of contents', a
|
|
223
|
+
bibliography's and an index's entries, which hang, and the index's
|
|
224
|
+
letters. */
|
|
225
|
+
p + p:not(.pw-contents-entry, .csl-entry, .pw-index-entry, .pw-index-letter) {
|
|
226
|
+
text-indent: 1.5em;
|
|
227
|
+
}
|
|
228
|
+
h1 {
|
|
229
|
+
hyphens: manual;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media print {
|
|
233
|
+
:root {
|
|
234
|
+
font-size: 11pt;
|
|
235
|
+
line-height: 14pt;
|
|
236
|
+
}
|
|
237
|
+
/* Each chapter opens on a right-hand page, a third of the way down. */
|
|
238
|
+
h1 {
|
|
239
|
+
break-before: right;
|
|
240
|
+
margin-top: 1.5in;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Each edition’s name is a media query too, so one edition can be styled on its
|
|
246
|
+
own. Add this to the end of `book.css` to set the paperback, whose page is
|
|
247
|
+
narrower than the letter edition’s, a size smaller:
|
|
248
|
+
|
|
249
|
+
{project=first}
|
|
250
|
+
``` css
|
|
251
|
+
/* The paperback alone: a smaller type, for its narrow page. */
|
|
252
|
+
@media (--paperback) {
|
|
253
|
+
:root {
|
|
254
|
+
font-size: 10pt;
|
|
255
|
+
line-height: 13pt;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The paperback’s text gets smaller; the letter edition’s doesn’t change.
|
|
261
|
+
|
|
262
|
+
{#running-heads-and-page-numbers}
|
|
263
|
+
### Running heads and page numbers
|
|
264
|
+
|
|
265
|
+
A print edition’s pages are styled with CSS’s `@page`, whose margin boxes
|
|
266
|
+
hold running heads and page numbers. The starter puts the chapter’s title at
|
|
267
|
+
the head of each page but the one it opens, and the page’s number at the
|
|
268
|
+
outside of its foot:
|
|
269
|
+
|
|
270
|
+
{project=first}
|
|
271
|
+
``` css
|
|
272
|
+
@media print {
|
|
273
|
+
h1 {
|
|
274
|
+
string-set: chapter content();
|
|
275
|
+
}
|
|
276
|
+
@page {
|
|
277
|
+
font-size: 9pt;
|
|
278
|
+
@top-center {
|
|
279
|
+
content: string(chapter, first-except);
|
|
280
|
+
font-style: italic;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
@page :left {
|
|
284
|
+
@bottom-left { content: counter(page); }
|
|
285
|
+
}
|
|
286
|
+
@page :right {
|
|
287
|
+
@bottom-right { content: counter(page); }
|
|
288
|
+
}
|
|
289
|
+
@page :blank {
|
|
290
|
+
@top-center { content: none; }
|
|
291
|
+
@bottom-left { content: none; }
|
|
292
|
+
@bottom-right { content: none; }
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
`string-set` copies each chapter’s title into a string, `string(chapter, first-except)` prints it on every page but the one where it is set, and
|
|
298
|
+
`:left`, `:right` and `:blank` choose the pages a rule styles. `@page`’s
|
|
299
|
+
`size` and `margin` set the page itself; [Lines and
|
|
300
|
+
pages](#lines-and-pages) has the rest.
|
|
301
|
+
|
|
302
|
+
pulpweaver4 breaks a print edition’s paragraphs into lines with TeX’s
|
|
303
|
+
algorithm, and its pages with TeX’s page builder, and you tune both from
|
|
304
|
+
CSS: `widows`, `orphans`, `break-before`, and TeX’s own parameters as custom
|
|
305
|
+
properties such as `--pw-tolerance`. [Lines and pages](#lines-and-pages)
|
|
306
|
+
is about them.
|
|
307
|
+
|
|
308
|
+
{#your-first-book-fonts}
|
|
309
|
+
### Fonts
|
|
310
|
+
|
|
311
|
+
A print edition uses only fonts that are files in the project, never the
|
|
312
|
+
fonts installed on your machine, so the book prints the same anywhere. The
|
|
313
|
+
stylesheet names them with `@font-face`:
|
|
314
|
+
|
|
315
|
+
{project=first}
|
|
316
|
+
``` css
|
|
317
|
+
@font-face {
|
|
318
|
+
font-family: "Crimson Pro";
|
|
319
|
+
src: url("../fonts/CrimsonPro-VF.ttf") format("truetype");
|
|
320
|
+
font-weight: 200 900;
|
|
321
|
+
font-style: normal;
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
To use another typeface, put its TrueType or OpenType files (`.ttf`,
|
|
326
|
+
`.otf`) in `fonts/`, add an `@font-face` for each, and name the family in
|
|
327
|
+
`font-family`. If a character in the book isn’t in the project’s fonts, the
|
|
328
|
+
print build says so as an error, rather than printing a box or quietly
|
|
329
|
+
using another font; so does a `font-family` that names a typeface the
|
|
330
|
+
project doesn’t have.
|
|
331
|
+
|
|
332
|
+
{#building-one-edition}
|
|
333
|
+
## Building one edition
|
|
334
|
+
|
|
335
|
+
`pw build` builds every edition. To build one, name it:
|
|
336
|
+
|
|
337
|
+
{project=first}
|
|
338
|
+
``` sh
|
|
339
|
+
pw build --edition paperback
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
{project=first .output}
|
|
343
|
+
``` text
|
|
344
|
+
pw build: paperback: dist/paperback/paperback.pdf
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
The other editions’ folders in `dist/` are left as they were.
|
|
348
|
+
|
|
349
|
+
{#watching-as-you-write}
|
|
350
|
+
## Watching as you write
|
|
351
|
+
|
|
352
|
+
`pw dev` opens the book in your browser, in pulpweaver4’s app: the source
|
|
353
|
+
beside the pages of an edition, the problems, the tests, and a download of
|
|
354
|
+
each edition. Each time you save a chapter, in the app or in your own
|
|
355
|
+
editor, the pages are laid out again from the one that changed; save the
|
|
356
|
+
stylesheet or `pulpweaver4.toml`, and the whole book is. It runs until you
|
|
357
|
+
stop it with Ctrl-C, and nothing leaves your machine.
|
|
358
|
+
|
|
359
|
+
{#lint-and-tests}
|
|
360
|
+
## Lint and tests
|
|
361
|
+
|
|
362
|
+
Two commands check the book, as a programmer checks code:
|
|
363
|
+
|
|
364
|
+
- *`pw lint`* runs the lint rules: unknown labels, citation keys that
|
|
365
|
+
aren’t in the bibliography, Djot that pulpweaver4 doesn’t understand, and
|
|
366
|
+
the rules that need the HTML or the pages, such as the one against a
|
|
367
|
+
widow, for which it builds the book without writing it. `pw build`
|
|
368
|
+
reports the same problems as it builds. [Lint rules for your
|
|
369
|
+
press](#lint-rules) lists them, and shows how to write your own.
|
|
370
|
+
|
|
371
|
+
- *`pw test`* runs `tests/*.test.ts`, facts about this book in particular.
|
|
372
|
+
The starter project’s tests check three:
|
|
373
|
+
|
|
374
|
+
{project=first file="tests/book.test.ts" .replace}
|
|
375
|
+
``` ts
|
|
376
|
+
import { build } from 'pulpweaver4/test'
|
|
377
|
+
|
|
378
|
+
const book = await build({ edition: 'paperback' })
|
|
379
|
+
|
|
380
|
+
test('each chapter opens on a right-hand page', () => {
|
|
381
|
+
for (const chapter of book.ast.select('document > section')) {
|
|
382
|
+
expect(book.pages.of(chapter).first).toBeRecto()
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
|
|
386
|
+
test('no line is wider than its measure', () => {
|
|
387
|
+
expect(book).toHaveNoOverfullLines()
|
|
388
|
+
})
|
|
389
|
+
|
|
390
|
+
test('each page but a blank one has its number at the outside of its foot', () => {
|
|
391
|
+
for (const page of book.pages) {
|
|
392
|
+
const outside = page.side === 'recto' ? 'right' : 'left'
|
|
393
|
+
const folio = page.element?.querySelector(`.pw-margin-bottom-${outside}`)
|
|
394
|
+
expect(folio?.textContent, `${page}`).toBe(page.blank ? undefined : String(page.number))
|
|
395
|
+
}
|
|
396
|
+
})
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
{project=first output="pw test"}
|
|
400
|
+
``` text
|
|
401
|
+
...
|
|
402
|
+
Test Files 1 passed (1)
|
|
403
|
+
Tests 3 passed (3)
|
|
404
|
+
...
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
[Testing your book](#testing) shows what else a test can see.
|
|
408
|
+
|
|
409
|
+
{#what-isnt-there-yet}
|
|
410
|
+
## What isn’t there yet
|
|
411
|
+
|
|
412
|
+
pulpweaver4 is still being built, and some of what a finished book needs
|
|
413
|
+
isn’t there yet. Each guide says what its part can’t do yet.
|
|
414
|
+
|
|
415
|
+
{#next}
|
|
416
|
+
## Next
|
|
417
|
+
|
|
418
|
+
- [Writing in Djot](#writing-in-djot): everything a chapter can hold.
|
|
419
|
+
- [Editions and media queries](#editions): more editions, and how each
|
|
420
|
+
is styled.
|
|
421
|
+
- [Lines and pages](#lines-and-pages): TeX’s line and page breaking
|
|
422
|
+
from CSS.
|
|
423
|
+
- [Citations](#citations): a bibliography, and citations in Chicago or
|
|
424
|
+
any CSL style.
|
|
425
|
+
- [For LaTeX users](#for-latex-users): what you know from LaTeX, and its
|
|
426
|
+
equivalent here.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Copyright 2018 The Crimson Pro Project Authors (https://github.com/Fonthausen/CrimsonPro)
|
|
2
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
3
|
+
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/symbols)
|
|
4
|
+
|
|
5
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
6
|
+
This license is copied below, and is also available with a FAQ at:
|
|
7
|
+
http://scripts.sil.org/OFL
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
12
|
+
-----------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
PREAMBLE
|
|
15
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
16
|
+
development of collaborative font projects, to support the font creation
|
|
17
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
18
|
+
open framework in which fonts may be shared and improved in partnership
|
|
19
|
+
with others.
|
|
20
|
+
|
|
21
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
22
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
23
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
24
|
+
redistributed and/or sold with any software provided that any reserved
|
|
25
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
26
|
+
however, cannot be released under any other type of license. The
|
|
27
|
+
requirement for fonts to remain under this license does not apply
|
|
28
|
+
to any document created using the fonts or their derivatives.
|
|
29
|
+
|
|
30
|
+
DEFINITIONS
|
|
31
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
32
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
33
|
+
include source files, build scripts and documentation.
|
|
34
|
+
|
|
35
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
36
|
+
copyright statement(s).
|
|
37
|
+
|
|
38
|
+
"Original Version" refers to the collection of Font Software components as
|
|
39
|
+
distributed by the Copyright Holder(s).
|
|
40
|
+
|
|
41
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
42
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
43
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
44
|
+
new environment.
|
|
45
|
+
|
|
46
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
47
|
+
writer or other person who contributed to the Font Software.
|
|
48
|
+
|
|
49
|
+
PERMISSION & CONDITIONS
|
|
50
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
51
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
52
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
53
|
+
Software, subject to the following conditions:
|
|
54
|
+
|
|
55
|
+
1) Neither the Font Software nor any of its individual components,
|
|
56
|
+
in Original or Modified Versions, may be sold by itself.
|
|
57
|
+
|
|
58
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
59
|
+
redistributed and/or sold with any software, provided that each copy
|
|
60
|
+
contains the above copyright notice and this license. These can be
|
|
61
|
+
included either as stand-alone text files, human-readable headers or
|
|
62
|
+
in the appropriate machine-readable metadata fields within text or
|
|
63
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
64
|
+
|
|
65
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
66
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
67
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
68
|
+
presented to the users.
|
|
69
|
+
|
|
70
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
71
|
+
Software shall not be used to promote, endorse or advertise any
|
|
72
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
73
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
74
|
+
permission.
|
|
75
|
+
|
|
76
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
77
|
+
must be distributed entirely under this license, and must not be
|
|
78
|
+
distributed under any other license. The requirement for fonts to
|
|
79
|
+
remain under this license does not apply to any document created
|
|
80
|
+
using the Font Software.
|
|
81
|
+
|
|
82
|
+
TERMINATION
|
|
83
|
+
This license becomes null and void if any of the above conditions are
|
|
84
|
+
not met.
|
|
85
|
+
|
|
86
|
+
DISCLAIMER
|
|
87
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
88
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
89
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
90
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
91
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
92
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
93
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
94
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
95
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# pulpweaver4's manual: the guides, in Djot, as a pulpweaver4 project
|
|
2
|
+
# (https://plans.inkylabs.com/pulpweaver#the-documentation-site). It ships
|
|
3
|
+
# in the core's npm package, and pulpweaver.inkylabs.com builds its pages
|
|
4
|
+
# from the web edition and publishes the print edition as a PDF.
|
|
5
|
+
title = "The pulpweaver4 Manual"
|
|
6
|
+
language = "en-US"
|
|
7
|
+
# In the order a reader takes them: the front matter, Start, the guides.
|
|
8
|
+
chapters = [
|
|
9
|
+
"chapters/front.dj",
|
|
10
|
+
"chapters/start/getting-started.dj",
|
|
11
|
+
"chapters/start/your-first-book.dj",
|
|
12
|
+
"chapters/start/for-latex-users.dj",
|
|
13
|
+
"chapters/guides/writing-in-djot.dj",
|
|
14
|
+
"chapters/guides/editions.dj",
|
|
15
|
+
"chapters/guides/lines-and-pages.dj",
|
|
16
|
+
"chapters/guides/citations.dj",
|
|
17
|
+
"chapters/guides/pdfs.dj",
|
|
18
|
+
"chapters/guides/colour-and-prepress.dj",
|
|
19
|
+
"chapters/guides/testing.dj",
|
|
20
|
+
"chapters/guides/lint-rules.dj",
|
|
21
|
+
"chapters/guides/plugins.dj",
|
|
22
|
+
"chapters/guides/in-a-web-page.dj",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[lint]
|
|
26
|
+
extends = ["recommended"]
|
|
27
|
+
|
|
28
|
+
[lint.rules]
|
|
29
|
+
unknown-label = "error"
|
|
30
|
+
|
|
31
|
+
# The site's pages, a page per chapter.
|
|
32
|
+
[editions.web]
|
|
33
|
+
media = "screen"
|
|
34
|
+
|
|
35
|
+
# The PDF manual, a 7 × 10 in book, held to the print-ready preset.
|
|
36
|
+
[editions.print]
|
|
37
|
+
media = "print"
|
|
38
|
+
page = "7in 10in"
|
|
39
|
+
lint = ["print-ready"]
|