@heroiclands/package-build 23.12.8 → 24.0.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.
Files changed (258) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +3 -2
  3. package/assets/preview/gitea.ini +12 -7
  4. package/assets/styles/content-base.css +293 -24
  5. package/bin/content-commands.mjs +370 -213
  6. package/bin/package-build-preview.mjs +2 -2
  7. package/bin/package-build.mjs +3 -2
  8. package/ci/check-banners.mjs +7 -7
  9. package/config.mjs +21 -6
  10. package/content-config.mjs +199 -80
  11. package/docs/api.md +110 -89
  12. package/docs/authoring/links-and-markup.md +469 -97
  13. package/docs/commands.md +259 -78
  14. package/docs/configuration.md +211 -103
  15. package/docs/content-format.md +4 -4
  16. package/docs/diagnostics.md +44 -2
  17. package/docs/getting-started.md +1 -1
  18. package/docs/guides/icons.md +1 -1
  19. package/docs/guides/module-project.md +5 -8
  20. package/docs/guides/release-and-deploy.md +2 -2
  21. package/docs/guides/site.md +112 -23
  22. package/docs/guides/system-project.md +1 -1
  23. package/docs/guides/writing-in-invented-scripts.md +1247 -0
  24. package/docs/index.md +1 -0
  25. package/docs/project-setup.md +28 -30
  26. package/docs/reference/format-details.md +677 -319
  27. package/docs/reference/note-types.md +47 -10
  28. package/docs/reference/theme-pages.md +178 -108
  29. package/docs/source-preview.md +16 -2
  30. package/engine/anchors.mjs +2 -2
  31. package/engine/asset-shipping.mjs +22 -10
  32. package/engine/base-compiler.mjs +62 -104
  33. package/engine/changelog-lint.mjs +1 -1
  34. package/engine/code-fences.mjs +3 -3
  35. package/engine/content-address.mjs +1 -1
  36. package/engine/content-alerts.mjs +8 -4
  37. package/engine/content-blocks.mjs +29 -14
  38. package/engine/content-embeds.mjs +1 -1
  39. package/engine/content-expand.mjs +376 -0
  40. package/engine/content-figures.mjs +18 -11
  41. package/engine/content-format.yaml +8 -0
  42. package/engine/content-glyphs.mjs +213 -0
  43. package/engine/content-images.mjs +6 -7
  44. package/engine/content-index.mjs +1 -1
  45. package/engine/content-links.mjs +3 -3
  46. package/engine/content-lint.mjs +1 -1
  47. package/engine/content-render.mjs +453 -0
  48. package/engine/content-scripts.mjs +376 -43
  49. package/engine/content-spans.mjs +6 -3
  50. package/engine/content-styles.mjs +91 -0
  51. package/engine/content-symbols.mjs +186 -0
  52. package/engine/content-verse.mjs +738 -0
  53. package/engine/core-report.mjs +169 -0
  54. package/engine/core-vocabulary.mjs +208 -0
  55. package/engine/dictionary-html.mjs +119 -0
  56. package/engine/dictionary-rows.mjs +15 -4
  57. package/engine/field-reference.mjs +5 -5
  58. package/engine/first-use.mjs +17 -27
  59. package/engine/frontmatter-lint.mjs +1 -1
  60. package/engine/heading-attributes.mjs +89 -0
  61. package/engine/helpers.mjs +61 -101
  62. package/engine/homepage.mjs +17 -29
  63. package/engine/html-minify.mjs +70 -0
  64. package/engine/index.mjs +8 -5
  65. package/engine/key-case-collisions.mjs +136 -0
  66. package/engine/language-data.mjs +203 -6
  67. package/engine/language-rows.mjs +8 -2
  68. package/engine/language-terms.mjs +186 -16
  69. package/engine/language-words.mjs +12 -0
  70. package/engine/logographic.mjs +255 -0
  71. package/engine/map-lexicon.mjs +262 -47
  72. package/engine/map-places.mjs +5 -4
  73. package/engine/markdown-expressions.mjs +0 -2
  74. package/engine/markdownlint-run.mjs +9 -3
  75. package/engine/markup-validation.mjs +21 -0
  76. package/engine/metre-declaration.mjs +134 -0
  77. package/engine/names.mjs +36 -9
  78. package/engine/note-matter.mjs +66 -0
  79. package/engine/note-vocabulary.mjs +187 -3
  80. package/engine/pdf-build.mjs +69 -133
  81. package/engine/pdf-render.mjs +205 -58
  82. package/engine/post-fields.mjs +157 -0
  83. package/engine/preview-index.mjs +130 -0
  84. package/engine/preview-source.mjs +450 -0
  85. package/engine/project-init.mjs +5 -12
  86. package/engine/prose-config.mjs +3 -3
  87. package/engine/read-stdin.mjs +29 -0
  88. package/engine/run-rows.mjs +2 -2
  89. package/engine/run-words.mjs +6 -112
  90. package/engine/script-emphasis-terms.mjs +38 -0
  91. package/engine/script-emphasis.mjs +295 -0
  92. package/engine/script-font-delivery.mjs +4 -4
  93. package/engine/site-build.mjs +260 -315
  94. package/engine/site-config.mjs +26 -238
  95. package/engine/site-files.mjs +175 -0
  96. package/engine/site-index.mjs +9 -4
  97. package/engine/site-preview.mjs +52 -525
  98. package/engine/site-render.mjs +593 -0
  99. package/engine/site-root.mjs +22 -13
  100. package/engine/site-search.mjs +161 -0
  101. package/engine/site-serve.mjs +273 -0
  102. package/engine/site-theme-banner.mjs +154 -0
  103. package/engine/site-theme-urls.mjs +125 -0
  104. package/engine/site-theme.mjs +926 -0
  105. package/engine/sql-tables.mjs +20 -3
  106. package/engine/text-maps.mjs +57 -10
  107. package/engine/typographer.mjs +248 -0
  108. package/engine/verse-metre.mjs +357 -0
  109. package/engine/wikilink-syntax.mjs +29 -47
  110. package/engine/wikilinks.mjs +758 -279
  111. package/engine/word-forms.mjs +364 -0
  112. package/engine/word-rows.mjs +12 -2
  113. package/engine/word-terms.mjs +38 -4
  114. package/manifest.mjs +3 -4
  115. package/package.json +11 -8
  116. package/{hugo-theme → site-theme}/data/banners.yaml +6 -10
  117. package/site-theme/layouts/base.hbs +31 -0
  118. package/site-theme/layouts/blog-list.hbs +30 -0
  119. package/site-theme/layouts/blog-post.hbs +40 -0
  120. package/site-theme/layouts/home.hbs +35 -0
  121. package/site-theme/layouts/list.hbs +20 -0
  122. package/site-theme/layouts/not-found.hbs +31 -0
  123. package/site-theme/layouts/page.hbs +7 -0
  124. package/site-theme/partials/copy-buttons.hbs +37 -0
  125. package/site-theme/partials/draft-notice.hbs +5 -0
  126. package/site-theme/partials/exturl.hbs +2 -0
  127. package/{hugo-theme/layouts/partials/footer.html → site-theme/partials/footer.hbs} +10 -7
  128. package/site-theme/partials/header.hbs +44 -0
  129. package/site-theme/partials/hero-banner.hbs +11 -0
  130. package/site-theme/partials/infobox-entry.hbs +2 -0
  131. package/site-theme/partials/infobox-section.hbs +31 -0
  132. package/site-theme/partials/infobox-value.hbs +2 -0
  133. package/site-theme/partials/infobox.hbs +18 -0
  134. package/site-theme/partials/list-members.hbs +9 -0
  135. package/site-theme/partials/nav-links.hbs +5 -0
  136. package/site-theme/partials/page-body.hbs +48 -0
  137. package/site-theme/partials/page-list.hbs +14 -0
  138. package/site-theme/partials/related.hbs +24 -0
  139. package/site-theme/partials/search-meta.hbs +6 -0
  140. package/site-theme/partials/search-names.hbs +2 -0
  141. package/site-theme/partials/search.hbs +52 -0
  142. package/site-theme/partials/tags.hbs +4 -0
  143. package/site-theme/partials/toc.hbs +7 -0
  144. package/{hugo-theme → site-theme}/static/css/style.css +106 -14
  145. package/stage.mjs +1 -2
  146. package/types/config.d.mts +8 -4
  147. package/types/content-config.d.mts +15 -15
  148. package/types/engine/asset-shipping.d.mts +5 -2
  149. package/types/engine/base-compiler.d.mts +20 -2
  150. package/types/engine/code-fences.d.mts +3 -3
  151. package/types/engine/content-address.d.mts +1 -1
  152. package/types/engine/content-alerts.d.mts +8 -2
  153. package/types/engine/content-blocks.d.mts +11 -4
  154. package/types/engine/content-expand.d.mts +288 -0
  155. package/types/engine/content-figures.d.mts +11 -3
  156. package/types/engine/content-glyphs.d.mts +85 -0
  157. package/types/engine/content-images.d.mts +6 -7
  158. package/types/engine/content-links.d.mts +1 -1
  159. package/types/engine/content-render.d.mts +199 -0
  160. package/types/engine/content-scripts.d.mts +70 -4
  161. package/types/engine/content-spans.d.mts +1 -1
  162. package/types/engine/content-styles.d.mts +33 -0
  163. package/types/engine/content-symbols.d.mts +35 -0
  164. package/types/engine/content-verse.d.mts +240 -0
  165. package/types/engine/core-report.d.mts +45 -0
  166. package/types/engine/core-vocabulary.d.mts +53 -0
  167. package/types/engine/dictionary-html.d.mts +8 -0
  168. package/types/engine/dictionary-rows.d.mts +10 -0
  169. package/types/engine/field-reference.d.mts +2 -2
  170. package/types/engine/heading-attributes.d.mts +20 -0
  171. package/types/engine/helpers.d.mts +3 -10
  172. package/types/engine/homepage.d.mts +11 -24
  173. package/types/engine/html-minify.d.mts +9 -0
  174. package/types/engine/index.d.mts +2 -1
  175. package/types/engine/key-case-collisions.d.mts +28 -0
  176. package/types/engine/language-data.d.mts +0 -2
  177. package/types/engine/language-terms.d.mts +24 -2
  178. package/types/engine/logographic.d.mts +45 -0
  179. package/types/engine/map-lexicon.d.mts +66 -13
  180. package/types/engine/map-places.d.mts +8 -0
  181. package/types/engine/markdown-expressions.d.mts +0 -2
  182. package/types/engine/metre-declaration.d.mts +39 -0
  183. package/types/engine/names.d.mts +34 -3
  184. package/types/engine/note-matter.d.mts +48 -0
  185. package/types/engine/pdf-render.d.mts +6 -2
  186. package/types/engine/post-fields.d.mts +44 -0
  187. package/types/engine/preview-index.d.mts +72 -0
  188. package/types/engine/preview-source.d.mts +51 -0
  189. package/types/engine/read-stdin.d.mts +11 -0
  190. package/types/engine/run-rows.d.mts +2 -2
  191. package/types/engine/run-words.d.mts +0 -15
  192. package/types/engine/script-emphasis-terms.d.mts +21 -0
  193. package/types/engine/script-emphasis.d.mts +84 -0
  194. package/types/engine/script-font-delivery.d.mts +4 -4
  195. package/types/engine/site-build.d.mts +71 -113
  196. package/types/engine/site-config.d.mts +14 -134
  197. package/types/engine/site-files.d.mts +73 -0
  198. package/types/engine/site-index.d.mts +11 -3
  199. package/types/engine/site-preview.d.mts +15 -19
  200. package/types/engine/site-render.d.mts +171 -0
  201. package/types/engine/site-root.d.mts +12 -4
  202. package/types/engine/site-search.d.mts +54 -0
  203. package/types/engine/site-serve.d.mts +44 -0
  204. package/types/engine/site-theme-banner.d.mts +51 -0
  205. package/types/engine/site-theme-urls.d.mts +60 -0
  206. package/types/engine/site-theme.d.mts +127 -0
  207. package/types/engine/sql-tables.d.mts +4 -1
  208. package/types/engine/text-maps.d.mts +17 -3
  209. package/types/engine/typographer.d.mts +11 -0
  210. package/types/engine/verse-metre.d.mts +131 -0
  211. package/types/engine/wikilink-syntax.d.mts +30 -48
  212. package/types/engine/wikilinks.d.mts +330 -14
  213. package/types/engine/word-forms.d.mts +83 -0
  214. package/types/manifest.d.mts +3 -4
  215. package/types/stage.d.mts +1 -2
  216. package/types/vendor/markdownlint.d.mts +8 -0
  217. package/vendor/markdownlint.mjs +20388 -0
  218. package/engine/content-poetry.mjs +0 -240
  219. package/engine/web-wikilinks.mjs +0 -594
  220. package/hugo-theme/layouts/404.html +0 -85
  221. package/hugo-theme/layouts/_default/baseof.html +0 -67
  222. package/hugo-theme/layouts/_default/list.html +0 -139
  223. package/hugo-theme/layouts/_default/single.html +0 -4
  224. package/hugo-theme/layouts/blog/list.html +0 -54
  225. package/hugo-theme/layouts/blog-post/single.html +0 -36
  226. package/hugo-theme/layouts/index.html +0 -75
  227. package/hugo-theme/layouts/partials/banner-url.html +0 -141
  228. package/hugo-theme/layouts/partials/cdn-url.html +0 -36
  229. package/hugo-theme/layouts/partials/dictionary-lists.html +0 -58
  230. package/hugo-theme/layouts/partials/draft-notice.html +0 -41
  231. package/hugo-theme/layouts/partials/draft-state.html +0 -26
  232. package/hugo-theme/layouts/partials/header.html +0 -35
  233. package/hugo-theme/layouts/partials/hero-banner.html +0 -85
  234. package/hugo-theme/layouts/partials/infobox/entry.html +0 -18
  235. package/hugo-theme/layouts/partials/infobox/items.html +0 -26
  236. package/hugo-theme/layouts/partials/infobox/section.html +0 -56
  237. package/hugo-theme/layouts/partials/infobox/value.html +0 -43
  238. package/hugo-theme/layouts/partials/infobox.html +0 -57
  239. package/hugo-theme/layouts/partials/page-body.html +0 -152
  240. package/hugo-theme/layouts/partials/related.html +0 -138
  241. package/hugo-theme/layouts/partials/search.html +0 -84
  242. package/hugo-theme/layouts/partials/site-url.html +0 -32
  243. package/hugo-theme/layouts/partials/tags.html +0 -30
  244. package/hugo-theme/layouts/partials/toc.html +0 -28
  245. package/hugo-theme/layouts/partials/warn-missing-banner.html +0 -3
  246. package/hugo-theme/layouts/shortcodes/cartouche.html +0 -64
  247. package/hugo-theme/layouts/shortcodes/exturl.html +0 -12
  248. package/hugo-theme/layouts/shortcodes/glyph.html +0 -43
  249. package/hugo-theme/layouts/shortcodes/pagelist.html +0 -63
  250. package/hugo-theme/theme.toml +0 -11
  251. package/types/engine/content-poetry.d.mts +0 -58
  252. package/types/engine/web-wikilinks.d.mts +0 -107
  253. /package/{hugo-theme → site-theme}/data/banner-kinds.yaml +0 -0
  254. /package/{hugo-theme → site-theme}/static/css/sohl-icons.css +0 -0
  255. /package/{hugo-theme → site-theme}/static/fonts/game-icons-kb.woff2 +0 -0
  256. /package/{hugo-theme → site-theme}/static/img/banners/takheperu-hieroglyphs.svg +0 -0
  257. /package/{hugo-theme → site-theme}/static/img/cartouches/takheperu.svg +0 -0
  258. /package/{hugo-theme → site-theme}/static/js/inline-spoilers.js +0 -0
