@heroiclands/package-build 25.3.0 → 25.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/assets/styles/content-base.css +32 -0
- package/docs/api.md +30 -6
- package/docs/authoring/links-and-markup.md +136 -53
- package/docs/commands.md +2 -2
- package/docs/content-format.md +14 -6
- package/docs/diagnostics.md +12 -11
- package/docs/guides/writing-in-invented-scripts.md +62 -35
- package/docs/reference/format-details.md +6 -6
- package/docs/reference/note-types.md +15 -15
- package/docs/reference/theme-pages.md +26 -18
- package/engine/anchors.mjs +14 -0
- package/engine/code-fences.mjs +15 -6
- package/engine/content-blocks.mjs +4 -2
- package/engine/content-figures.mjs +19 -5
- package/engine/content-footnotes.mjs +60 -1
- package/engine/content-index.mjs +1 -1
- package/engine/content-render.mjs +59 -43
- package/engine/content-scripts.mjs +204 -42
- package/engine/content-spans.mjs +73 -5
- package/engine/content-verse.mjs +320 -192
- package/engine/first-use.mjs +43 -12
- package/engine/heading-attributes.mjs +2 -1
- package/engine/journals.mjs +8 -1
- package/engine/markdown-blocks.mjs +3 -2
- package/engine/markup-validation.mjs +17 -0
- package/engine/name-markup.mjs +1 -0
- package/engine/note-vocabulary.mjs +2 -2
- package/engine/pdf-render.mjs +34 -23
- package/engine/prose-lint.mjs +14 -2
- package/engine/run-rows.mjs +1 -1
- package/engine/sql-tables.mjs +1 -1
- package/engine/verse-format.mjs +77 -0
- package/engine/verse-metre.mjs +18 -9
- package/engine/verse-regions.mjs +181 -0
- package/engine/wikilink-pattern.mjs +31 -0
- package/engine/wikilink-syntax.mjs +2 -16
- package/package.json +1 -1
- package/site-theme/static/css/style.css +24 -0
- package/types/engine/code-fences.d.mts +1 -3
- package/types/engine/content-footnotes.d.mts +23 -0
- package/types/engine/content-scripts.d.mts +4 -3
- package/types/engine/content-spans.d.mts +3 -1
- package/types/engine/content-verse.d.mts +69 -74
- package/types/engine/name-markup.d.mts +5 -0
- package/types/engine/verse-format.d.mts +9 -0
- package/types/engine/verse-metre.d.mts +4 -4
- package/types/engine/verse-regions.d.mts +78 -0
- package/types/engine/wikilink-pattern.d.mts +17 -0
- package/types/engine/wikilink-syntax.d.mts +1 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @heroiclands/package-build
|
|
2
2
|
|
|
3
|
+
## 25.4.0
|
|
4
|
+
|
|
5
|
+
**Verse**
|
|
6
|
+
|
|
7
|
+
- Verse is written as a `.verse` div, or quoted inside prose as a `[…]{.verse}` span. An encoded div sets script beside Roman; an encoded quotation flows in the prose as script only.
|
|
8
|
+
- A canto break can carry a heading and an anchor.
|
|
9
|
+
- The formatter leaves verse untouched.
|
|
10
|
+
- Footnotes in an encoded work appear in its Roman column only, with one number and one definition each.
|
|
11
|
+
- A footnote inside any encoded passage appears after its script text, in the ordinary font.
|
|
12
|
+
|
|
13
|
+
**Upgrading**
|
|
14
|
+
|
|
15
|
+
- Rewrite each ```` ```verse ```` fence as `::: {.verse …}` (or `:::verse {…}`) with the same attributes, closed by `:::`. A verse fence is an error.
|
|
16
|
+
- Replace each typed `***` with `--- {.canto}` on its own line after a blank line, with a stanza on both sides. A typed `***` is an error.
|
|
17
|
+
|
|
3
18
|
## 25.3.0
|
|
4
19
|
|
|
5
20
|
**Verse**
|
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Every icon and image is covered by a provenance record stating `attribution`, `l
|
|
|
92
92
|
|
|
93
93
|
`package-build cdn publish --set <file> --name <display name>` uploads every icon and image the package has, shipped or not, to `<site.assets>/<contentPackage>/` in that flat layout, and writes the named set listing the pictures the package leaves out. It reads the bucket from `CDN_ENDPOINT`, `CDN_BUCKET`, `CDN_ACCESS_KEY_ID` and `CDN_SECRET_ACCESS_KEY`, in the environment or `.env.local`. See [publish pictures to the CDN](docs/guides/release-and-deploy.md#publish-pictures-to-the-cdn).
|
|
94
94
|
|
|
95
|
-
Leading captions,
|
|
95
|
+
Leading captions, fenced divs, inline spans, and verse quotations are described in [links and markup](docs/authoring/links-and-markup.md).
|
|
96
96
|
|
|
97
97
|
Cypress end-to-end suites use pinned Chrome for Testing 155.0.8059.84 by default
|
|
98
98
|
on macOS arm64 and Linux x64, downloaded once into a reusable cache. Select an
|
|
@@ -131,6 +131,38 @@
|
|
|
131
131
|
margin: 0;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/* A quotation stays within its prose paragraph; canto titles retain heading type. */
|
|
135
|
+
:is(.journal-entry-page, .journal-entry-content, .editor-content, .prosemirror)
|
|
136
|
+
.verse.verse-inline {
|
|
137
|
+
display: inline-block;
|
|
138
|
+
vertical-align: baseline;
|
|
139
|
+
max-inline-size: 100%;
|
|
140
|
+
margin: 0;
|
|
141
|
+
container-type: normal;
|
|
142
|
+
}
|
|
143
|
+
:is(.journal-entry-page, .journal-entry-content, .editor-content, .prosemirror)
|
|
144
|
+
.verse.verse-inline
|
|
145
|
+
.verse-stanza {
|
|
146
|
+
display: block;
|
|
147
|
+
margin: 0;
|
|
148
|
+
}
|
|
149
|
+
:is(.journal-entry-page, .journal-entry-content, .editor-content, .prosemirror)
|
|
150
|
+
.verse.verse-inline
|
|
151
|
+
.verse-stanza
|
|
152
|
+
+ .verse-stanza {
|
|
153
|
+
margin-top: 0.5em;
|
|
154
|
+
}
|
|
155
|
+
:is(.journal-entry-page, .journal-entry-content, .editor-content, .prosemirror)
|
|
156
|
+
.verse
|
|
157
|
+
.verse-canto-heading {
|
|
158
|
+
display: block;
|
|
159
|
+
margin: 0.5em 0;
|
|
160
|
+
font-family: sans-serif;
|
|
161
|
+
font-size: 1.1em;
|
|
162
|
+
font-weight: bold;
|
|
163
|
+
line-height: 1.3;
|
|
164
|
+
}
|
|
165
|
+
|
|
134
166
|
/* Logical stanzas share labels across native and Roman presentations. */
|
|
135
167
|
:is(.journal-entry-page, .journal-entry-content, .editor-content, .prosemirror) .verse {
|
|
136
168
|
margin: 1.5rem 0;
|
package/docs/api.md
CHANGED
|
@@ -1339,6 +1339,29 @@ index for checking page links.
|
|
|
1339
1339
|
|
|
1340
1340
|
`createRenderer(target, options?)` builds the one markdown-it configuration every target renders through. `target` is `"foundry"`, `"web"`, `"preview"` or `"book"`. The renderer holds the configured parser (`md`), the names of the plugins installed (`plugins`), and three functions: `prepare` writes the constructs markdown-it has no syntax for — marked text, captioned items, named blocks, verse and alerts — as HTML between blank lines; `render` prepares and renders to HTML; `renderInline` renders one inline run. The `book` target parses only, and its Typst stage reads the tokens.
|
|
1341
1341
|
|
|
1342
|
+
Verse blocks are `::: {.verse ...}` or `:::verse {...}`; their raw bodies are
|
|
1343
|
+
parsed with inline Markdown through the shared verse structure. Inline
|
|
1344
|
+
`[text/..line//]{.verse}` quotations retain span wrappers inside prose. A blank
|
|
1345
|
+
line followed by `--- {.canto #id title="Heading"}` supplies a titled canto
|
|
1346
|
+
boundary without opening a journal page. `verseDivPlugin` from
|
|
1347
|
+
`engine/verse-regions.mjs` emits `verse_div` tokens before Markdown block
|
|
1348
|
+
interpretation. `renderVerseQuotes` emits inline-safe HTML from the same logical
|
|
1349
|
+
model; the book's `verse_inline` token parses quoted lines in the note's footnote
|
|
1350
|
+
environment. A canto title is heading metadata, while its encoder receives the
|
|
1351
|
+
standard Roman canto control. Encoded verse divs produce paired
|
|
1352
|
+
script and Roman presentations. Encoded verse spans produce ordinary script-only
|
|
1353
|
+
inline text with encoded verse controls, while unencoded quotations retain their
|
|
1354
|
+
Roman line and stanza layout. Defined footnote references are excluded before
|
|
1355
|
+
encoding: divs retain the references only in their Roman presentation; all
|
|
1356
|
+
encoded spans restore references after their script wrapper. Display generation
|
|
1357
|
+
adds no duplicate reference, number, definition or backlink.
|
|
1358
|
+
|
|
1359
|
+
`parseVerse(body, {footnotes})` accepts the same-note set of defined footnote
|
|
1360
|
+
labels when parsing a detached body; `scanVerse` obtains that context from the
|
|
1361
|
+
complete source. Reference-only positions contribute no work shape. A wholly
|
|
1362
|
+
reference-only body carries its references in `model.notes`, rendered once
|
|
1363
|
+
outside native-font wrappers without a verse row or label.
|
|
1364
|
+
|
|
1342
1365
|
| Export | Signature | Returns | Use it when |
|
|
1343
1366
|
| ---------------- | ---------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
|
|
1344
1367
|
| `createRenderer` | `createRenderer(target, options?)` | `{ target, md, plugins, prepare, render, renderInline }` | Rendering a note body for one target with the rules every target shares. |
|
|
@@ -2497,12 +2520,13 @@ Not a JavaScript module — this subpath entry exists so tooling (bundlers, `imp
|
|
|
2497
2520
|
|
|
2498
2521
|
The engine wildcard subpath also exposes the body parsers below. Their figure exports operate on leading captions.
|
|
2499
2522
|
|
|
2500
|
-
| Module | Exports
|
|
2501
|
-
| ---------------------------- |
|
|
2502
|
-
| `engine/content-figures.mjs` | `FIGURE_NAMES`, `FIGURE_CLASSES`, `scanFigures`, `numberFigures`, `renderFigureBlocks`
|
|
2503
|
-
| `engine/content-blocks.mjs` | `BLOCK_NAMES`, `BLOCK_CONTAINERS`, `scanBlocks`, `renderBlocks`, `renderWithheldSections`
|
|
2504
|
-
| `engine/content-verse.mjs` | `verseLines`, `verseStanzas`, `inlineVerse`, `verseMarkdown`, `scanVerse`, `renderVerse`
|
|
2505
|
-
| `engine/
|
|
2523
|
+
| Module | Exports | Contract |
|
|
2524
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2525
|
+
| `engine/content-figures.mjs` | `FIGURE_NAMES`, `FIGURE_CLASSES`, `scanFigures`, `numberFigures`, `renderFigureBlocks` | Scan leading captions and their next supported blocks; `numbered` distinguishes `:` and `:@`. `type` may override inference; `example` is supported. `FIGURE_CLASSES` retains built-in styled classes, not a closed author vocabulary. |
|
|
2526
|
+
| `engine/content-blocks.mjs` | `BLOCK_NAMES`, `BLOCK_CONTAINERS`, `scanBlocks`, `renderBlocks`, `renderWithheldSections` | Read div and secret fences; generic div records have `name: "div"` and no generated title. Scanning includes verse errors. |
|
|
2527
|
+
| `engine/content-verse.mjs` | `verseLines`, `verseStanzas`, `inlineVerse`, `parseVerse`, `verseMarkdown`, `scanVerse`, `renderVerse`, `renderVerseQuotes` | Read `.verse` divs and quotations, validate metadata and source positions, and share logical lines, stanza labels and titled canto headings across targets. |
|
|
2528
|
+
| `engine/verse-regions.mjs` | `verseRegions`, `verseDivPlugin` | Locate opaque raw verse div regions and install their block token rule before ordinary Markdown interpretation. |
|
|
2529
|
+
| `engine/content-spans.mjs` | `spanMarkdownPlugin`, `scanSpans`, `renderSpans` | Parse bracket spans after recognized links. The scanner returns spans, the exact `.name` inventory and located errors, retaining visible text and attribute positions; rendering preserves inline Markdown and permitted attributes. |
|
|
2506
2530
|
|
|
2507
2531
|
Inline `.secret` spans preserve their inline content, name classes and
|
|
2508
2532
|
attributes. Site rendering uses a separate show/hide button and content span,
|
|
@@ -260,7 +260,7 @@ The caption attaches to exactly the next supported block:
|
|
|
260
260
|
| Markdown table | `table` | Table |
|
|
261
261
|
| Image, Markdown or wikilink | `figure` | Figure |
|
|
262
262
|
| SQL fence, including backtick SQL | `table` | Table |
|
|
263
|
-
| Verse
|
|
263
|
+
| Verse div | `verse` | Poem |
|
|
264
264
|
| Any other code fence | `code` | Code |
|
|
265
265
|
| Paragraph, quote block or fenced div | `prose` | Prose |
|
|
266
266
|
|
|
@@ -409,10 +409,10 @@ Foundry renders a secret section; the website renders an expandable spoiler, and
|
|
|
409
409
|
|
|
410
410
|
### Verse
|
|
411
411
|
|
|
412
|
-
A
|
|
412
|
+
A `.verse` div sets a version of a work, whether poetry or prose. `/` ends a
|
|
413
413
|
logical line. Source newlines otherwise join with whitespace, so prose can wrap
|
|
414
414
|
across source lines. A blank line or `//` ends a stanza (a paragraph); a line
|
|
415
|
-
|
|
415
|
+
of `--- {.canto}`, preceded by a blank line, ends a canto (a section). The last line before either
|
|
416
416
|
boundary needs no `/`. A literal slash in text is written `\/`; slashes inside
|
|
417
417
|
Markdown syntax, such as a link destination, remain syntax.
|
|
418
418
|
|
|
@@ -421,33 +421,34 @@ level, and are removed from the display. They may follow `/` on the same source
|
|
|
421
421
|
line. Leading spaces do not set indentation. A period beginning a continuation
|
|
422
422
|
source line is literal text when the preceding text has no logical line ending.
|
|
423
423
|
Periods inside the first inline span can set indentation; periods in later spans
|
|
424
|
-
are literal. Tabs inside a verse
|
|
424
|
+
are literal. Tabs inside a verse div are errors. The div body is opaque to Markdown block syntax:
|
|
425
|
+
lines beginning `- `, `1. `, `# `, `> ` or four spaces stay verse text.
|
|
425
426
|
|
|
426
427
|
These two bodies have the same lines and indentation:
|
|
427
428
|
|
|
428
|
-
|
|
429
|
-
|
|
429
|
+
```markdown
|
|
430
|
+
::: {.verse lang=en}
|
|
430
431
|
To be or not to be,/
|
|
431
432
|
..that is the question!
|
|
432
|
-
|
|
433
|
+
:::
|
|
433
434
|
|
|
434
|
-
|
|
435
|
+
::: {.verse lang=en}
|
|
435
436
|
To be or not to be,/..that is the question!
|
|
437
|
+
:::
|
|
436
438
|
```
|
|
437
|
-
````
|
|
438
439
|
|
|
439
440
|
Verse is upright by default. English text accepts Markdown emphasis; other
|
|
440
441
|
languages use their declared [script emphasis](#emphasis-in-a-script). Inline
|
|
441
442
|
links, names, language spans and footnotes keep their ordinary meanings.
|
|
442
443
|
The optional `form=` records the author's literary form, `lang=` identifies the
|
|
443
444
|
language, and `font=` selects a face. `enc=` selects an encoding document. An
|
|
444
|
-
optional `#id` addresses the
|
|
445
|
+
optional `#id` addresses the div. `scan=` checks a declared metre.
|
|
445
446
|
|
|
446
|
-
|
|
447
|
+
On a div, a concrete `enc=` draws the original in its script on the left and the same text
|
|
447
448
|
in Roman on the right. Write the original once, with no column prefixes. Each
|
|
448
449
|
logical line aligns with its counterpart at full weight; indentation and breaks
|
|
449
450
|
match. `⟦…⟧` codage draws glyphs on the left and remains codage on the right.
|
|
450
|
-
Names, nested language choices and `lang=zxx` gaps retain their scope. A
|
|
451
|
+
Names, nested language choices and `lang=zxx` gaps retain their scope. A div
|
|
451
452
|
with no `enc=`, or with `enc=default`, has one Roman column. The content index's
|
|
452
453
|
`runs` relation records the authored original once, in its language and encoding.
|
|
453
454
|
|
|
@@ -467,21 +468,21 @@ the beats of one line, a whole number above zero. `kind` is `accentual`, the
|
|
|
467
468
|
only kind: a beat falls on a stressed syllable, and the length of a syllable
|
|
468
469
|
is not counted.
|
|
469
470
|
|
|
470
|
-
A verse
|
|
471
|
+
A verse div that states `scan=` with the declared name, and `lang=` with a
|
|
471
472
|
language whose `note` names a language note stating
|
|
472
473
|
[`data.sounds.stress`](../reference/format-details.md#a-languages-register-sounds-and-history),
|
|
473
474
|
is counted line by line. A line that cannot have the metre's beats is a warning
|
|
474
475
|
at that line:
|
|
475
476
|
|
|
476
|
-
|
|
477
|
-
|
|
477
|
+
```markdown
|
|
478
|
+
::: {.verse form=epic scan=hexameter lang=vyl}
|
|
478
479
|
Thiruthriman sorimamen, ul alathas kedis alatha valmazor,
|
|
480
|
+
:::
|
|
479
481
|
```
|
|
480
|
-
````
|
|
481
482
|
|
|
482
483
|
> ``this line has 4 beats (5 with secondary beats); the metre `hexameter` has 6``
|
|
483
484
|
|
|
484
|
-
`scan=` uses the
|
|
485
|
+
`scan=` uses the div's one language to count beats. If a verse line contains
|
|
485
486
|
a run in another language, the build does not scan that run with the fence
|
|
486
487
|
language's stress rules; it reports an error at the line:
|
|
487
488
|
|
|
@@ -512,77 +513,159 @@ Beats are counted this way:
|
|
|
512
513
|
- The caesura is not written.
|
|
513
514
|
|
|
514
515
|
`scan=` is refused where it cannot mean anything: a name no `data.metres`
|
|
515
|
-
declares, a
|
|
516
|
-
count; the
|
|
516
|
+
declares, a div with no `lang=`, a language without a stress rule. A div with no `scan=` is not counted. Readers see nothing of the
|
|
517
|
+
count; the div carries `data-scan` with the metre's name.
|
|
517
518
|
|
|
518
|
-
To number and caption a poem, put a leading numbered caption before the verse
|
|
519
|
+
To number and caption a poem, put a leading numbered caption before the verse div:
|
|
519
520
|
|
|
520
|
-
|
|
521
|
+
```markdown
|
|
521
522
|
:@ A song sung by the harbor watch. {#watch-song}
|
|
522
523
|
|
|
523
|
-
|
|
524
|
+
::: {.verse form=ballad}
|
|
524
525
|
The watch has gone to sea,/
|
|
525
526
|
The lantern marks the shore.
|
|
527
|
+
:::
|
|
526
528
|
```
|
|
527
|
-
````
|
|
528
529
|
|
|
529
530
|
This uses the **Poem** counter, so `{{ref "#watch-song"}}` reads **Poem 1**. Use `:` for a caption without a number.
|
|
530
531
|
|
|
531
532
|
#### Versions and stanza labels
|
|
532
533
|
|
|
533
|
-
`work=<key>` names a work within the page. Every
|
|
534
|
+
`work=<key>` names a work within the page. Every div with that key is a version
|
|
534
535
|
of the same work. Each stanza opens with its automatically counted label: `1`,
|
|
535
536
|
`2`, and so on for a work with no canto break, or `1:1`, `1:2`, `2:1`, and so on
|
|
536
|
-
when the
|
|
537
|
+
when the div contains cantos. Stanza numbering starts at one in each canto.
|
|
537
538
|
The website, Foundry journals and book show the same labels. A paired original
|
|
538
|
-
has one label shared by both presentations. A
|
|
539
|
+
has one label shared by both presentations. A div without `work=` has no label.
|
|
539
540
|
|
|
540
541
|
Versions must have the same number of cantos and the same number of stanzas in
|
|
541
542
|
each canto. Their line counts can differ. A work with only one version is a
|
|
542
543
|
finding. Shape disagreements are findings at the opening lines of the versions,
|
|
543
|
-
naming the canto and the counts. A
|
|
544
|
+
naming the canto and the counts. A canto break at the edge of a div, or beside another
|
|
544
545
|
canto break with no intervening stanza, is a finding at the break itself.
|
|
546
|
+
Authored `***` inside verse is a finding.
|
|
545
547
|
|
|
546
548
|
This poem's English version and Sinale original share stanza `1`. The original
|
|
547
549
|
is authored once and displays as script beside Roman:
|
|
548
550
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
+
```markdown
|
|
552
|
+
::: {.verse form=lay work=asking lang=en}
|
|
551
553
|
A child comes up the hill at night/
|
|
552
554
|
.and leaves a loaf beneath the birch./
|
|
553
555
|
.She does not wait. She does not search/
|
|
554
556
|
the dark for us. We stand in sight.
|
|
555
|
-
|
|
557
|
+
:::
|
|
556
558
|
|
|
557
|
-
|
|
559
|
+
::: {.verse form=lay work=asking lang=sina enc=sinaveldikkoenc}
|
|
558
560
|
irtal nysse auldiho nalduho/
|
|
559
561
|
.penvai onsa tarnevinu halpi polpeho/
|
|
560
562
|
.ahi sennevi onsa ahi syltete onsa/
|
|
561
563
|
ehii nalduho setty ehii nelkis yinserseho
|
|
564
|
+
:::
|
|
562
565
|
```
|
|
563
|
-
````
|
|
564
566
|
|
|
565
|
-
Prose uses the same
|
|
567
|
+
Prose uses the same div and omits line-ending marks. Source lines join into
|
|
566
568
|
paragraphs. Both versions below have stanzas `1` and `2`; the original's paragraphs
|
|
567
569
|
also appear beside their Roman text:
|
|
568
570
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
+
```markdown
|
|
572
|
+
::: {.verse work=walking lang=en}
|
|
571
573
|
He walks the oath road.
|
|
572
574
|
|
|
573
575
|
I walk the oath road.
|
|
574
|
-
|
|
576
|
+
:::
|
|
575
577
|
|
|
576
|
-
|
|
578
|
+
::: {.verse work=walking lang=vyl enc=vylsemaronenc}
|
|
577
579
|
Lokazor lonak zaron.
|
|
578
580
|
|
|
579
581
|
Lokamen lonak zaron.
|
|
582
|
+
:::
|
|
580
583
|
```
|
|
581
|
-
````
|
|
582
584
|
|
|
583
585
|
See [work shape diagnostics](../diagnostics.md#a-worked-case-versions-of-a-work)
|
|
584
586
|
for how findings locate a disagreement.
|
|
585
587
|
|
|
588
|
+
#### Inline quotations
|
|
589
|
+
|
|
590
|
+
Quoted verse inside a prose paragraph uses a `.verse` span:
|
|
591
|
+
|
|
592
|
+
```markdown
|
|
593
|
+
The reply is [to be or not to be/..that is the question!//]{.verse} in the telling.
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
A quotation uses `/` for line endings and `//` for stanza endings, with the same
|
|
597
|
+
indentation and source-line joining as a div. It takes ordinary span attributes,
|
|
598
|
+
including `lang=` and `enc=`. An unencoded quotation draws Roman text with its
|
|
599
|
+
line and stanza layout. A concrete encoding draws only its script, continuously
|
|
600
|
+
inside the surrounding prose, like any encoded span. Its `/` and `//` reach the
|
|
601
|
+
encoder as verse controls, so a script with verse signs draws them. Only divs
|
|
602
|
+
have paired script and Roman columns.
|
|
603
|
+
Inline verse has no `work=`, `form=`, `scan=`, stanza labels or canto breaks.
|
|
604
|
+
Directions, speaker labels, links, names and shared note footnotes work inside it.
|
|
605
|
+
|
|
606
|
+
#### Footnotes in works and encoded spans
|
|
607
|
+
|
|
608
|
+
Footnote references are valid after a line or word inside verse. Their definitions
|
|
609
|
+
sit below the work, as ordinary note footnotes:
|
|
610
|
+
|
|
611
|
+
```markdown
|
|
612
|
+
::: {.verse work=walking lang=en}
|
|
613
|
+
He walks the oath road.[^image]
|
|
614
|
+
:::
|
|
615
|
+
|
|
616
|
+
::: {.verse work=walking lang=vyl enc=vylsemaronenc}
|
|
617
|
+
Lokazor lonak[^oath] zaron.
|
|
618
|
+
:::
|
|
619
|
+
|
|
620
|
+
[^image]: The road names the obligation as well as the route.
|
|
621
|
+
|
|
622
|
+
[^oath]: This word carries the oath image in the original.
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
The English reference renders normally. In the encoded original, the reference
|
|
626
|
+
appears only in the Roman column, beside the word it follows. The script column
|
|
627
|
+
has no marker. Displaying a line twice adds no duplicate number, definition or
|
|
628
|
+
backlink. References never add lines, stanzas or labels and never affect work
|
|
629
|
+
shape.
|
|
630
|
+
|
|
631
|
+
This rule also applies to every encoded span, whether or not it carries
|
|
632
|
+
`.verse`. A footnote marker is removed before encoding and restored after the
|
|
633
|
+
span's text, outside its script font, as an ordinary reference:
|
|
634
|
+
|
|
635
|
+
```markdown
|
|
636
|
+
The inscription reads [Lokazor lonak[^word] zaron.]{lang=vyl enc=vylsemaronenc}.
|
|
637
|
+
The reply is [Lokazor lonak[^reply] zaron./Lokamen lonak zaron.//]{.verse lang=vyl enc=vylsemaronenc}.
|
|
638
|
+
|
|
639
|
+
[^word]: A note about the inscription's wording.
|
|
640
|
+
|
|
641
|
+
[^reply]: A note about the reply's wording.
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
Markers never reach an encoder, draw a script glyph or cause an encoding finding.
|
|
645
|
+
The website, Foundry journals and book share the note's footnote numbering and
|
|
646
|
+
definitions.
|
|
647
|
+
|
|
648
|
+
#### Canto headings
|
|
649
|
+
|
|
650
|
+
A canto break stands alone after a blank line, with a stanza on both sides.
|
|
651
|
+
Its optional `title` appears as a heading and its optional `#id` is an anchor
|
|
652
|
+
within the work, without starting a separate Foundry journal page:
|
|
653
|
+
|
|
654
|
+
```markdown
|
|
655
|
+
::: {.verse lang=en}
|
|
656
|
+
The watch crosses the shore.
|
|
657
|
+
|
|
658
|
+
--- {.canto #choosing title="The Choosing"}
|
|
659
|
+
The captain raises the lamp.
|
|
660
|
+
:::
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
The heading appears once across an encoded div's presentations. Its title is
|
|
664
|
+
heading text, separate from the letters passed to the encoder. A valid break
|
|
665
|
+
supplies the encoder's standard Roman `***` canto control. `package-build format`
|
|
666
|
+
leaves each complete verse div and quotation byte for byte, including its
|
|
667
|
+
delimiters and attributes, while formatting surrounding prose.
|
|
668
|
+
|
|
586
669
|
#### Directions and speakers
|
|
587
670
|
|
|
588
671
|
A `.direction` span identifies an instruction or stage direction; `.speaker`
|
|
@@ -591,29 +674,29 @@ Each version writes its own directions and speaker names in its own language.
|
|
|
591
674
|
Write ordinary case; these classes do not rewrite the text. The classes are
|
|
592
675
|
valid outside verse as well.
|
|
593
676
|
|
|
594
|
-
|
|
595
|
-
|
|
677
|
+
```markdown
|
|
678
|
+
::: {.verse form=rite work=weighing lang=en}
|
|
596
679
|
Let the household enter. Let the creditor enter./
|
|
597
680
|
[The reader names the year of the reign, the season, the day, and the dead.]{.direction}/
|
|
598
681
|
One person of this household goes down to the West.
|
|
599
|
-
|
|
682
|
+
:::
|
|
600
683
|
|
|
601
|
-
|
|
684
|
+
::: {.verse form=rite work=weighing lang=khel enc=khelqalezuenc}
|
|
602
685
|
galun garqen. galun zeqatar./
|
|
603
686
|
[zethul nemar …]{.direction}/
|
|
604
687
|
yarul genar lazen elu garqen nizar ez ithnar.
|
|
605
|
-
|
|
688
|
+
:::
|
|
606
689
|
|
|
607
|
-
|
|
690
|
+
::: {.verse form=roll work=thresholds lang=en}
|
|
608
691
|
[The Captain]{.speaker}/
|
|
609
692
|
Is the stone here?
|
|
610
|
-
|
|
693
|
+
:::
|
|
611
694
|
|
|
612
|
-
|
|
695
|
+
::: {.verse form=roll work=thresholds lang=tarv enc=tarvsemaronenc}
|
|
613
696
|
[thrumar]{.speaker}/
|
|
614
697
|
eza goitsa ared ir denon sedon.
|
|
698
|
+
:::
|
|
615
699
|
```
|
|
616
|
-
````
|
|
617
700
|
|
|
618
701
|
Their text is encoded normally. The classes themselves are presentation hooks;
|
|
619
702
|
they add no emphasis, encoding controls or stanza boundaries. A direction alone
|
|
@@ -645,7 +728,7 @@ A scroll fence is a real code fence, so Markdown never reformats its body.
|
|
|
645
728
|
- **`rows=`** is the number of characters in a column, and **`cols=`** the
|
|
646
729
|
number of columns in a panel. Each is a whole number above zero, and either
|
|
647
730
|
may be left out.
|
|
648
|
-
- **`lang=`, `font=` and `enc=`** work as they do on a verse
|
|
731
|
+
- **`lang=`, `font=` and `enc=`** work as they do on a verse div. See
|
|
649
732
|
[marking language, font and encoding](#marking-language-font-and-encoding).
|
|
650
733
|
The text is encoded before layout. Own and composed lexical spellings precede
|
|
651
734
|
rows; a written separator follows the selected definition. An explicit `enc=`
|
|
@@ -733,7 +816,7 @@ Use the guillemet pairs instead of English double quotation marks or `<<` and
|
|
|
733
816
|
Whitespace is every Unicode space-separator (`Zs`) and U+0009 through U+000D.
|
|
734
817
|
A contiguous run of that whitespace is one word separator, written as the
|
|
735
818
|
chosen encoding specifies. A source newline joins as whitespace. In verse,
|
|
736
|
-
`/` ends a logical line, blank lines or `//` end stanzas, and
|
|
819
|
+
`/` ends a logical line, blank lines or `//` end stanzas, and `--- {.canto}` after a blank line
|
|
737
820
|
ends a canto. Visual indentation at a logical line boundary stays layout,
|
|
738
821
|
outside the encoded letters. Write `\/` for a literal slash.
|
|
739
822
|
|
|
@@ -774,7 +857,7 @@ face. An explicitly authored font remains a font choice.
|
|
|
774
857
|
|
|
775
858
|
A name's braces use the shared name controls. Resolved references encode only
|
|
776
859
|
their visible labels, retaining URLs and presentation cues. These keys apply
|
|
777
|
-
to spans, divs
|
|
860
|
+
to spans, divs and scroll fences. A scroll's selected font must
|
|
778
861
|
belong to a script whose note declares `direction: vertical-rl`.
|
|
779
862
|
|
|
780
863
|
### A language's script
|
|
@@ -1162,7 +1245,7 @@ that `lint` reports and that fails nothing:
|
|
|
1162
1245
|
| ``a span in non-English language `vyl` holds no bold or italic markup`` | Remove the markup, or escape its delimiter characters. |
|
|
1163
1246
|
| `` `vyl` marks emphasis with a word, not a mark; write the word `` | Remove the emphasis marks and write the word the language stresses with. |
|
|
1164
1247
|
| ``a div marked `lang=vyl font=semaron-kuriale enc=vylsemaronenc` holds paragraphs and line breaks only, not a list`` | Move the list out of the div. |
|
|
1165
|
-
| `` `font=` is read on a span, a div or a verse
|
|
1248
|
+
| `` `font=` is read on a span, a div or a verse div, not on a secret block `` | Put a marked div inside the secret block. |
|
|
1166
1249
|
| `` `vly` is read as a BCP 47 tag; did you mean the declared language `vyl`? `` (a warning) | Write the declared name, or ignore it when the tag is meant. |
|
|
1167
1250
|
|
|
1168
1251
|
A character the face does not draw is reported once per run, at its first
|
|
@@ -1319,7 +1402,7 @@ const lantern = "lit"; // the harbor light
|
|
|
1319
1402
|
```
|
|
1320
1403
|
````
|
|
1321
1404
|
|
|
1322
|
-
A fence named `sql
|
|
1405
|
+
A fence named `sql` or `pagelist` is a query. Verse uses a `.verse` div or quotation.
|
|
1323
1406
|
|
|
1324
1407
|
## SQL generated tables
|
|
1325
1408
|
|
|
@@ -1341,7 +1424,7 @@ A column's heading is its SQL alias, so `AS "Name"` is what a reader sees. A cel
|
|
|
1341
1424
|
| `entries` | Every note, stubs included. |
|
|
1342
1425
|
| `events` | One row per event a `lore`, `place` or `affiliation` note writes in `data.events`, with `whenSort` to order them by date. |
|
|
1343
1426
|
| `names` | Each authored `.name` span, with its containing NOTE Address, visible text, optional type/subtype and source line/column. |
|
|
1344
|
-
| `runs` | Each span, div and verse
|
|
1427
|
+
| `runs` | Each span, div and verse div marked with `lang=`, `font=` or `enc=`, with its containing NOTE Address, its `kind`, `lang` as written, the `tag` it resolves to, the `font` and `enc` it is set with (its own, inherited, or its language's [script](#a-languages-script)), and source line/column. See [marking language, font and encoding](#marking-language-font-and-encoding). |
|
|
1345
1428
|
| `natives` | One row per native form a language note's word states in `native`, with that note as its `language`, the word's place as `word`, its `form`, the entry's place as `native`, and its `enc`, `font` and `"text"`. See [what `enc=` takes](#what-enc-takes). |
|
|
1346
1429
|
| `words` | One row per word a language note writes in `data.words`, with that note as its `language`, its `position` and what it is built from. |
|
|
1347
1430
|
| `affixes` | One row per affix a language note writes in `data.affixes`, with that note as its `language`, its `position`, and each key the affix states: `form` (`NULL` on a zero affix), `zero`, `kind`, `given`, `"where"`, `gloss`, `attaches`, `replaces`, `attachesTo`, `lengthens`, `front`, `examples`, `barredAfter` and `tones`, then `written`, the form as a table prints it, `∅` for a zero affix. |
|
package/docs/commands.md
CHANGED
|
@@ -1097,7 +1097,7 @@ and `**Rendering**`, and `### Patch Changes` holding `**Miscellaneous**` and
|
|
|
1097
1097
|
|
|
1098
1098
|
**Verse**
|
|
1099
1099
|
|
|
1100
|
-
- A verse
|
|
1100
|
+
- A verse div keeps its line breaks.
|
|
1101
1101
|
- A stanza break renders as a blank line.
|
|
1102
1102
|
|
|
1103
1103
|
**Rendering**
|
|
@@ -2626,7 +2626,7 @@ with visible text, nullable type/subtype and original source line/column.
|
|
|
2626
2626
|
Local and dependency SQL schemas expose them through `names`; they travel in
|
|
2627
2627
|
the metadata artifact.
|
|
2628
2628
|
|
|
2629
|
-
Metadata includes each own note's spans, divs and verse
|
|
2629
|
+
Metadata includes each own note's spans, divs and verse divs marked with
|
|
2630
2630
|
`lang=`, `font=` or `enc=` under `runs`, with the language as written, its
|
|
2631
2631
|
resolved tag, font, encoding document Address and original source line/column.
|
|
2632
2632
|
Roman runs use the default encoding and receive no inferred script face.
|
package/docs/content-format.md
CHANGED
|
@@ -29,11 +29,11 @@ A nonempty note body creates one system-agnostic Foundry JournalEntry. Content b
|
|
|
29
29
|
|
|
30
30
|
Leading `:` captions describe the next supported block; `:@` captions also number it. The optional type accepts `figure`, `table`, `verse`, `code`, `prose`, and `example`. Captions support identifiers, classes and named attributes; unsupported following blocks are errors. See [captions and numbered references](authoring/links-and-markup.md#captions-and-numbered-references).
|
|
31
31
|
|
|
32
|
-
A `verse`
|
|
33
|
-
otherwise join. Blank lines or `//` end stanzas, and standalone
|
|
32
|
+
A `.verse` div (`::: {.verse ...}` or `:::verse {...}`) sets poetry or prose. `/` ends a logical line; source newlines
|
|
33
|
+
otherwise join. Blank lines or `//` end stanzas, and a standalone `--- {.canto}` after a blank line ends a canto.
|
|
34
34
|
Leading periods indent a logical line, including after `/` within a source line;
|
|
35
35
|
a period on a joined continuation line is text. `\/` writes a literal slash.
|
|
36
|
-
A concrete `enc=` sets the original once in two presentations, script on the left
|
|
36
|
+
A concrete `enc=` on a div sets the original once in two presentations, script on the left
|
|
37
37
|
and Roman on the right, aligned by logical line at full weight. No `enc=`, or
|
|
38
38
|
`enc=default`, produces one Roman column. Inline names, codage, language gaps and
|
|
39
39
|
footnotes retain their meaning. `work=<key>` groups versions within the page,
|
|
@@ -44,13 +44,21 @@ side is a finding at that separator. `.direction` and `.speaker` spans identify
|
|
|
44
44
|
instructions and speakers inside or outside verse, retain plain presentation
|
|
45
45
|
hooks in HTML and Typst, and change neither encoding nor shape. See
|
|
46
46
|
[verse and worked examples](authoring/links-and-markup.md#verse). Its numbered
|
|
47
|
-
caption uses the **Poem** label.
|
|
47
|
+
caption uses the **Poem** label. Inline quotations use `[text/..line//]{.verse}` with span presentation
|
|
48
|
+
attributes and no work, form, scan, canto or labels. An encoded quotation is
|
|
49
|
+
script-only and flows inside prose, with `/` and `//` drawn through its encoding;
|
|
50
|
+
an unencoded quotation retains Roman verse layout. Footnotes are excluded from
|
|
51
|
+
encoding: an encoded div shows each reference only beside its Roman word, and
|
|
52
|
+
every encoded span restores its references after the span, outside the script
|
|
53
|
+
font. A reference adds no line or stanza and creates no display duplicate. `--- {.canto #id title="Heading"}`
|
|
54
|
+
adds a visible canto heading and anchor inside its work. Authored `***` is a
|
|
55
|
+
finding. The formatter preserves complete verse divs and spans byte for byte. Generic `:::` divs and `[inline spans]{.class}`
|
|
48
56
|
accept attributes; see [fenced divs](authoring/links-and-markup.md#fenced-divs)
|
|
49
57
|
and [inline spans](authoring/links-and-markup.md#inline-spans).
|
|
50
58
|
|
|
51
|
-
A code fence with language `scroll` sets text in a script whose script note states `direction: vertical-rl` as columns, top to bottom, read from the right. The lines of a paragraph are joined, and each paragraph starts a fresh column. `rows=N` is the characters in a column and `cols=M` the columns in a panel, each a whole number above zero; `lang=`, `font=` and `enc=` mark the text as on a verse
|
|
59
|
+
A code fence with language `scroll` sets text in a script whose script note states `direction: vertical-rl` as columns, top to bottom, read from the right. The lines of a paragraph are joined, and each paragraph starts a fresh column. `rows=N` is the characters in a column and `cols=M` the columns in a panel, each a whole number above zero; `lang=`, `font=` and `enc=` mark the text as on a verse div, an explicit `enc=` selects an encoding document and its language and font. The site, the preview and Foundry set it with `writing-mode: vertical-rl` in a panel that scrolls sideways from the right; the book draws its panels as images from the face's outlines, each with its roman text as alt text. A scroll fence in a script written in lines is an error. See [scrolls](authoring/links-and-markup.md#scrolls).
|
|
52
60
|
|
|
53
|
-
A span, generic div, verse or scroll fence uses `enc=default` unless it selects
|
|
61
|
+
A span, generic div, verse div or scroll fence uses `enc=default` unless it selects
|
|
54
62
|
an encoding document. `enc=` is an Address whose default type is `doc`; the
|
|
55
63
|
document names its language and font, and explicit `lang=` or `font=` values
|
|
56
64
|
must agree. Each encoding tries authored native writings, complete parts and
|
package/docs/diagnostics.md
CHANGED
|
@@ -302,27 +302,28 @@ without collecting problems. The rules are under
|
|
|
302
302
|
[Versions of a work](authoring/links-and-markup.md#versions-and-stanza-labels)
|
|
303
303
|
share a page-local `work=` key and the same stanza shape. For example:
|
|
304
304
|
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
```markdown
|
|
306
|
+
::: {.verse work=watch lang=en}
|
|
307
307
|
The watch arrives.
|
|
308
308
|
|
|
309
309
|
The harbor wakes.
|
|
310
|
-
|
|
310
|
+
:::
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
::: {.verse work=watch lang=en}
|
|
313
313
|
Another telling has only one stanza.
|
|
314
|
+
:::
|
|
314
315
|
```
|
|
315
|
-
````
|
|
316
316
|
|
|
317
317
|
The opening lines receive findings naming canto 1 and its differing stanza
|
|
318
318
|
counts, two and one. The first version is included in the disagreement. A key
|
|
319
|
-
used by only one version is also a finding at that
|
|
319
|
+
used by only one version is also a finding at that div's opening line.
|
|
320
320
|
|
|
321
321
|
A concrete `enc=` creates its own script and Roman presentations from one
|
|
322
322
|
original; the display does not add a second authored version. Source newlines
|
|
323
|
-
join unless `/` ends the line. Blank lines and `//` end stanzas. A
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
join unless `/` ends the line. Blank lines and `//` end stanzas. A canto uses
|
|
324
|
+
`--- {.canto}` on its own line after a blank line. A leading, trailing or
|
|
325
|
+
consecutive canto separator without a stanza between is located at the break
|
|
326
|
+
itself. Authored `***` is a finding. Language and encoding findings retain their positions in the single
|
|
326
327
|
authored original, including text inside names, directions and speaker labels.
|
|
327
328
|
The content index records that original once in `runs`.
|
|
328
329
|
|
|
@@ -601,8 +602,8 @@ finding naming its `⟦U+XXXX⟧` spelling. Use that notation, or the chosen
|
|
|
601
602
|
encoding's codage name, inside the literal markers. The encoder checks the
|
|
602
603
|
codes; the Roman validator leaves their contents immutable.
|
|
603
604
|
|
|
604
|
-
A verse
|
|
605
|
-
stanzas, and
|
|
605
|
+
A verse div uses `/` for logical line endings, `//` or blank lines for
|
|
606
|
+
stanzas, and `--- {.canto}` after a blank line for cantos. A literal slash is written `\/`.
|
|
606
607
|
Visual indentation at a logical line boundary does not add periods to the
|
|
607
608
|
encoded text; a period on a joined continuation line remains text. Source positions survive Markdown escapes and nested
|
|
608
609
|
`.emph` or `.name` spans.
|