@heroiclands/package-build 23.12.8 → 23.13.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 +48 -0
- package/README.md +1 -1
- package/assets/preview/gitea.ini +2 -2
- package/assets/styles/content-base.css +143 -23
- package/bin/content-commands.mjs +15 -4
- package/bin/package-build-preview.mjs +2 -2
- package/docs/api.md +18 -18
- package/docs/authoring/links-and-markup.md +156 -22
- package/docs/commands.md +22 -7
- package/docs/configuration.md +1 -1
- package/docs/content-format.md +3 -3
- package/docs/diagnostics.md +42 -0
- package/docs/reference/format-details.md +99 -22
- package/docs/reference/note-types.md +8 -1
- package/docs/reference/theme-pages.md +51 -0
- package/docs/source-preview.md +1 -1
- package/engine/anchors.mjs +2 -2
- package/engine/code-fences.mjs +3 -3
- package/engine/content-blocks.mjs +3 -3
- package/engine/content-figures.mjs +5 -5
- package/engine/content-index.mjs +1 -1
- package/engine/content-scripts.mjs +55 -21
- package/engine/content-spans.mjs +2 -2
- package/engine/content-verse.mjs +750 -0
- package/engine/dictionary-rows.mjs +15 -4
- package/engine/field-reference.mjs +4 -4
- package/engine/first-use.mjs +17 -27
- package/engine/key-case-collisions.mjs +136 -0
- package/engine/language-data.mjs +203 -6
- package/engine/language-terms.mjs +74 -5
- package/engine/map-lexicon.mjs +42 -23
- package/engine/names.mjs +36 -9
- package/engine/note-matter.mjs +66 -0
- package/engine/pdf-build.mjs +1 -0
- package/engine/pdf-render.mjs +107 -18
- package/engine/read-stdin.mjs +29 -0
- package/engine/run-rows.mjs +2 -2
- package/engine/run-words.mjs +4 -111
- package/engine/site-build.mjs +4 -4
- package/engine/site-preview.mjs +14 -14
- package/engine/sql-tables.mjs +20 -3
- package/engine/web-wikilinks.mjs +1 -1
- package/engine/word-forms.mjs +349 -0
- package/engine/word-terms.mjs +9 -0
- package/hugo-theme/static/css/style.css +92 -14
- package/package.json +2 -2
- package/types/engine/code-fences.d.mts +3 -3
- package/types/engine/content-scripts.d.mts +8 -4
- package/types/engine/content-verse.d.mts +240 -0
- package/types/engine/dictionary-rows.d.mts +10 -0
- package/types/engine/field-reference.d.mts +1 -1
- package/types/engine/key-case-collisions.d.mts +28 -0
- package/types/engine/language-data.d.mts +0 -2
- package/types/engine/map-lexicon.d.mts +19 -6
- package/types/engine/names.d.mts +34 -3
- package/types/engine/note-matter.d.mts +48 -0
- package/types/engine/read-stdin.d.mts +11 -0
- package/types/engine/run-rows.d.mts +2 -2
- package/types/engine/run-words.d.mts +0 -15
- package/types/engine/sql-tables.d.mts +4 -1
- package/types/engine/web-wikilinks.d.mts +1 -1
- package/types/engine/word-forms.d.mts +82 -0
- package/engine/content-poetry.mjs +0 -240
- package/types/engine/content-poetry.d.mts +0 -58
|
@@ -91,7 +91,11 @@ the attribute adds no book presentation.
|
|
|
91
91
|
|
|
92
92
|
`package-build lint` warns when an indexed name or alias uses `.name`
|
|
93
93
|
instead of a link, when the same name is marked or linked again, or when a
|
|
94
|
-
`.name` span or Markdown link uses a short form before its full name.
|
|
94
|
+
`.name` span or Markdown link uses a short form before its full name. A
|
|
95
|
+
`.name` span with a `data-type` is compared only with notes of that type (and
|
|
96
|
+
subtype, when it names one), so a lineage that shares its name with a place
|
|
97
|
+
note is marked `[Theinuvael]{.name data-type="affiliation/lineage"}` and
|
|
98
|
+
draws no warning to link the place. Only
|
|
95
99
|
marked names and authored link labels count toward these rules. A wikilink
|
|
96
100
|
introduces its note under whatever label reads naturally, so
|
|
97
101
|
`[[place-arden|Arden]]` needs no earlier `Arden Vale`, and an article
|
|
@@ -108,9 +112,8 @@ A name span can sit inside emphasis:
|
|
|
108
112
|
```
|
|
109
113
|
|
|
110
114
|
The marked name is `Joe Blow`. Sites and books display `.name` text in bold, including
|
|
111
|
-
inside an emphasized phrase.
|
|
112
|
-
|
|
113
|
-
explicit name span or link needs no such advisory.
|
|
115
|
+
inside an emphasized phrase. Bold itself is emphasis, never a name: a bold
|
|
116
|
+
label such as `**Strength**:` draws no warning, whatever names the index holds.
|
|
114
117
|
|
|
115
118
|
These are warnings at each occurrence's `file:line:column`; they do not make
|
|
116
119
|
a valid package fail. The check reads authored prose outside headings,
|
|
@@ -191,11 +194,11 @@ The caption attaches to exactly the next supported block:
|
|
|
191
194
|
| Markdown table | `table` | Table |
|
|
192
195
|
| Image, Markdown or wikilink | `figure` | Figure |
|
|
193
196
|
| SQL fence, including backtick SQL | `table` | Table |
|
|
194
|
-
|
|
|
197
|
+
| Verse fence | `verse` | Poem |
|
|
195
198
|
| Any other code fence | `code` | Code |
|
|
196
199
|
| Paragraph, quote block or fenced div | `prose` | Prose |
|
|
197
200
|
|
|
198
|
-
The optional `type` attribute overrides inference and accepts `figure`, `table`, `
|
|
201
|
+
The optional `type` attribute overrides inference and accepts `figure`, `table`, `verse`, `code`, `prose`, and `example`. `type=example` uses **Example 1**, **Example 2**, and so on. It does not allow an unsupported target. A heading, list, thematic break, another caption or end of document after a caption is an error. Caption markers without separating spaces or caption text are errors too.
|
|
199
202
|
|
|
200
203
|
Identifiers are optional and must be unique within the note. Classes are unrestricted; `.border` uses the shared border style, while other classes can be styled by the medium. On a captioned table or SQL fence, `.full-width` sets the table across the page in a PDF book instead of in one column (`: Regional trade routes {.full-width}`); the other surfaces ignore it. Named attributes use `key=value`, with quoted values for text containing spaces. Use `#id` and `.class` rather than `id=` and `class=`; event-handler attributes are refused.
|
|
201
204
|
|
|
@@ -338,9 +341,9 @@ A secret block can contain alerts and general divs. It cannot contain another se
|
|
|
338
341
|
|
|
339
342
|
Foundry renders a secret section; the website renders an expandable spoiler, and the book renders a labeled box. An untitled secret takes its normal default title, and a Foundry secret without an id receives an id derived from its body. The presentation does not make published HTML private: deliberately inspecting generated source can reveal its content. Use YAML comments for information that must never be published.
|
|
340
343
|
|
|
341
|
-
###
|
|
344
|
+
### Verse
|
|
342
345
|
|
|
343
|
-
Use a code fence with the language `
|
|
346
|
+
Use a code fence with the language `verse` to preserve verse lines and stanzas. Every nonblank source line
|
|
344
347
|
is one verse line; blank lines separate stanzas. Inline emphasis, links and
|
|
345
348
|
footnotes work as they do in prose. The fence itself adds no title, caption or
|
|
346
349
|
number.
|
|
@@ -366,11 +369,11 @@ an error. Interior spaces are preserved on a best-effort basis.
|
|
|
366
369
|
|
|
367
370
|
For example, a line with four leading spaces and a line with six leading spaces
|
|
368
371
|
render at levels zero and `i1` respectively. This also works when the entire
|
|
369
|
-
fence is indented inside a list item.
|
|
372
|
+
fence is indented inside a list item. Verse is upright by default; use normal
|
|
370
373
|
Markdown emphasis when italics are part of the poem.
|
|
371
374
|
|
|
372
375
|
````markdown
|
|
373
|
-
```
|
|
376
|
+
```verse {form=ballad meter="common meter" rhyme=ABCB syllables="8,6,8,6" lang=en}
|
|
374
377
|
The lantern burns beside the gate,
|
|
375
378
|
The harbor sleeps below.
|
|
376
379
|
|
|
@@ -383,18 +386,19 @@ The optional `form`, `meter` and `rhyme` attributes record the author's intent;
|
|
|
383
386
|
the build does not infer stress, rhyme or pronunciation. `syllables` gives a
|
|
384
387
|
positive count for each verse line in order, separated by commas, with blank
|
|
385
388
|
stanza lines omitted. The build checks the number of counts, not the syllables
|
|
386
|
-
spoken. `
|
|
389
|
+
spoken. `numstep` numbers the lines, and `col1` and `col2` set the poem in
|
|
390
|
+
columns; see below. `lang` names the poem's language, `font` the font it is set in and
|
|
387
391
|
`map` the mapping its text is rewritten by; see
|
|
388
392
|
[marking language, font and mapping](#marking-language-font-and-mapping). An optional `#id`
|
|
389
393
|
addresses the poem itself. There are no `title` or `lines` attributes, and no
|
|
390
394
|
special punctuation for stress, pauses or refrains.
|
|
391
395
|
|
|
392
|
-
To number and caption a poem, put a leading numbered caption before the
|
|
396
|
+
To number and caption a poem, put a leading numbered caption before the verse fence:
|
|
393
397
|
|
|
394
398
|
````markdown
|
|
395
399
|
:@ A song sung by the harbor watch. {#watch-song}
|
|
396
400
|
|
|
397
|
-
```
|
|
401
|
+
```verse {form=ballad}
|
|
398
402
|
The watch has gone to sea,
|
|
399
403
|
The lantern marks the shore.
|
|
400
404
|
```
|
|
@@ -402,9 +406,90 @@ The lantern marks the shore.
|
|
|
402
406
|
|
|
403
407
|
This uses the **Poem** counter, so `{{ref "#watch-song"}}` reads **Poem 1**. Use `:` for a caption without a number.
|
|
404
408
|
|
|
409
|
+
#### Line numbers
|
|
410
|
+
|
|
411
|
+
`numstep=N` numbers the poem's lines, counting every verse line from the first
|
|
412
|
+
to the last across stanzas. `numstep=1` numbers every line, `numstep=5` every
|
|
413
|
+
fifth line, and `numstep=0`, the default, numbers none. The numbers sit in a
|
|
414
|
+
margin beside the lines, in a muted tone.
|
|
415
|
+
|
|
416
|
+
````markdown
|
|
417
|
+
```verse {numstep=5 lang=en}
|
|
418
|
+
The lantern burns beside the gate,
|
|
419
|
+
…
|
|
420
|
+
```
|
|
421
|
+
````
|
|
422
|
+
|
|
423
|
+
#### Verse in columns
|
|
424
|
+
|
|
425
|
+
A poem can be set beside its translation, line for line. `col1=` names what
|
|
426
|
+
the left column shows and `col2=` what the right column shows, and each
|
|
427
|
+
column stacks one or more **entries**, joined by `:`. An entry is
|
|
428
|
+
`language[/mapping[/font]]`:
|
|
429
|
+
|
|
430
|
+
- **`language`** names a language the poem's lines give, as `lang=` does.
|
|
431
|
+
- **`mapping`** names a [mapping note](#mapping-notes), which rewrites the
|
|
432
|
+
line before it is set. Left out, the line is set as written.
|
|
433
|
+
- **`font`** names a face or a generic family, as `font=` does. Left out, the
|
|
434
|
+
line is set in the roman serif.
|
|
435
|
+
|
|
436
|
+
A poem has at most two columns, and either may be left out. In every column
|
|
437
|
+
the first entry is set in the normal tone and each later one in grey.
|
|
438
|
+
|
|
439
|
+
With columns, the poem's body is written as **verse lines**, each a group of
|
|
440
|
+
lines separated by a blank line. Each line of a group is a span giving the
|
|
441
|
+
verse line in one language, `[text]{lang=…}`, or plain text in the poem's
|
|
442
|
+
`lang=`. The spans of a group may come in any order: each entry takes the
|
|
443
|
+
span in its own language. A line holding only `***` breaks the stanza.
|
|
444
|
+
|
|
445
|
+
Here the left column sets the Vylari in Semaron Kuriale through the `semaron`
|
|
446
|
+
mapping, and the right column gives the English over the Vylari in roman:
|
|
447
|
+
|
|
448
|
+
````markdown
|
|
449
|
+
```verse {numstep=5 lang=vyl col1=vyl/semaron/semaron-kuriale col2=en:vyl}
|
|
450
|
+
[Thiruthriman sorimamen,]{lang=vyl}
|
|
451
|
+
[The hallowed boundary I sing,]{lang=en}
|
|
452
|
+
|
|
453
|
+
[ul alathas kedis alatha valmazor, ul talothoi]{lang=vyl}
|
|
454
|
+
[and the one who walked it, and the stones]{lang=en}
|
|
455
|
+
|
|
456
|
+
***
|
|
457
|
+
|
|
458
|
+
[set down in the grass of the six hills]{lang=en}
|
|
459
|
+
lendthoi ir yormalis ol selthur malkothoi
|
|
460
|
+
|
|
461
|
+
[before a wall stood on any of them.]{lang=en}
|
|
462
|
+
pra kembothos us urkis ol alathoi thalezor.
|
|
463
|
+
```
|
|
464
|
+
````
|
|
465
|
+
|
|
466
|
+
The Vylari is written once, in roman, and the script is never typed: the
|
|
467
|
+
first entry of `col1=` maps the Vylari line into Semaron, and the second entry
|
|
468
|
+
of `col2=` sets the same line as written. The last two verse lines give their
|
|
469
|
+
Vylari as plain text, which takes the poem's `lang=vyl`.
|
|
470
|
+
|
|
471
|
+
Every target sets each verse line as one row: its number, when the poem is
|
|
472
|
+
numbered, then each column. Each row holds its columns level, so a long line
|
|
473
|
+
on one side never puts the other out of step. On a narrow screen or a narrow
|
|
474
|
+
journal, a row stacks its columns in order. A part set in a right-to-left face
|
|
475
|
+
stays in its column and runs right to left within it. The book sets the poem
|
|
476
|
+
as a grid with a row per verse line.
|
|
477
|
+
|
|
478
|
+
**The rules of a verse in columns:**
|
|
479
|
+
|
|
480
|
+
- `font=` and `map=` belong to the entries, not to the poem.
|
|
481
|
+
- Every verse line gives one span for each language its columns name, and
|
|
482
|
+
none for a language they do not.
|
|
483
|
+
- A line of a verse in columns is not indented, and a span there takes only
|
|
484
|
+
`lang=`.
|
|
485
|
+
- `syllables` gives one count per verse line, not per written line.
|
|
486
|
+
|
|
487
|
+
Each finding is an error at the text that is wrong; see
|
|
488
|
+
[a verse in columns](../diagnostics.md#a-worked-case-a-verse-in-columns).
|
|
489
|
+
|
|
405
490
|
## Marking language, font and mapping
|
|
406
491
|
|
|
407
|
-
Three keys go in the attribute block a span, a fenced div or a
|
|
492
|
+
Three keys go in the attribute block a span, a fenced div or a verse fence
|
|
408
493
|
already takes. Each is optional, and each does one thing:
|
|
409
494
|
|
|
410
495
|
- **`lang=`** names the language of the text. It becomes the element's
|
|
@@ -446,13 +531,13 @@ Daimela, helthos.
|
|
|
446
531
|
A poem takes the keys on its fence, beside its other attributes:
|
|
447
532
|
|
|
448
533
|
````markdown
|
|
449
|
-
```
|
|
534
|
+
```verse {form=epic lang=vyl font=semaron-kuriale map=semaron}
|
|
450
535
|
Zaron tholmeza,
|
|
451
536
|
daimela, helthos.
|
|
452
537
|
```
|
|
453
538
|
````
|
|
454
539
|
|
|
455
|
-
**A run inside a div or a
|
|
540
|
+
**A run inside a div or a verse fence inherits its keys**, and its own keys
|
|
456
541
|
override them. Here the gloss keeps the passage's language and map, and is set
|
|
457
542
|
in the page's serif:
|
|
458
543
|
|
|
@@ -590,7 +675,56 @@ Each word, case folded, is one of:
|
|
|
590
675
|
is `a`, `e`, `i`, `o` or `u`), letters such as `replaces: a` take the
|
|
591
676
|
place of those letters, and a stem that closes otherwise takes the suffix
|
|
592
677
|
whole. An affix that states no `replaces` makes no form here, whatever its
|
|
593
|
-
`attaches` says, because `attaches` is prose.
|
|
678
|
+
`attaches` says, because `attaches` is prose. A suffix stating
|
|
679
|
+
`attachesTo: [n, adj]` attaches only to words of those classes, and one
|
|
680
|
+
stating no `attachesTo` attaches to a word of every class;
|
|
681
|
+
- an agreeing form, where the language states `data.grammar.agreement`: a
|
|
682
|
+
word of one of its `classes` closing on one of its `endings` takes each
|
|
683
|
+
other ending in its place, and each form takes the `plural` rule;
|
|
684
|
+
- a participle, where the language states `data.grammar.participles`: a
|
|
685
|
+
verb closing on one of its `root` endings drops it, and each suffix it
|
|
686
|
+
names attaches to the root, agreeing where it closes on an agreement
|
|
687
|
+
ending.
|
|
688
|
+
|
|
689
|
+
**Agreement and participles, worked through in Vylari.** Vylari's adjectives
|
|
690
|
+
and pronouns agree with their noun by its endings, and its participles are
|
|
691
|
+
suffixes on the verb root. Its note states both beside its plural rule:
|
|
692
|
+
|
|
693
|
+
```yaml
|
|
694
|
+
affixes:
|
|
695
|
+
- form: "-andar"
|
|
696
|
+
gloss: "doing it: the present participle"
|
|
697
|
+
replaces: vowel
|
|
698
|
+
- form: "-thos"
|
|
699
|
+
gloss: "done, suffered: the past participle"
|
|
700
|
+
grammar:
|
|
701
|
+
plural:
|
|
702
|
+
- { ending: os, becomes: oi }
|
|
703
|
+
- { ending: on, becomes: oi }
|
|
704
|
+
- { ending: a, becomes: ai }
|
|
705
|
+
agreement:
|
|
706
|
+
classes: [adj, pron]
|
|
707
|
+
endings: [os, a, on]
|
|
708
|
+
participles:
|
|
709
|
+
root: [athen, ethen]
|
|
710
|
+
affixes: ["-andar", "-thos"]
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
With those, a run accepts:
|
|
714
|
+
|
|
715
|
+
| Lexicon word | Rule | Forms accepted |
|
|
716
|
+
| ----------------- | ----------- | ------------------------------------------------- |
|
|
717
|
+
| _alathos_, pron. | agreement | _alatha_, _alathon_, _alathoi_, _alathai_ |
|
|
718
|
+
| _dokathen_, v. | participles | _dokandar_ (_dok-_ + _-andar_), _dokthos_ |
|
|
719
|
+
| _dokathen_, v. | both | _doktha_, _dokthon_, _dokthoi_, _dokthai_ |
|
|
720
|
+
| _marendos_, n. m. | neither | _marendoi_ by the plural rule alone; no _marenda_ |
|
|
721
|
+
| _solkatora_, v. | participles | none: the verb closes on no `root` ending |
|
|
722
|
+
|
|
723
|
+
_-andar_ closes on no agreement ending, so _dokandar_ does not agree. A
|
|
724
|
+
near miss such as _alathe_ or _dokendar_ is still an unknown word.
|
|
725
|
+
`package-build lexicon vyl --map semaron --derived` lists every form the rules
|
|
726
|
+
give, each beside the word it comes from, so a puzzling finding can be checked
|
|
727
|
+
against what the rules produce.
|
|
594
728
|
|
|
595
729
|
A compound that is not a word whole is split at its hyphens and en dashes, and
|
|
596
730
|
each part is checked, so `zaron-lonak` passes when `zaron` and `lonak` do. An
|
|
@@ -731,7 +865,7 @@ plain text.
|
|
|
731
865
|
- **A span or a verse line** holds no emphasis, link, image, footnote,
|
|
732
866
|
wikilink, code or HTML, and no span but a marked one inside a div or a fence.
|
|
733
867
|
- **A div** holds paragraphs and line breaks only: no heading, list, block
|
|
734
|
-
quote, code fence,
|
|
868
|
+
quote, code fence, verse fence, table, rule, footnote definition or nested
|
|
735
869
|
block. Mark a poem's own fence instead of a div around it.
|
|
736
870
|
|
|
737
871
|
The text is read as written, so characters a run types need no escaping: `[`
|
|
@@ -764,7 +898,7 @@ that `lint` reports and that fails nothing:
|
|
|
764
898
|
| `` `thuravark-carved` is not a font of the map `semaron`; it is for `semaron-kuriale` `` | Set the run in a face the map lists, or list the face in `data.map.fonts`. |
|
|
765
899
|
| ``text marked `lang=vyl` is plain text and holds no emphasis`` | Remove the markup, or escape the character with a backslash. |
|
|
766
900
|
| ``a div marked `lang=vyl font=semaron-kuriale map=semaron` holds paragraphs and line breaks only, not a list`` | Move the list out of the div. |
|
|
767
|
-
| `` `font=` is read on a span, a div or a
|
|
901
|
+
| `` `font=` is read on a span, a div or a verse fence, not on a secret block `` | Put a marked div inside the secret block. |
|
|
768
902
|
| `` `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. |
|
|
769
903
|
|
|
770
904
|
A character the face does not draw is reported once per run, at its first
|
|
@@ -781,7 +915,7 @@ SELECT owner, kind, tag, font, line FROM runs WHERE lang = 'vyl' ORDER BY owner,
|
|
|
781
915
|
```
|
|
782
916
|
````
|
|
783
917
|
|
|
784
|
-
Its columns are `owner`, `kind` (`span`, `block` or `
|
|
918
|
+
Its columns are `owner`, `kind` (`span`, `block` or `verse`), `lang` as written,
|
|
785
919
|
the `tag` it resolves to (`NULL` when it resolves to none), `font`, `map`, `line`
|
|
786
920
|
and `column`. A run inside a div or a fence records the keys it inherits. See
|
|
787
921
|
[the `runs` relation](../reference/format-details.md#content-tables).
|
|
@@ -889,11 +1023,11 @@ A column's heading is its SQL alias, so `AS "Name"` is what a reader sees. A cel
|
|
|
889
1023
|
| `entries` | Every note, stubs included. |
|
|
890
1024
|
| `events` | One row per event a `lore`, `place` or `affiliation` note writes in `data.events`, with `whenSort` to order them by date. |
|
|
891
1025
|
| `names` | Each authored `.name` span, with its containing NOTE Address, visible text, optional type/subtype and source line/column. |
|
|
892
|
-
| `runs` | Each span, div and
|
|
1026
|
+
| `runs` | Each span, div and verse fence marked with `lang=`, `font=` or `map=`, with its containing NOTE Address, its `kind`, `lang` as written, the `tag` it resolves to, `font`, `map`, and source line/column. See [marking language, font and mapping](#marking-language-font-and-mapping). |
|
|
893
1027
|
| `maps` | One row per row of a mapping note's `data.map`, with its containing NOTE Address, the map's `name`, the `font` whose own row it is (`NULL` for a shared row), the row's 1-based place as `"row"`, and its `"from"`, `"to"`, `before` and `"at"`. See [mapping notes](#mapping-notes). |
|
|
894
1028
|
| `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 `map`, `font` and `"text"`. See [what `map=` takes](#what-map-takes). |
|
|
895
1029
|
| `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. |
|
|
896
|
-
| `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`, `lengthens`, `front`, `examples`, `barredAfter` and `tones`, then `written`, the form as a table prints it, `∅` for a zero affix.
|
|
1030
|
+
| `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. |
|
|
897
1031
|
| `fields` | One row per field a language note writes in `data.fields`, with that note as its `language`, its `position`, and the field's `name` and what it `holds`. |
|
|
898
1032
|
| `glossary` | One row per entry a culture or an affiliation writes in `data.glossary`, with the `note` it belongs to and the `language` it resolves to. |
|
|
899
1033
|
| `language_lineage` | One row per language note and each language it inherits words from through `data.family`, itself included at `depth` 0. Join it to `words` for a language's words with inherited ones. |
|
package/docs/commands.md
CHANGED
|
@@ -2492,7 +2492,7 @@ with visible text, nullable type/subtype and original source line/column.
|
|
|
2492
2492
|
Local and dependency SQL schemas expose them through `names`; they travel in
|
|
2493
2493
|
the metadata artifact.
|
|
2494
2494
|
|
|
2495
|
-
Metadata also includes each own note's spans, divs and
|
|
2495
|
+
Metadata also includes each own note's spans, divs and verse fences marked with
|
|
2496
2496
|
`lang=`, `font=` or `map=` under `runs`, with the language as written, the tag
|
|
2497
2497
|
it resolves to, the font, the map and the original source line/column. Local
|
|
2498
2498
|
and dependency SQL schemas expose them through `runs`, and each mapping note's
|
|
@@ -3058,7 +3058,7 @@ List a language's words with their native forms under a map.
|
|
|
3058
3058
|
**SYNOPSIS**
|
|
3059
3059
|
|
|
3060
3060
|
```
|
|
3061
|
-
package-build lexicon <language> --map <map> [--font <slug>] [--json]
|
|
3061
|
+
package-build lexicon <language> --map <map> [--font <slug>] [--derived] [--json]
|
|
3062
3062
|
```
|
|
3063
3063
|
|
|
3064
3064
|
**DESCRIPTION**
|
|
@@ -3071,17 +3071,27 @@ word has one, else the rows' spelling, each exactly as
|
|
|
3071
3071
|
by tabs, the word's `form`, its native form, `exception` or `rows`, its `class`
|
|
3072
3072
|
and its `gloss`. Writes nothing.
|
|
3073
3073
|
|
|
3074
|
+
With `--derived`, the forms the language's own rules derive from those words
|
|
3075
|
+
follow them: plurals, verb forms, replacing suffixes, agreeing forms and
|
|
3076
|
+
participles, exactly the regular forms
|
|
3077
|
+
[the mapped-run word check](authoring/links-and-markup.md#a-mapped-runs-words)
|
|
3078
|
+
accepts. Each is listed once, case folded as the check compares it, and spelled
|
|
3079
|
+
by the rows; a form that is itself a lexicon word is not repeated. Every line
|
|
3080
|
+
then has a sixth column: the lexicon word a derived form comes from, empty for
|
|
3081
|
+
the lexicon's own words. A derived line carries its word's `class` and `gloss`.
|
|
3082
|
+
|
|
3074
3083
|
**OPTIONS**
|
|
3075
3084
|
|
|
3076
3085
|
| Positional | Type | Default | Description |
|
|
3077
3086
|
| ---------- | ------ | ------- | --------------------------------------------------- |
|
|
3078
3087
|
| `language` | string | — | A declared language whose `note` names its lexicon. |
|
|
3079
3088
|
|
|
3080
|
-
| Option
|
|
3081
|
-
|
|
|
3082
|
-
| `--map`
|
|
3083
|
-
| `--font`
|
|
3084
|
-
| `--
|
|
3089
|
+
| Option | Type | Default | Description |
|
|
3090
|
+
| ----------- | ------- | -------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
3091
|
+
| `--map` | string | — | Required: the `data.map.name` of a mapping note. |
|
|
3092
|
+
| `--font` | string | the map's one face, if one | The face; required when the map lists more than one. |
|
|
3093
|
+
| `--derived` | boolean | `false` | Also list the forms the language's rules derive, each with the word it comes from. |
|
|
3094
|
+
| `--json` | boolean | `false` | Print a JSON array of `{ form, native, exception, class, gloss }` instead; a derived form adds `from`. |
|
|
3085
3095
|
|
|
3086
3096
|
**EXIT STATUS**
|
|
3087
3097
|
|
|
@@ -3097,6 +3107,11 @@ $ package-build lexicon vyl --map semaron | head -3
|
|
|
3097
3107
|
zaron <native form> exception n an oath
|
|
3098
3108
|
lonak <native form> rows n a road
|
|
3099
3109
|
thizaron <native form> rows n a seal
|
|
3110
|
+
$ package-build lexicon vyl --map semaron --derived | grep -P '\talathos$'
|
|
3111
|
+
alatha <native form> rows pron he, that one alathos
|
|
3112
|
+
alathon <native form> rows pron he, that one alathos
|
|
3113
|
+
alathoi <native form> rows pron he, that one alathos
|
|
3114
|
+
alathai <native form> rows pron he, that one alathos
|
|
3100
3115
|
```
|
|
3101
3116
|
|
|
3102
3117
|
**SEE ALSO**
|
package/docs/configuration.md
CHANGED
|
@@ -1975,7 +1975,7 @@ named first in the generated manifest's `styles`.
|
|
|
1975
1975
|
The sheet carries what every package's compiled content needs to read in
|
|
1976
1976
|
Foundry as it does in the preview and on the site: definition lists (an
|
|
1977
1977
|
infobox and the markdown `Term` / `: definition` syntax both emit one),
|
|
1978
|
-
|
|
1978
|
+
verse, alerts, inline spoilers, marked names in bold, unresolved links and
|
|
1979
1979
|
captioned blocks. It is scoped to the journal, enriched-field and editor
|
|
1980
1980
|
containers so it cannot reach Foundry's own interface, where `.name` and `dl`
|
|
1981
1981
|
style Foundry's and the system's own elements.
|
package/docs/content-format.md
CHANGED
|
@@ -27,11 +27,11 @@ Start with [your first note](authoring/first-note.md). It explains the smallest
|
|
|
27
27
|
|
|
28
28
|
A nonempty note body creates one system-agnostic Foundry JournalEntry. Content before the first H1 becomes an introduction page; every H1 starts another JournalEntryPage. A lower-level heading with an explicit `{#anchor}` starts a page too, so a link can address it. The same prose becomes a web page and can be selected for a book. The content index records the note and its frontmatter for queries and navigation.
|
|
29
29
|
|
|
30
|
-
Leading `:` captions describe the next supported block; `:@` captions also number it. The optional type accepts `figure`, `table`, `
|
|
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 code fence with language `
|
|
32
|
+
A code fence with language `verse` keeps verse lines, stanza breaks and relative indentation. Its numbered caption uses the **Poem** label. Generic `:::` divs and `[inline spans]{.class}` accept attributes. See [verse](authoring/links-and-markup.md#verse), [fenced divs](authoring/links-and-markup.md#fenced-divs) and [inline spans](authoring/links-and-markup.md#inline-spans). `numstep=N` numbers every Nth line. `col1=` and `col2=` set the poem in at most two columns, each a `:`-joined stack of `language[/mapping[/font]]` entries, the first in the normal tone and the rest in grey; with columns, each blank-line group of `[text]{lang=…}` spans is one verse line, every entry sets the span in its language, and a `***` line breaks the stanza. See [verse in columns](authoring/links-and-markup.md#verse-in-columns).
|
|
33
33
|
|
|
34
|
-
A span, a generic div or a
|
|
34
|
+
A span, a generic div or a verse fence marks its text's language with `lang=`, the font it is set in with `font=` and a mapping with `map=`, each optional, and the runs inside a div or a fence inherit its keys. `lang=` is a name the package declares in `languages` or a BCP 47 tag, and gives the language tag alone. `font=` is a face of the installed `@heroiclands/fonts`, named by its class without `hl-`, or `mono`, `serif` or `sans`. `map=` names a mapping note: a `doc` note whose `data.map` lists the fonts it is drawn in and rows that rewrite the text before it is set, a font's own rows first. With `lang=` naming a language whose configured `note` names its language note, a word whose entry states a `native` form for the map is written by it, and the rows spell every other word. Every word of such a run is a lexicon form, a word of a name the language note's own register lists under a tongue other than `translation`, or a form a plural row, the verb pattern or an affix stating `replaces` derives from a lexicon form, and any other word is an error at the word. A character a face does not draw, after the map, is an error at the character it came from. Text with a font, a map or a declared language is plain. Every marked construct is a row of the `runs` relation, every mapping row of the `maps` relation, and every native form of the `natives` relation. See [marking language, font and mapping](authoring/links-and-markup.md#marking-language-font-and-mapping).
|
|
35
35
|
|
|
36
36
|
Mark a name without a note as `[Name]{.name data-type="being"}`; the optional
|
|
37
37
|
classification uses the declared note vocabulary. The [name-marking
|
package/docs/diagnostics.md
CHANGED
|
@@ -254,6 +254,48 @@ problems, listing every conflict at once. Stating `data.culture` on the note
|
|
|
254
254
|
resolves it. The rules are under
|
|
255
255
|
[Culture in the index](reference/format-details.md#culture-in-the-index).
|
|
256
256
|
|
|
257
|
+
## A worked case: a verse in columns
|
|
258
|
+
|
|
259
|
+
A [verse in columns](authoring/links-and-markup.md#verse-in-columns) is
|
|
260
|
+
checked line by line, and every finding sits on the text that makes it wrong.
|
|
261
|
+
Each is an error, from `package-build lint` and from every build that sets the
|
|
262
|
+
page.
|
|
263
|
+
|
|
264
|
+
A verse line that leaves out a language its columns name is located at the
|
|
265
|
+
group's first line, and names the column that asks for it. A language given
|
|
266
|
+
twice is located at the second span, and one no column sets at its span:
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
assets/content/Lore/Walking_of_the_Line.md:14:1: error: this verse line has no `en` line, which `col2=` sets
|
|
270
|
+
assets/content/Lore/Walking_of_the_Line.md:18:1: error: this verse line gives `en` twice; give each language once
|
|
271
|
+
assets/content/Lore/Walking_of_the_Line.md:22:1: error: no column sets `khel`; a verse line gives the languages `col1=` and `col2=` name
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
A finding about the columns themselves is located in the opening line, at the
|
|
275
|
+
key or at the entry. A third column is located at its key; a malformed entry
|
|
276
|
+
at the entry; an unknown mapping or font at that part of its entry, with the
|
|
277
|
+
nearest name the package knows:
|
|
278
|
+
|
|
279
|
+
```text
|
|
280
|
+
assets/content/Lore/Walking_of_the_Line.md:9:85: error: `col3=` is not a column: a verse has at most two, `col1=` and `col2=`
|
|
281
|
+
assets/content/Lore/Walking_of_the_Line.md:9:81: error: `vyl/a/b/c` in `col2=` is not an entry: an entry is `language[/mapping[/font]]`
|
|
282
|
+
assets/content/Lore/Walking_of_the_Line.md:9:45: error: `vyl-semron` is not a map: `map=` names the `data.map.name` of a mapping note; did you mean `vyl-semaron`?
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
The text an entry sets is checked as a span with that entry's keys, and its
|
|
286
|
+
findings sit on the character of the verse line they come from. A character
|
|
287
|
+
the face does not draw, after the mapping, is located at the character as the
|
|
288
|
+
note wrote it:
|
|
289
|
+
|
|
290
|
+
```text
|
|
291
|
+
assets/content/Lore/Walking_of_the_Line.md:19:8: error: `7` (U+0037) is not drawn by the font `semaron-kuriale`, and the map `vyl-semaron` has no row for it
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
A key that names nothing is the one finding: a line set through an unknown
|
|
295
|
+
mapping or font is not then checked against a face or a lexicon it cannot
|
|
296
|
+
reach. A verse in columns with any finding is set as its lines are written,
|
|
297
|
+
and the build fails on the error.
|
|
298
|
+
|
|
257
299
|
## Summary counts and prose are not findings
|
|
258
300
|
|
|
259
301
|
A run's progress and summary lines — `42 address(es) across 10 note(s).`,
|