@@ -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. Only
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. A whole bold span matching an indexed name or
112
- alias receives an advisory to mark or link that name; bold containing an
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,15 +194,15 @@ 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
- | Poetry fence | `poetry` | Poem |
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`, `poetry`, `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.
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
 
202
- Each numbered type has its own counter. Websites and Foundry number within a note; books number across their reading order. Unnumbered captions neither display nor consume a number. A map image can retain its asset-derived **Map** classification when no type is specified.
205
+ Each numbered type has its own counter. Websites and Foundry number within a note; books number across their reading order. Unnumbered captions neither display nor consume a number. A picture whose asset declares the `map` role counts as a **Map** when no type is specified, and a reference to it reads **Map 1** on every surface: in the note's own page, in a journal, and from another note's page. The editor preview knows the role when it has the package's content index; without one it numbers the picture a **Figure**.
203
206
 
204
207
  `{{ref "#trade"}}` displays the numbered label as a link. `form="full"` includes caption text and `form="title"` displays the caption alone. Use title form for an unnumbered caption. Cross-note references can name the note address before the anchor, such as `{{ref "place-harbor#trade"}}`; the displayed number belongs to the target on the surface rendering it. Links inside caption text contribute their visible text to references, so the reference does not contain a nested link.
205
208
 
@@ -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
- ### Poetry
344
+ ### Verse
342
345
 
343
- Use a code fence with the language `poetry` to preserve verse lines and stanzas. Every nonblank source line
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. Poetry is upright by default; use normal
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
- ```poetry {form=ballad meter="common meter" rhyme=ABCB syllables="8,6,8,6" lang=en}
376
+ ```verse {form=ballad lang=en}
374
377
  The lantern burns beside the gate,
375
378
  The harbor sleeps below.
376
379
 
@@ -379,22 +382,82 @@ And keeps a light aglow.
379
382
  ```
380
383
  ````
381
384
 
382
- The optional `form`, `meter` and `rhyme` attributes record the author's intent;
383
- the build does not infer stress, rhyme or pronunciation. `syllables` gives a
384
- positive count for each verse line in order, separated by commas, with blank
385
- stanza lines omitted. The build checks the number of counts, not the syllables
386
- spoken. `lang` names the poem's language, `font` the font it is set in and
387
- `map` the mapping its text is rewritten by; see
385
+ The optional `form` attribute records the author's intent; the build does not
386
+ infer stress, rhyme or pronunciation. `numstep` numbers the lines, and `col1` and
387
+ `col2` set the poem in columns; see below. `lang` names the poem's language,
388
+ `font` the font it is set in and `map` the mapping its text is rewritten by; see
388
389
  [marking language, font and mapping](#marking-language-font-and-mapping). An optional `#id`
389
390
  addresses the poem itself. There are no `title` or `lines` attributes, and no
390
- special punctuation for stress, pauses or refrains.
391
+ special punctuation for stress, pauses or refrains. A poem's metre, rhyme or
392
+ syllable pattern is described in the note's prose. `scan` names a metre the
393
+ package declares, and the build counts the poem's beats against it, as the next
394
+ section describes.
391
395
 
392
- To number and caption a poem, put a leading numbered caption before the poetry fence:
396
+ #### Metre
397
+
398
+ `scan=` names a metre declared once in the package, as an entry of a `doc`
399
+ note's `data.metres`:
400
+
401
+ ```yaml
402
+ data:
403
+ metres:
404
+ - { name: hexameter, beats: 6, kind: accentual }
405
+ ```
406
+
407
+ `name` is lowercase letters, digits and `-`, unique in the package. `beats` is
408
+ the beats of one line, a whole number above zero. `kind` is `accentual`, the
409
+ only kind: a beat falls on a stressed syllable, and the length of a syllable
410
+ is not counted.
411
+
412
+ A verse fence that states `scan=` with the declared name, and `lang=` with a
413
+ language whose `note` names a language note stating
414
+ [`data.sounds.stress`](../reference/format-details.md#a-languages-register-sounds-and-history),
415
+ is counted line by line. A line that cannot have the metre's beats is a warning
416
+ at that line:
417
+
418
+ ````markdown
419
+ ```verse {form=epic scan=hexameter lang=vyl}
420
+ Thiruthriman sorimamen, ul alathas kedis alatha valmazor,
421
+ ```
422
+ ````
423
+
424
+ > ``this line has 4 beats (5 with secondary beats); the metre `hexameter` has 6``
425
+
426
+ Beats are counted this way:
427
+
428
+ - **Syllables** are vowel groups. A vowel is a letter whose base is `a`, `e`,
429
+ `i`, `o` or `u`, and a pair the language lists in
430
+ `data.sounds.syllables.vowelPairs` is one syllable.
431
+ - **Every word of two or more syllables has one beat**, on its stressed
432
+ syllable. The language's stress rule places it: `two` for a word of two
433
+ syllables, `longer` for a word of three or more, and a vowel carrying the
434
+ rule's `mark` is stressed wherever it sits.
435
+ - **A one-syllable noun, verb, adjective, numeral or name has a beat.** A
436
+ one-syllable particle, preposition, conjunction, adverb or pronoun has none.
437
+ The `class` of the lexicon entry decides, so the language's lexicon is read
438
+ through `lang=` as it is for the word check, and a form the language's rules
439
+ derive takes its word's class. A word whose entries differ in class is a
440
+ beat that may be left out.
441
+ - **A one-syllable word the lexicon does not hold is a content word** and has a
442
+ beat. The word check reports the word separately.
443
+ - **A word of four or more syllables may take a second, lighter beat on its
444
+ first syllable** where the line needs it, unless its stress is already
445
+ there. A line scans when its count can be the metre's, choosing second beats
446
+ as needed; the warning gives the count without them and, in brackets, with
447
+ all of them.
448
+ - The caesura is not written.
449
+
450
+ `scan=` is refused where it cannot mean anything: a name no `data.metres`
451
+ declares, a fence with no `lang=`, a language without a stress rule, and a verse
452
+ in columns. A fence with no `scan=` is not counted. Readers see nothing of the
453
+ count; the fence carries `data-scan` with the metre's name.
454
+
455
+ To number and caption a poem, put a leading numbered caption before the verse fence:
393
456
 
394
457
  ````markdown
395
458
  :@ A song sung by the harbor watch. {#watch-song}
396
459
 
397
- ```poetry {form=ballad}
460
+ ```verse {form=ballad}
398
461
  The watch has gone to sea,
399
462
  The lantern marks the shore.
400
463
  ```
@@ -402,9 +465,90 @@ The lantern marks the shore.
402
465
 
403
466
  This uses the **Poem** counter, so `{{ref "#watch-song"}}` reads **Poem 1**. Use `:` for a caption without a number.
404
467
 
468
+ #### Line numbers
469
+
470
+ `numstep=N` numbers the poem's lines, counting every verse line from the first
471
+ to the last across stanzas. `numstep=1` numbers every line, `numstep=5` every
472
+ fifth line, and `numstep=0`, the default, numbers none. The numbers sit in a
473
+ margin beside the lines, in a muted tone.
474
+
475
+ ````markdown
476
+ ```verse {numstep=5 lang=en}
477
+ The lantern burns beside the gate,
478
+ …
479
+ ```
480
+ ````
481
+
482
+ #### Verse in columns
483
+
484
+ A poem can be set beside its translation, line for line. `col1=` names what
485
+ the left column shows and `col2=` what the right column shows, and each
486
+ column stacks one or more **entries**, joined by `:`. An entry is
487
+ `language[/mapping[/font]]`:
488
+
489
+ - **`language`** names a language the poem's lines give, as `lang=` does.
490
+ - **`mapping`** names a [mapping note](#mapping-notes), which rewrites the
491
+ line before it is set. Left out, the line is set as written.
492
+ - **`font`** names a face or a generic family, as `font=` does. Left out, the
493
+ line is set in the roman serif.
494
+
495
+ A poem has at most two columns, and either may be left out. In every column
496
+ the first entry is set in the normal tone and each later one in grey.
497
+
498
+ With columns, the poem's body is written as **verse lines**, each a group of
499
+ lines separated by a blank line. Each line of a group is a span giving the
500
+ verse line in one language, `[text]{lang=…}`, or plain text in the poem's
501
+ `lang=`. The spans of a group may come in any order: each entry takes the
502
+ span in its own language. A line holding only `***` breaks the stanza.
503
+
504
+ Here the left column sets the Vylari in Semaron Kuriale through the `semaron`
505
+ mapping, and the right column gives the English over the Vylari in roman:
506
+
507
+ ````markdown
508
+ ```verse {numstep=5 lang=vyl col1=vyl/semaron/semaron-kuriale col2=en:vyl}
509
+ [Thiruthriman sorimamen,]{lang=vyl}
510
+ [The hallowed boundary I sing,]{lang=en}
511
+
512
+ [ul alathas kedis alatha valmazor, ul talothoi]{lang=vyl}
513
+ [and the one who walked it, and the stones]{lang=en}
514
+
515
+ ***
516
+
517
+ [set down in the grass of the six hills]{lang=en}
518
+ lendthoi ir yormalis ol selthur malkothoi
519
+
520
+ [before a wall stood on any of them.]{lang=en}
521
+ pra kembothos us urkis ol alathoi thalezor.
522
+ ```
523
+ ````
524
+
525
+ The Vylari is written once, in roman, and the script is never typed: the
526
+ first entry of `col1=` maps the Vylari line into Semaron, and the second entry
527
+ of `col2=` sets the same line as written. The last two verse lines give their
528
+ Vylari as plain text, which takes the poem's `lang=vyl`.
529
+
530
+ Every target sets each verse line as one row: its number, when the poem is
531
+ numbered, then each column. Each row holds its columns level, so a long line
532
+ on one side never puts the other out of step. On a narrow screen or a narrow
533
+ journal, a row stacks its columns in order. A part set in a right-to-left face
534
+ stays in its column and runs right to left within it. The book sets the poem
535
+ as a grid with a row per verse line.
536
+
537
+ **The rules of a verse in columns:**
538
+
539
+ - `font=` and `map=` belong to the entries, not to the poem.
540
+ - Every verse line gives one span for each language its columns name, and
541
+ none for a language they do not.
542
+ - A line of a verse in columns is not indented, and a span there takes only
543
+ `lang=`.
544
+ - `syllables` gives one count per verse line, not per written line.
545
+
546
+ Each finding is an error at the text that is wrong; see
547
+ [a verse in columns](../diagnostics.md#a-worked-case-a-verse-in-columns).
548
+
405
549
  ## Marking language, font and mapping
406
550
 
407
- Three keys go in the attribute block a span, a fenced div or a poetry fence
551
+ Three keys go in the attribute block a span, a fenced div or a verse fence
408
552
  already takes. Each is optional, and each does one thing:
409
553
 
410
554
  - **`lang=`** names the language of the text. It becomes the element's
@@ -446,13 +590,13 @@ Daimela, helthos.
446
590
  A poem takes the keys on its fence, beside its other attributes:
447
591
 
448
592
  ````markdown
449
- ```poetry {form=epic lang=vyl font=semaron-kuriale map=semaron}
593
+ ```verse {form=epic lang=vyl font=semaron-kuriale map=semaron}
450
594
  Zaron tholmeza,
451
595
  daimela, helthos.
452
596
  ```
453
597
  ````
454
598
 
455
- **A run inside a div or a poetry fence inherits its keys**, and its own keys
599
+ **A run inside a div or a verse fence inherits its keys**, and its own keys
456
600
  override them. Here the gloss keeps the passage's language and map, and is set
457
601
  in the page's serif:
458
602
 
@@ -571,7 +715,8 @@ vyl zaron` converts a passage, both through the build's own code; see
571
715
  the language's [`note`](../configuration.md#languages) names its language note.
572
716
  Each word, case folded, is one of:
573
717
 
574
- 1. **a lexicon word**: a `data.words[].form` of the language;
718
+ 1. **a lexicon word**: a `data.words[].form` of the language, or one of its
719
+ `variants`, which takes every rule below as its word does;
575
720
  2. **a word of a registered name**: a word of a `name` in the language note's
576
721
  own `data.register`, under any `tongue` but `translation`. A name of several
577
722
  words is checked word by word, so `Revothar Baremzator` admits `Revothar`
@@ -590,7 +735,56 @@ Each word, case folded, is one of:
590
735
  is `a`, `e`, `i`, `o` or `u`), letters such as `replaces: a` take the
591
736
  place of those letters, and a stem that closes otherwise takes the suffix
592
737
  whole. An affix that states no `replaces` makes no form here, whatever its
593
- `attaches` says, because `attaches` is prose.
738
+ `attaches` says, because `attaches` is prose. A suffix stating
739
+ `attachesTo: [n, adj]` attaches only to words of those classes, and one
740
+ stating no `attachesTo` attaches to a word of every class;
741
+ - an agreeing form, where the language states `data.grammar.agreement`: a
742
+ word of one of its `classes` closing on one of its `endings` takes each
743
+ other ending in its place, and each form takes the `plural` rule;
744
+ - a participle, where the language states `data.grammar.participles`: a
745
+ verb closing on one of its `root` endings drops it, and each suffix it
746
+ names attaches to the root, agreeing where it closes on an agreement
747
+ ending.
748
+
749
+ **Agreement and participles, worked through in Vylari.** Vylari's adjectives
750
+ and pronouns agree with their noun by its endings, and its participles are
751
+ suffixes on the verb root. Its note states both beside its plural rule:
752
+
753
+ ```yaml
754
+ affixes:
755
+ - form: "-andar"
756
+ gloss: "doing it: the present participle"
757
+ replaces: vowel
758
+ - form: "-thos"
759
+ gloss: "done, suffered: the past participle"
760
+ grammar:
761
+ plural:
762
+ - { ending: os, becomes: oi }
763
+ - { ending: on, becomes: oi }
764
+ - { ending: a, becomes: ai }
765
+ agreement:
766
+ classes: [adj, pron]
767
+ endings: [os, a, on]
768
+ participles:
769
+ root: [athen, ethen]
770
+ affixes: ["-andar", "-thos"]
771
+ ```
772
+
773
+ With those, a run accepts:
774
+
775
+ | Lexicon word | Rule | Forms accepted |
776
+ | ----------------- | ----------- | ------------------------------------------------- |
777
+ | _alathos_, pron. | agreement | _alatha_, _alathon_, _alathoi_, _alathai_ |
778
+ | _dokathen_, v. | participles | _dokandar_ (_dok-_ + _-andar_), _dokthos_ |
779
+ | _dokathen_, v. | both | _doktha_, _dokthon_, _dokthoi_, _dokthai_ |
780
+ | _marendos_, n. m. | neither | _marendoi_ by the plural rule alone; no _marenda_ |
781
+ | _solkatora_, v. | participles | none: the verb closes on no `root` ending |
782
+
783
+ _-andar_ closes on no agreement ending, so _dokandar_ does not agree. A
784
+ near miss such as _alathe_ or _dokendar_ is still an unknown word.
785
+ `package-build lexicon vyl --map semaron --derived` lists every form the rules
786
+ give, each beside the word it comes from, so a puzzling finding can be checked
787
+ against what the rules produce.
594
788
 
595
789
  A compound that is not a word whole is split at its hyphens and en dashes, and
596
790
  each part is checked, so `zaron-lonak` passes when `zaron` and `lonak` do. An
@@ -629,6 +823,94 @@ A run with `lang=` and no `map=`, a run with `map=` and no
629
823
  `lang=`, a bare BCP 47 tag and a declared language with no `note` are not
630
824
  checked.
631
825
 
826
+ ### Logographic maps
827
+
828
+ **A script that writes meanings is written from the dictionary, never by
829
+ sound.** Its mapping note states `logographic: true`, and every word of a run
830
+ under it is written from the language's lexicon. The map's rows write only the
831
+ text between words: the spaces, the points, and anything else with no letter
832
+ in it. A word never falls through to the rows, so a word the lexicon gives no
833
+ writing is an error rather than a guess.
834
+
835
+ A word of the run is written by the first of these that gives a writing:
836
+
837
+ 1. **The word's own `native` entry** for the map, the one for the run's face
838
+ where an entry names one, else the one for no face. A word written its own
839
+ way, such as a set compound, states this even where its parts would give
840
+ another writing.
841
+ 2. **Its parts.**
842
+ - **A word stating `built`** is written by its pieces' writings joined in
843
+ order. A piece is a word of the lexicon, matched exactly and then with its
844
+ joining hyphens taken off, or an affix of `data.affixes` with a `native`
845
+ entry of its own. A word piece is written by this same rule, so a compound
846
+ of compounds resolves all the way down.
847
+ - **A noun's plural and a verb's present forms** are written by the stem's
848
+ writing followed by the ending's, which `data.grammar.native` states once
849
+ per ending: `plural`, or one of the persons `I`, `you`, `heShe`, `we`,
850
+ `youAll` and `they`. The forms themselves are the ones the language's
851
+ rules give, as for the lexicon check.
852
+ - **A hyphenated word no entry states** is written by each of its parts in
853
+ turn, so `Gar-halzunet` is `Gar-`'s writing followed by `halzunet`'s.
854
+ 3. **Otherwise the word is an error** at the word. Coin the word or give it a
855
+ writing, or write the signs directly.
856
+
857
+ A word is matched case folded, because the script has no capitals: `Halzi` and
858
+ `halzi` both find the entries `Halzi` and `halzi`. **Where one roman form
859
+ stands for entries written differently**, or where one has a writing and
860
+ another has none, the run cannot tell which sense is meant, and the word is an
861
+ error naming every entry's gloss. Write that word directly in signs, picking
862
+ the sense by its gloss from `package-build lexicon khel --map zethu`. Signs typed
863
+ in the run are no word, and pass through as typed. Entries that share a form
864
+ and are written alike are written so.
865
+
866
+ Khelathi in Zethu, with its roots, an affix and the plural written once:
867
+
868
+ ```yaml
869
+ affixes:
870
+ - form: "-unet"
871
+ gloss: "a thing made of"
872
+ native:
873
+ - { map: zethu, text: "\U0001EBC7" }
874
+ grammar:
875
+ plural:
876
+ - { ending: "", becomes: "im" }
877
+ native:
878
+ - { ending: plural, map: zethu, text: "\U0001EBE1" }
879
+ words:
880
+ - form: halzi
881
+ class: n
882
+ field: "The body"
883
+ gloss: heart
884
+ native:
885
+ - { map: zethu, text: "\U0001EABB" }
886
+ - form: halzunet
887
+ class: n
888
+ field: "Counting-house and water-works"
889
+ gloss: the account
890
+ built: [halzi, -unet]
891
+ ```
892
+
893
+ `[halzi halzunet halziim]{lang=khel font=khelathi-zethu-glyphs map=zethu}` is
894
+ written U+1EABB, then U+1EABB U+1EBC7, then U+1EABB U+1EBE1, with the spaces
895
+ the rows write between them. A word of the run that resolves to nothing is
896
+ reported once per run:
897
+
898
+ > `` `zamlu` has no `zethu` writing in the `khel` lexicon, and its parts do not give one; state one, or write the word directly in signs ``
899
+
900
+ The lexicon check still applies: every word of the run is a word of its
901
+ language, a registered name or a regular form of one. A registered name is
902
+ written like any other word, so a name with no writing is an error; a foreign
903
+ name is written deliberately, in signs or through a map that rewrites a
904
+ sign-by-sign notation.
905
+
906
+ An affix's `native` and `data.grammar.native` are read only under a logographic
907
+ map, so either one naming any other map is an error at the entry, and an ending
908
+ of a person is an error where `data.grammar.verbs` states no `persons`. A
909
+ word's `native` under a logographic map is not held to what the rows give,
910
+ because the rows spell no word. `package-build lexicon khel --map zethu` lists
911
+ every word with its writing and where it comes from, and marks the words that
912
+ have none.
913
+
632
914
  ### Mapping notes
633
915
 
634
916
  A mapping note is a `doc` note whose `data.map` lists the rewrites:
@@ -678,6 +960,10 @@ How Vylari's roman spelling is written in the Semaron chancery hand.
678
960
  reaches only code points up to U+FFFF. A row matches and writes whole code
679
961
  points.
680
962
  - **`vowels`** lists the characters `before: vowel` reads as vowels.
963
+ - **`logographic: true`** marks a script that writes meanings: every word of
964
+ a run is written from the lexicon, and the rows write only the text between
965
+ words; see [logographic maps](#logographic-maps). A row whose `from` holds a
966
+ letter could never apply on such a map, and is an error at the row.
681
967
 
682
968
  How a map reads text:
683
969
 
@@ -730,8 +1016,10 @@ plain text.
730
1016
 
731
1017
  - **A span or a verse line** holds no emphasis, link, image, footnote,
732
1018
  wikilink, code or HTML, and no span but a marked one inside a div or a fence.
1019
+ Text set in a face is the one exception: it takes `*…*` and `**…**`, as
1020
+ [emphasis in a script](#emphasis-in-a-script) describes.
733
1021
  - **A div** holds paragraphs and line breaks only: no heading, list, block
734
- quote, code fence, poetry fence, table, rule, footnote definition or nested
1022
+ quote, code fence, verse fence, table, rule, footnote definition or nested
735
1023
  block. Mark a poem's own fence instead of a div around it.
736
1024
 
737
1025
  The text is read as written, so characters a run types need no escaping: `[`
@@ -743,6 +1031,67 @@ defines `[^id]:`. A bracket with no partner takes a backslash, `\[`.
743
1031
  Text marked with a real language's tag alone keeps its Markdown, so
744
1032
  `[ad _astra_]{lang=la}` and an English poem with emphasis are both accepted.
745
1033
 
1034
+ ### Emphasis in a script
1035
+
1036
+ Inside a run set in a face, `*…*` and `**…**` are written exactly as in
1037
+ English. No script marks a stressed word by a bold or a slant, so the build sets
1038
+ emphasis by the scribal convention the text's language or its script states:
1039
+
1040
+ | Convention | On the site and in Foundry | In the book |
1041
+ | ---------- | -------------------------------------------------- | --------------------- |
1042
+ | `rubric` | `<em class="emph-rubric">`, in red | in the book's red ink |
1043
+ | `overline` | `<em class="emph-overline">`, with a line above it | under an overline |
1044
+ | none | `<em>` with no class, in the face's Regular | in the face's Regular |
1045
+
1046
+ `**…**` gives a `<strong>` in the same way. The element stays an `<em>` or a
1047
+ `<strong>`, so a screen reader and a copied passage keep the emphasis.
1048
+
1049
+ **The convention is the language's, else the script's.** A run's `lang=`
1050
+ language, through the note its [`languages.<name>.note`](../configuration.md#languages)
1051
+ names, may state `data.emphasis`; otherwise the script note listing the run's
1052
+ face states it in `data.script`; otherwise there is none. A script note:
1053
+
1054
+ ```yaml
1055
+ ---
1056
+ shortcode: semaronscrpt
1057
+ name: { full: Semaron Script }
1058
+ type: skill
1059
+ subType: script
1060
+ data:
1061
+ script:
1062
+ fonts: [semaron-kuriale]
1063
+ emphasis: rubric
1064
+ ---
1065
+ ```
1066
+
1067
+ So a tongue that states nothing takes its script's convention. Provenzal set in
1068
+ Semaron is rubric:
1069
+
1070
+ ```markdown
1071
+ The lintel reads [a _stressed_ word]{lang=prv font=semaron-kuriale map=semaron}.
1072
+ ```
1073
+
1074
+ and renders on the site as
1075
+
1076
+ ```html
1077
+ <span class="script hl-semaron-kuriale" lang="art-x-prv" data-pagefind-ignore="true"
1078
+ >… <em class="emph-rubric">…</em> …</span
1079
+ >
1080
+ ```
1081
+
1082
+ **A language may mark emphasis with a word** instead of a mark:
1083
+ `data.emphasis: words` on its language note. Emphasis in a run of that language
1084
+ is then an error at the emphasis, and the remedy is the word the language
1085
+ stresses with. A language may also state `rubric` or `overline`, which it takes
1086
+ in every script it is written in.
1087
+
1088
+ `_…_` is emphasis equal to `*…*`, and `__…__` equal to `**…**`, so a note keeps
1089
+ its meaning when a formatter rewrites one pair to the other. A strikethrough is
1090
+ an error in a face; an escaped `\*`, or a star that pairs with none, is a character the map and the
1091
+ face are checked for. A stressed word is best enclosed whole: a star inside a
1092
+ word splits it, so a map's row or a lexicon word that crosses the star is not
1093
+ matched.
1094
+
746
1095
  ### Errors
747
1096
 
748
1097
  Each of these is an error at its line and column, reported by `lint`, the site
@@ -760,11 +1109,16 @@ that `lint` reports and that fails nothing:
760
1109
  | `` `ch` maps to U+F0299 in the map `semaron`, which the font `semaron-kuriale` does not draw `` | Correct the row's `to`. |
761
1110
  | `` `zaron` is written U+F0299 by the lexicon of `vyl` for the map `semaron`, which the font `semaron-kuriale` does not draw `` | Correct the word's `native` text. |
762
1111
  | `` `Orlan` is capitalised, and the native form the lexicon of `vyl` states for `orlan` under the map `semaron` does not begin as the rows spell its first letter, so the rows cannot capitalise it; state `Orlan` as a word of its own with its native form `` | State the capitalised word as a lexicon word of its own with its native form. |
1112
+ | `` `zamlu` has no `zethu` writing in the `khel` lexicon, and its parts do not give one; state one, or write the word directly in signs `` | Give the word, or its pieces and endings, a writing for the map, or write its signs directly. |
1113
+ | `` `nelgir` stands for 2 words of the `khel` lexicon that the map `zethu` writes differently, “a god” and “god”; write the word directly in signs, choosing by its sense in `package-build lexicon khel --map zethu` `` | Write the signs of the sense meant, from the lexicon listing. |
1114
+ | `` `halzi` has no `zethu` writing: the map `zethu` is logographic, and the run names no `lang=` whose lexicon writes it; mark the run with its language, or write the word directly in signs `` | Mark the run with `lang=`, or write its signs directly. |
763
1115
  | `` `thiruthrimar` is not a word of the `vyl` lexicon, a registered name, or a regular form of one; coin it in the lexicon (or register the name) first `` | Coin the word in the language note's `data.words`, register the name in its own `data.register`, or correct the spelling. |
764
1116
  | `` `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
1117
  | ``text marked `lang=vyl` is plain text and holds no emphasis`` | Remove the markup, or escape the character with a backslash. |
1118
+ | ``text marked `lang=prv font=semaron-kuriale map=semaron` takes emphasis only as `*…*`, `_…_`, `**…**` or `__…__` `` | Write the emphasis with stars or underscores. |
1119
+ | `` `vyl` marks emphasis with a word, not a mark; write the word `` | Remove the emphasis marks and write the word the language stresses with. |
766
1120
  | ``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 poetry fence, not on a secret block `` | Put a marked div inside the secret block. |
1121
+ | `` `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
1122
  | `` `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
1123
 
770
1124
  A character the face does not draw is reported once per run, at its first
@@ -781,11 +1135,53 @@ SELECT owner, kind, tag, font, line FROM runs WHERE lang = 'vyl' ORDER BY owner,
781
1135
  ```
782
1136
  ````
783
1137
 
784
- Its columns are `owner`, `kind` (`span`, `block` or `poetry`), `lang` as written,
1138
+ Its columns are `owner`, `kind` (`span`, `block` or `verse`), `lang` as written,
785
1139
  the `tag` it resolves to (`NULL` when it resolves to none), `font`, `map`, `line`
786
1140
  and `column`. A run inside a div or a fence records the keys it inherits. See
787
1141
  [the `runs` relation](../reference/format-details.md#content-tables).
788
1142
 
1143
+ ### Tying words to the core vocabulary
1144
+
1145
+ A setting can name the concepts every language of it has a word for, and measure
1146
+ each language against them without reading a gloss. Three things state it:
1147
+
1148
+ 1. **A concept list** in the `data.concepts` of a `doc` note: each concept has
1149
+ an `id` (lowercase letters, digits and `-`, unique in the package), a short
1150
+ `gloss` and a `group` the report lists it under.
1151
+ 2. **`core: true`** in the `data` of each language note that must cover the list.
1152
+ 3. **`concept`** on each word that serves a concept: one id, or a list of ids
1153
+ for a word that serves several.
1154
+
1155
+ ```yaml
1156
+ # Docs/Core_Concepts.md
1157
+ type: doc
1158
+ subType: reference
1159
+ data:
1160
+ concepts:
1161
+ - { id: see-verb, gloss: to see, group: senses }
1162
+ - { id: smell-noun, gloss: "a smell; a scent", group: senses }
1163
+ - { id: knee, gloss: the knee, group: body }
1164
+
1165
+ # Skills/Vylari.md
1166
+ type: skill
1167
+ subType: language
1168
+ data:
1169
+ core: true
1170
+ words:
1171
+ - { form: veda, class: n, field: Senses, gloss: a sight, concept: see-verb }
1172
+ ```
1173
+
1174
+ A `concept` that names no entry of the list is an error at the id, with the
1175
+ nearest id offered: `` `smel-noun` is not a core concept; did you mean
1176
+ `smell-noun`? ``. A language reads the words of its `data.family` chain as its
1177
+ own, so a parent's tagged word covers the daughter's concept.
1178
+
1179
+ `package-build core` lists, for each language that states `core: true`, the
1180
+ concepts it has no word for, by group with counts. A missing concept is never an
1181
+ error: the report is the work list, and `--language <name> --json` serves an
1182
+ agent working through one language. See
1183
+ [the command reference](../commands.md#package-build-core).
1184
+
789
1185
  ## Footnotes and definition lists
790
1186
 
791
1187
  Write a footnote reference as `[^id]` and its definition as `[^id]: text`.
@@ -869,6 +1265,18 @@ plain words, not a checkbox — write what is done into the item itself:
869
1265
  - the ferry crossing: owed
870
1266
  ```
871
1267
 
1268
+ ## Fenced code
1269
+
1270
+ A fence that names a language highlight.js knows is highlighted when the page is built, so a Foundry journal and the editor preview show a listing with its keywords, strings and comments coloured. The colours follow the light or dark scheme the page is in. A fence with no language, or a language highlight.js does not know, is shown as plain text.
1271
+
1272
+ ````markdown
1273
+ ```js
1274
+ const lantern = "lit"; // the harbor light
1275
+ ```
1276
+ ````
1277
+
1278
+ A fence named `sql`, `pagelist` or `verse` is not a listing: a query is replaced by its table, and verse is set as a poem.
1279
+
872
1280
  ## SQL generated tables
873
1281
 
874
1282
  A fence marked `sql` is replaced by a table built from the content index. The query reads the frontmatter of every indexed note, so a table is written once and stays true as notes are added.
@@ -889,11 +1297,11 @@ A column's heading is its SQL alias, so `AS "Name"` is what a reader sees. A cel
889
1297
  | `entries` | Every note, stubs included. |
890
1298
  | `events` | One row per event a `lore`, `place` or `affiliation` note writes in `data.events`, with `whenSort` to order them by date. |
891
1299
  | `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 poetry 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). |
1300
+ | `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
1301
  | `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
1302
  | `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
1303
  | `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. |
1304
+ | `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
1305
  | `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
1306
  | `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
1307
  | `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. |
@@ -907,7 +1315,7 @@ A column's heading is its SQL alias, so `AS "Name"` is what a reader sees. A cel
907
1315
  | `edges` | One row per entry of a language note's `data.sounds.edges`: the `edge` and its `sounds` as a list. |
908
1316
  | `clusters` | One row per language note stating `data.sounds.clusters`, with its `max`. |
909
1317
  | `cluster_groups` | One row per group of a language note's `data.sounds.clusters.groups`: `what`, `clusters` as a list, and `use`. |
910
- | `stress` | One row per language note stating `data.sounds.stress`, with its `stress`. |
1318
+ | `stress` | One row per language note stating `data.sounds.stress`, with its `two`, `longer` and `mark` (`NULL` where unstated). |
911
1319
  | `finals` | One row per entry of a language note's `data.sounds.finals`: `final` and `like`. |
912
1320
  | `syllables` | One row per language note stating `data.sounds.syllables`: each rule a column, the harmony as `harmony_back`, `harmony_front`, `harmony_neutral`, `harmony_neutralAs` and `harmony_partners`, a list of `{ vowel, partner }`. |
913
1321
  | `joining` | One row per entry of a language note's `data.sounds.joining`: `first`, `second`, `written` and `example`. |
@@ -1223,7 +1631,7 @@ The stress rule, the syllable rules and the finals. A rule of `syllables` is a c
1223
1631
 
1224
1632
  ````markdown
1225
1633
  ```sql
1226
- SELECT 'Stress falls on' AS "Rule", stress AS "Value"
1634
+ SELECT 'Stress falls on' AS "Rule", two || ' of two syllables, ' || longer || ' of more' AS "Value"
1227
1635
  FROM stress WHERE language = 'thalorna-note-skill-vylarilng'
1228
1636
  ```
1229
1637
 
@@ -1642,92 +2050,56 @@ A page list names this package's own pages. A **stub** — a note with neither a
1642
2050
 
1643
2051
  See [page-list details](../reference/format-details.md#page-lists) for the directive's full behaviour.
1644
2052
 
1645
- ## Theme shortcodes
1646
-
1647
- The Hugo theme that renders every site defines four shortcodes. An author writes one in a note body as `{{< name … >}}`, and only the website renders it. The shared note pipeline leaves a shortcode in the source untouched, so the compendium packs and the printed book carry the call as literal text. Use a shortcode only on a page whose purpose is the website. Where a construct must reach all three surfaces, use one of the constructs earlier on this page, which every surface resolves.
1648
-
1649
- A shortcode takes either positional arguments or named ones, and a single call cannot mix the two. `{{< glyph "anubis" >}}` and `{{< glyph slug="anubis" frame="tablet" >}}` are both valid; `{{< glyph "anubis" frame="tablet" >}}` is refused by Hugo. A call to a shortcode that has a required argument and omits it fails the site build with the note's position.
1650
-
1651
- ### `cartouche`
2053
+ ## Signs: glyphs and cartouches
1652
2054
 
1653
- Renders a named SVG seal as an ornamental accent, as a block figure or inline with text. The image is read from `img/cartouches/<slug>.svg` in the consuming site's static files.
2055
+ A **glyph** is a small picture set in a line of text, such as the sign that writes a deity's name. A **cartouche** is a framed seal set among the words around it. Both are pictures the package ships, and both render on every surface: the Foundry journals, the website, the editor preview and the book.
1654
2056
 
1655
- | Parameter | Value | Default | What it does |
1656
- | --------- | ------------------ | ------------------ | ----------------------------------------------------------------------------------------------------- |
1657
- | `slug` | the SVG's basename | required | Names the file. May be given as the first positional argument when no other parameter is used. |
1658
- | `size` | `inline` | block | `inline` flows the image with the surrounding text. Any other value adds a `cartouche-<value>` class. |
1659
- | `align` | `left` or `right` | centered | Floats the figure so prose wraps around it. |
1660
- | `height` | a CSS length | set by the theme | Sets the image's height, for example `10rem` or `160px`. The width follows the image's aspect ratio. |
1661
- | `alt` | text | the humanized slug | The image's text alternative. |
1662
- | `caption` | text | none | A caption under the image. Block mode only; an inline cartouche ignores it. |
2057
+ Each is a bracket span: a glyph has the `.glyph` class and a cartouche has the `.cartouche` class.
1663
2058
 
1664
2059
  ```markdown
1665
- {{< cartouche "takheperu" >}}
2060
+ The name [Ra]{.glyph slug=ra} is written with one sign.
1666
2061
 
1667
- {{< cartouche slug="aukhelathu" height="10rem" align="right" >}}
2062
+ | God | Sign |
2063
+ | ------ | ------------------------------------------------- |
2064
+ | Anubis | [Anubis, jackal]{.glyph slug=anubis frame=tablet} |
1668
2065
 
1669
- {{< cartouche slug="anubis" caption="Anpu" >}}
1670
-
1671
- The sign {{< cartouche slug="ra" size="inline" >}} stands for the sun.
2066
+ The seal [Au'Khelathu]{.cartouche slug=aukhelathu height=10rem align=right caption="Au'Khelathu"} is cut above the gate.
1672
2067
  ```
1673
2068
 
1674
- The first call centers the `takheperu` seal as a block. The second floats the `aukhelathu` seal to the right at ten rem tall, with the following paragraph wrapping around it. The third adds a caption under the seal. The fourth sets the seal in the line of text.
1675
-
1676
- ### `exturl`
1677
-
1678
- Renders a web address as a code-styled string followed by a button that copies it to the clipboard. It exists for an address a reader is meant to paste somewhere, such as a server address or a manifest URL, where a clickable link would be the wrong affordance. The address is the first positional argument and the shortcode takes no other.
1679
-
1680
- | Parameter | Value | Default | What it does |
1681
- | ------------------ | ------------------------- | ------- | ---------------------------------------------------------------------- |
1682
- | first (positional) | the text to show and copy | none | The string displayed in the code element and written to the clipboard. |
1683
-
1684
- ```markdown
1685
- Install from {{< exturl "https://example.org/module/manifest.json" >}} in the module browser.
1686
- ```
1687
-
1688
- The page shows the address in a code element with a copy icon beside it. Selecting the icon copies the address and briefly marks the button as copied. The text is not a link.
2069
+ Each picture is named by `slug` and is a file the package ships: a glyph is `assets/icons/<slug>.svg` and a cartouche is `assets/images/cartouches/<slug>.svg`. Each surface serves the file at the address it serves every other [image](#images-and-protected-content) at. Draw the SVG with `stroke="currentColor"` and `fill="none"` to take the colour of the surface it appears on.
1689
2070
 
1690
2071
  ### `glyph`
1691
2072
 
1692
- Renders an icon-scale SVG, such as a deity-name cluster, a category icon or an ornamental mark, in the line of text or as a block. The image is `icons/<slug>.svg`, resolved against the consuming site's `params.cdnBaseURL`. This is an image drawn from the site's icon directory; it is a separate construct from the `:icon name:` font glyphs of the [icon guide](../guides/icons.md), which every surface renders from the package's declared `icons` registry.
1693
-
1694
- | Parameter | Value | Default | What it does |
1695
- | --------- | ------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------- |
1696
- | `slug` | the SVG's basename | required | Names the file. May be given as the first positional argument when no other parameter is used. |
1697
- | `frame` | `tablet` | none | Sets the glyph inside a limestone rectangular frame, so rows of different intrinsic width line up in a table. |
1698
- | `size` | `inline` or `block` | 1.8em tall | `inline` is small and flows with the text. `block` centers the glyph as a standalone line. |
1699
- | `alt` | text | the humanized slug | The image's text alternative. |
1700
-
1701
- ```markdown
1702
- | God | Glyph |
1703
- | ------ | ------------------------------------------ |
1704
- | Anubis | {{< glyph slug="anubis" frame="tablet" >}} |
2073
+ The label between the brackets is the picture's text alternative, read aloud by a screen reader and printed in the book when the package ships no file for the sign. An empty label takes the humanized slug.
1705
2074
 
1706
- The name {{< glyph "ra" >}} is written with one sign.
2075
+ | Attribute | Value | Default | What it does |
2076
+ | --------- | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------- |
2077
+ | `slug` | the SVG's basename | required | Names the file `icons/<slug>.svg`. |
2078
+ | `frame` | `tablet` | none | Sets the glyph inside a limestone rectangular frame, so rows of different intrinsic width line up in a table. |
2079
+ | `size` | `inline` or `block` | 1.8em tall | `inline` is small and flows with the text. `block` centers the glyph as a standalone line. |
1707
2080
 
1708
- {{< glyph slug="ra" size="block" alt="Sun god Ra" >}}
1709
- ```
2081
+ A glyph takes no `#id`, no other class and no other attribute. Write the alternative text as the label; an `alt=` attribute is refused, as is any attribute the glyph does not take. A glyph with a finding is drawn as an ordinary span, and the finding names the line and column of the span.
1710
2082
 
1711
- ### `pagelist`
2083
+ This is a separate construct from the `:icon name:` font glyphs of the [icon guide](../guides/icons.md), which every surface renders from the package's declared `icons` registry.
1712
2084
 
1713
- Renders the pages carrying a tag as a list of links, ordered as asked. The group is expressed by intent: a page joins by being tagged and leaves by being untagged. The shortcode lists the site's own pages by the tags the site's taxonomy holds.
2085
+ ### `cartouche`
1714
2086
 
1715
- The ` ```pagelist ` fence described under [Page lists](#page-lists) is a different construct with its own attributes. The fence is answered by the content pipeline and reaches Foundry and the book; the shortcode is the site's alone.
2087
+ The label between the brackets is the picture's text alternative, read aloud by a screen reader and printed in the book when the package ships no file for the seal. An empty label takes the humanized slug. The seal is drawn as a figure at the place the span stands in the sentence.
1716
2088
 
1717
- | Parameter | Value | Default | What it does |
1718
- | --------- | --------------------------- | ------------- | ----------------------------------------------------------------------------------------------------- |
1719
- | `tag` | a tag | required | The taxonomy term to list, matched case-insensitively. May be given as the first positional argument. |
1720
- | `section` | a top-level section name | every section | Restricts the list to one section of the site, such as `rules`. |
1721
- | `sort` | `title`, `weight` or `date` | `title` | The order of the list. `date` puts the newest first. |
1722
- | `desc` | `true` | off | Shows each page's description beneath its link. Any other value leaves descriptions out. |
2089
+ | Attribute | Value | Default | What it does |
2090
+ | --------- | ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
2091
+ | `slug` | the SVG's basename | required | Names the file `images/cartouches/<slug>.svg`. |
2092
+ | `align` | `left` or `right` | centered | Floats the figure on the website and in Foundry so prose wraps around it. The book sets it at that side of its own line. |
2093
+ | `height` | a length | set by the theme | Sets the image's height, a number followed by `rem`, `em`, `px`, `pt`, `cm`, `mm` or `in`. The width follows the image's aspect ratio. |
2094
+ | `caption` | text | none | A caption under the image. |
1723
2095
 
1724
2096
  ```markdown
1725
- {{< pagelist tag="key-concept" >}}
2097
+ The seal [Ta Kheperu]{.cartouche slug=takheperu} is cut above the gate.
1726
2098
 
1727
- {{< pagelist tag="key-concept" section="rules" sort="weight" desc="true" >}}
2099
+ The seal of [Anpu]{.cartouche slug=anubis caption="Anpu"} is cut below it.
1728
2100
  ```
1729
2101
 
1730
- The first call lists every page tagged `key-concept` alphabetically by title. The second lists only those in the `rules` section, in weight order, each followed by its description. A tag that no page carries produces a build warning naming the tag and the note's position, and the list is left out.
2102
+ The first span centers the `takheperu` seal and takes its alternative text from the label. The second adds a caption under the `anubis` seal. A cartouche takes no `#id`, no other class and no other attribute; write the alternative text as the label, because an `alt=` attribute is refused, as is `size=`. A cartouche with a finding is drawn as an ordinary span, and the finding names the line and column of the span. A `:::cartouche` fence is not a cartouche: it is reported like any other unknown block and draws nothing.
1731
2103
 
1732
2104
  ## Expressions
1733
2105
 
@@ -1744,7 +2116,7 @@ There are {{words (sql "SELECT COUNT(*) FROM notes WHERE type = 'being'")}} bein
1744
2116
  - **An expression is one line.** It may not contain a line break or a brace.
1745
2117
  - **A failed expression leaves its own text in the page** and reports the line and column it is written on, so the page is readable and the fault is locatable.
1746
2118
  - **`\{{` writes an expression without evaluating it**, for an example in prose.
1747
- - **`{{{…}}}`, `{{<…}}` and `{{%…}}` are left alone.** A Hugo shortcode is not an expression.
2119
+ - **`{{{…}}}` is left alone.**
1748
2120
  - **An expression inside a code fence is left alone.**
1749
2121
  - Helpers nest, with the inner call in parentheses: `{{words (sql "…")}}`.
1750
2122