@heroiclands/package-build 24.0.3 → 24.1.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.
@@ -343,48 +343,58 @@ Foundry renders a secret section; the website renders an expandable spoiler, and
343
343
 
344
344
  ### Verse
345
345
 
346
- Use a code fence with the language `verse` to preserve verse lines and stanzas. Every nonblank source line
347
- is one verse line; blank lines separate stanzas. Inline emphasis, links and
348
- footnotes work as they do in prose. The fence itself adds no title, caption or
349
- number.
350
-
351
- Leading spaces indent individual verse lines. The least-indented nonblank line
352
- sets level zero for the whole poem, so a common indentation on every line has no
353
- visual effect. Each additional two spaces adds one level, up to `i8`; an odd
354
- extra space rounds down. Each medium sets the actual width of a level, with
355
- every higher level wider than the preceding one. Tabs anywhere in the poem are
356
- an error. Interior spaces are preserved on a best-effort basis.
357
-
358
- | Extra leading spaces | Indent class |
359
- | -------------------- | ------------ |
360
- | 0–1 | none |
361
- | 2–3 | `i1` |
362
- | 4–5 | `i2` |
363
- | 6–7 | `i3` |
364
- | 8–9 | `i4` |
365
- | 10–11 | `i5` |
366
- | 12–13 | `i6` |
367
- | 14–15 | `i7` |
368
- | 16 or more | `i8` |
369
-
370
- For example, a line with four leading spaces and a line with six leading spaces
371
- render at levels zero and `i1` respectively. This also works when the entire
372
- fence is indented inside a list item. Verse is upright by default; use normal
373
- Markdown emphasis when italics are part of the poem.
346
+ Use a code fence with the language `verse` to preserve verse lines and stanzas.
347
+ Each nonblank source line is one verse line. A blank line separates verse units;
348
+ `***` on a line by itself separates stanzas. Neither separator is numbered.
349
+ The fence itself adds no title, caption or number.
350
+
351
+ Leading periods set indentation: one `.` per level. They are removed
352
+ from the displayed line. Leading spaces are ignored and do not set indentation.
353
+ Periods inside the first inline span also set indentation when that span begins
354
+ the line; periods in later spans are literal text. Interior spaces between text
355
+ and spans are preserved. Tabs anywhere in the poem are an error. Each medium
356
+ sets the actual width of an indent level, with every higher level wider than the
357
+ preceding one.
358
+
359
+ Levels 1 through 8 use the `i1`–`i8` indent classes. Deeper levels retain
360
+ their full depth in the generated indent width.
361
+
362
+ For example, `.A line` is indented one level, while ` ..A line` is indented
363
+ two levels: the spaces do not count. Verse is upright by default. English text
364
+ can use Markdown emphasis; emphasis inside a span whose effective language is
365
+ not English is an error. See [emphasis in a script](#emphasis-in-a-script).
366
+
367
+ A verse line can mix plain English, language-marked spans and more English on
368
+ one authored line. Spaces are kept exactly as written between those runs; the
369
+ spans add no spaces of their own. A period at the start of the first span also
370
+ sets that line's indentation:
371
+
372
+ ````markdown
373
+ ```verse {lang=en}
374
+ ..The [boundary]{lang=en} is [thiruthriman]{lang=vyl} again.
375
+ [.The boundary]{lang=en} is [thiruthriman]{lang=vyl} again.
376
+ ```
377
+ ````
378
+
379
+ Both lines have one verse number apiece when numbering is enabled. In the
380
+ second, the leading period inside the first span is removed and indents the
381
+ whole line.
374
382
 
375
383
  ````markdown
376
384
  ```verse {form=ballad lang=en}
377
385
  The lantern burns beside the gate,
378
386
  The harbor sleeps below.
379
387
 
388
+ ***
389
+
380
390
  The keeper guards the road till dawn,
381
391
  And keeps a light aglow.
382
392
  ```
383
393
  ````
384
394
 
385
395
  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,
396
+ infer stress, rhyme or pronunciation. `numstep` numbers the logical rows, and `cols`
397
+ sets the poem's column count; see below. `lang` names the poem's language,
388
398
  `font` the font it is set in and `map` the mapping its text is rewritten by; see
389
399
  [marking language, font and mapping](#marking-language-font-and-mapping). An optional `#id`
390
400
  addresses the poem itself. There are no `title` or `lines` attributes, and no
@@ -423,6 +433,12 @@ Thiruthriman sorimamen, ul alathas kedis alatha valmazor,
423
433
 
424
434
  > ``this line has 4 beats (5 with secondary beats); the metre `hexameter` has 6``
425
435
 
436
+ `scan=` uses the fence's one language to count beats. If a verse line contains
437
+ a run in another language, the build does not scan that run with the fence
438
+ language's stress rules; it reports an error at the line:
439
+
440
+ > `` `scan=` counts one language’s beats; this verse line contains another language ``
441
+
426
442
  Beats are counted this way:
427
443
 
428
444
  - **Syllables** are vowel groups. A vowel is a letter whose base is `a`, `e`,
@@ -481,70 +497,58 @@ The lantern burns beside the gate,
481
497
 
482
498
  #### Verse in columns
483
499
 
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]]`:
500
+ `cols=N` sets a positive whole number of columns and defaults to `1`. A
501
+ single-column poem keeps its physical lines without column prefixes. For
502
+ `cols` above one, every content line starts with its column number and one
503
+ or more spaces. The prefix selects its cell and is not displayed.
488
504
 
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.
505
+ A blank line ends a **logical verse row**. Within that row, numbers must be
506
+ in `1..cols` and nondecreasing: finish one column before starting a higher
507
+ one. Any column may be omitted; its empty cell remains in the grid. A column
508
+ may hold any number of readings. Its first line uses the foreground color,
509
+ and every subsequent line in that same column is grey. Each column starts
510
+ its own foreground line, and the choice resets in the next row.
494
511
 
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:
512
+ This sparse three-column poem leaves the middle cell empty in its first row:
506
513
 
507
514
  ````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
- ***
515
+ ```verse {form=epic lang=en numstep=5 cols=3}
516
+ 1 [Thiruthriman sorimamen,]{.nativefont lang=vyl}
517
+ 3 [The hallowed boundary I sing,]{lang=en}
518
+ 3 [Thiruthriman sorimamen,]{lang=vyl}
516
519
 
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.
520
+ 1 [ul alathas kedis alatha valmazor, ul talothoi]{.nativefont lang=vyl}
521
+ 2 [Nothing to say]{lang=en}
522
+ 3 [and the one who walked it, and the stones]{lang=en}
523
+ 3 [ul alathas kedis alatha valmazor, ul talothoi]{lang=vyl}
522
524
  ```
523
525
  ````
524
526
 
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`.
527
+ The left cell uses Vylari's configured native script. The third cell contains
528
+ an English reading in foreground and a separately authored Roman Vylari
529
+ reading in grey. Language labels identify words; column numbers alone place
530
+ them. `.nativefont`, `lang=`, `font=` and `map=` are written on the actual
531
+ runs, so a Roman repeat makes its own presentation choice. Inline links and
532
+ mixed-language spans stay in their authored order with their spaces intact.
529
533
 
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.
534
+ `numstep=N` counts logical rows, not their individual readings. A standalone
535
+ `***` separates stanzas, and column order resets after it as after a blank
536
+ line. Leading periods after the number and its separating spaces set a
537
+ reading's indent. Periods at the start of its first span also count; periods
538
+ inside later spans remain text. For example:
536
539
 
537
- **The rules of a verse in columns:**
540
+ ```markdown
541
+ 1 [.Thiruthriman [the boundary]{lang=en} sorimamen]{lang=vyl}
542
+ 3 [The hallowed boundary I sing,]{lang=en}
543
+ ```
538
544
 
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
+ Every target aligns a logical row's cells at the top, including empty ones.
546
+ On a narrow screen or journal, cells stack in their numbered order. A reading
547
+ in a right-to-left face stays in its chosen cell and runs right to left
548
+ within it. The book uses the same row and cell order.
545
549
 
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).
550
+ Findings point to the authored `cols` value, column prefix or inline run;
551
+ see [a verse in columns](../diagnostics.md#a-worked-case-a-verse-in-columns).
548
552
 
549
553
  ### Scrolls
550
554
 
@@ -553,7 +557,7 @@ read from the right, as on a handscroll. A `scroll` fence sets a passage in one
553
557
  of these scripts:
554
558
 
555
559
  ````markdown
556
- ```scroll {rows=25 cols=12 lang=tsu map=tengchou}
560
+ ```scroll {rows=25 cols=12 lang=tsu map=tengchou .nativefont}
557
561
  chen teng chou hing
558
562
  tan tsou dou rou
559
563
 
@@ -570,23 +574,24 @@ A scroll fence is a real code fence, so Markdown never reformats its body.
570
574
  - **`rows=`** is the number of characters in a column, and **`cols=`** the
571
575
  number of columns in a panel. Each is a whole number above zero, and either
572
576
  may be left out.
573
- - **`lang=`, `font=` and `map=`** work as they do on a verse fence. See
577
+ - **`lang=`, `.nativefont`, `font=` and `map=`** work as they do on a verse fence. See
574
578
  [marking language, font and mapping](#marking-language-font-and-mapping).
575
579
  The text is mapped before it is laid out, so under a
576
580
  [logographic map](#logographic-maps) each word is written by its
577
581
  characters, one to a morpheme. The map's rows decide what is written
578
582
  between words, and a map for a script that runs its characters together
579
- writes a space as nothing. If the fence names no `font=`, it takes the face
580
- of its map, provided the map is drawn in exactly one face. A fence marked
581
- only with a language whose note names its script, such as
582
- ` ```scroll {rows=25 cols=12 lang=tsu} `, takes that script's map and face;
583
+ writes a space as nothing. A scroll requires its own `lang=` and
584
+ `.nativefont`; its font comes from that language's default or an explicit
585
+ `font=`, never from the map's list of faces. For example,
586
+ ` ```scroll {rows=25 cols=12 lang=tsu .nativefont} ` takes Tantsou's
587
+ configured map and face;
583
588
  see [a language's script](#a-languages-script).
584
589
  - **The direction comes from the script.** The face's script note states
585
590
  `direction: vertical-rl` in its `data.script`; see
586
591
  [script notes and emphasis](../reference/format-details.md#script-notes-and-emphasis).
587
592
  A script that states no direction is written in lines, and a scroll fence
588
593
  set in it is an error. Markup never states a direction itself.
589
- - **Spans stay horizontal.** A `[…]{lang=… font=… map=…}` span in the same
594
+ - **Spans stay horizontal.** A `[…]{lang=… font=… map=… .nativefont}` span in the same
590
595
  script sets its characters left to right, inline, so a short phrase can sit
591
596
  in a line of prose.
592
597
 
@@ -629,8 +634,8 @@ In the book, a space that a map leaves in the text takes up a whole cell.
629
634
  | `` `rows=0` is not a number of characters: `rows=` is a whole number above zero `` | Write a whole number above zero, or leave the key out. |
630
635
  | `` `cols=two` is not a number of columns: `cols=` is a whole number above zero `` | Write a whole number above zero, or leave the key out. |
631
636
  | `` `width=` is not a scroll attribute; a scroll takes `rows=`, `cols=`, `lang=`, `font=` and `map=` `` | Remove the key. |
632
- | ``a `scroll` fence names the face it is set in, with `font=`, a map drawn in one face, with `map=`, or a language whose note names its script in `data.writtenIn`, with `lang=` `` | Name the face, the map, or a language with a script. |
633
- | ``the map `x` is drawn in more than one face; a `scroll` fence names its face with `font=` `` | Add `font=`. |
637
+ | ``a scroll requires `.nativefont` and an explicit `lang=` on the same construct`` | Add the class and the scroll's language. |
638
+ | `` `.nativefont` has no default `font=` for `tsu`; state `font=` explicitly `` | Add `font=`, or a font default on the language note. |
634
639
  | ``a `scroll` fence sets a script written in columns, and the script of `semaron-kuriale` is written in lines; set it in a face whose script note states `direction: vertical-rl`, or use a div`` | Set the text in a script written in columns, or use a div. |
635
640
  | `scroll fence is empty`, `scroll fence needs a closing code fence`, `` a scroll fence takes no `#id` `` | Write the text, close the fence, or remove the id. |
636
641
 
@@ -639,16 +644,23 @@ has an error is set exactly as written.
639
644
 
640
645
  ## Marking language, font and mapping
641
646
 
642
- Three keys go in the attribute block a span, a fenced div, a verse fence or a
643
- [scroll fence](#scrolls) already takes. Each is optional, and each does one thing:
647
+ `lang=` identifies the language. It preserves the authored spelling and the
648
+ surrounding prose font. Add **`.nativefont`** to request native script:
649
+
650
+ - **`lang=`** names the language and gives the element its language tag.
651
+ Existing language and vocabulary checks apply in either presentation.
652
+ - **`.nativefont`** requires an explicit `lang=` on that same construct. It
653
+ selects the language note's `data.writtenIn` map and font. A surrounding
654
+ language annotation does not satisfy this requirement.
655
+ - **`font=`** overrides the native font independently of the map. Without
656
+ `.nativefont`, only the Roman families `mono`, `serif` and `sans` are allowed.
657
+ - **`map=`** overrides the native mapping independently of the font and
658
+ requires `.nativefont`.
644
659
 
645
- - **`lang=`** names the language of the text. It becomes the element's
646
- language tag, and where the language's note names
647
- [its script](#a-languages-script), the run takes that script's map and face.
648
- - **`font=`** names the font the text is set in: one of the faces of
649
- `@heroiclands/fonts`, or `mono`, `serif` or `sans`.
650
- - **`map=`** names a [mapping note](#mapping-notes), which rewrites the text
651
- before it is set. Without `map=`, the text is set exactly as typed.
660
+ These attributes go on a span, a fenced div, a verse fence or a
661
+ [scroll fence](#scrolls). A native run needs a font from its language or an explicit `font=`. A
662
+ configured map is selected unless `map=` overrides it; without a configured
663
+ or explicit map, directly typed script code points are kept as written. A mismatch between the selected map and font is an error.
652
664
 
653
665
  A note records Unicode characters. A face draws its own code points, so text in
654
666
  a face is either typed in those code points (with a keyboard layout for the
@@ -663,16 +675,41 @@ The greeting at the door is [Daimela, helthos.]{lang=vyl}
663
675
  Vylari typed in roman letters, mapped into Semaron Kuriale and set in it:
664
676
 
665
677
  ```markdown
666
- The lintel is cut with [Zaron tholmeza]{lang=vyl font=semaron-kuriale map=semaron}.
678
+ The lintel is cut with [Zaron tholmeza]{lang=vyl font=semaron-kuriale map=semaron .nativefont}.
667
679
  ```
668
680
 
669
- Text typed in the face's own code points, with a keyboard layout for the face,
670
- takes no map: `[…]{font=semaron-kuriale}` sets those code points as they are.
681
+ A named reference takes the same keys directly after its wikilink. This
682
+ example identifies the name while retaining Roman spelling:
683
+
684
+ ```markdown
685
+ [Keeper of the open book, ]{lang=en}[[lore-marendasdty|Marendas]]{lang=vyl}[, hear us.]{lang=en}
686
+ ```
687
+
688
+ The reference's language, font and mapping apply to its visible name. Its
689
+ navigation, spoiler styling and draft cue are preserved. Keep surrounding
690
+ prose in adjacent spans, including their spaces and punctuation; a longer
691
+ span of declared-language prose cannot contain a link.
692
+
693
+ A language-marked reference stays in Roman spelling unless it opts in:
694
+
695
+ ```markdown
696
+ [[lore-marendasdty|Marendas]]{lang=vyl}
697
+ [[lore-marendasdty|Marendas]]{lang=vyl .nativefont}
698
+ ```
699
+
700
+ The second reference uses Vylari's configured native defaults. Its visible name
701
+ alone takes the mapping and font; URLs, Foundry UUIDs, draft cues and book page
702
+ references retain their existing behavior. `.secret` and `.show` work normally.
703
+
704
+ Text already typed in the script's code points also uses `.nativefont`, an
705
+ explicit language and a font. A configured or explicit map still applies;
706
+ its rows leave code points with no matching row unchanged. Without a map, the
707
+ typed code points reach the font unchanged.
671
708
 
672
709
  A passage of several paragraphs is a fenced div:
673
710
 
674
711
  ```markdown
675
- ::: {lang=vyl font=semaron-kuriale map=semaron}
712
+ ::: {lang=vyl font=semaron-kuriale map=semaron .nativefont}
676
713
  Zaron tholmeza.
677
714
 
678
715
  Daimela, helthos.
@@ -682,22 +719,29 @@ Daimela, helthos.
682
719
  A poem takes the keys on its fence, beside its other attributes:
683
720
 
684
721
  ````markdown
685
- ```verse {form=epic lang=vyl font=semaron-kuriale map=semaron}
722
+ ```verse {form=epic lang=vyl font=semaron-kuriale map=semaron .nativefont}
686
723
  Zaron tholmeza,
687
724
  daimela, helthos.
688
725
  ```
689
726
  ````
690
727
 
691
- **A run inside a div or a verse fence inherits its keys**, and its own keys
692
- override them. Here the gloss keeps the passage's language and map, and is set
693
- in the page's serif:
728
+ **Unmarked text follows its passage; a marked child chooses its own
729
+ presentation.** A language-only span stays Roman even inside a native passage,
730
+ including when its language matches the passage. To set a child in native
731
+ script, give that child both its own `lang=` and `.nativefont`.
694
732
 
695
733
  ```markdown
696
- ::: {lang=vyl font=semaron-kuriale map=semaron}
734
+ ::: {lang=vyl .nativefont}
697
735
  Zaron tholmeza, [an oath, a vow]{lang=en font=serif}.
736
+ [Zaron tholmeza]{lang=vyl} gives the Roman reading.
737
+ [Zaron tholmeza]{lang=vyl .nativefont} gives the native reading.
698
738
  :::
699
739
  ```
700
740
 
741
+ An unmarked span inherits the surrounding language for validation. A child
742
+ `.nativefont` does not inherit its parent's explicit map or font: its own
743
+ language supplies the defaults, and its own overrides choose the alternatives.
744
+
701
745
  ### A language's script
702
746
 
703
747
  A language note can name the script its language is written in, as one map and
@@ -708,36 +752,35 @@ data:
708
752
  writtenIn: { map: semaron, font: semaron-kuriale }
709
753
  ```
710
754
 
711
- A run marked with that language alone is then mapped and set as though it named
712
- both. With Vylari's note stating the default above, these two spans are set
713
- identically:
755
+ The defaults are used only when the run explicitly opts into native
756
+ presentation. With Vylari's note stating the default above, the first span
757
+ stays Roman and the next two display the same native text:
714
758
 
715
759
  ```markdown
716
- The lintel is cut with [Zaron tholmeza]{lang=vyl}.
717
- The lintel is cut with [Zaron tholmeza]{lang=vyl font=semaron-kuriale map=semaron}.
760
+ [Zaron tholmeza]{lang=vyl}
761
+ [Zaron tholmeza]{lang=vyl .nativefont}
762
+ [Zaron tholmeza]{lang=vyl .nativefont font=semaron-kuriale map=semaron}
718
763
  ```
719
764
 
720
- The same holds for a div, a verse fence and a [scroll fence](#scrolls). A run
721
- fills in what it leaves unstated, and an explicit key overrides its half of the
722
- default:
765
+ This applies to divs, verse fences, [scroll fences](#scrolls) and standalone
766
+ wikilinks. The overrides are independent:
723
767
 
724
- | The run states | It takes from the language |
725
- | -------------------------- | -------------------------------------------------------------- |
726
- | neither `map=` nor `font=` | the map and the face |
727
- | `font=` alone | the map, where the map is drawn in that face; otherwise no map |
728
- | `map=` alone | the face, where that map is drawn in it; otherwise no face |
729
- | both | nothing |
768
+ | A native run states | It takes from its language |
769
+ | ------------------- | --------------------------- |
770
+ | neither override | the configured map and font |
771
+ | `font=` alone | the configured map |
772
+ | `map=` alone | the configured font |
773
+ | both | neither default |
730
774
 
731
- So a language written in more than one script names its usual one in
732
- `data.writtenIn` and marks a run in another with that script's keys:
733
- `[Gar-Anlagh]{lang=khel font=qalezu-hand map=qalezu}`. `[Zaron]{lang=vyl
734
- font=serif}` sets Vylari in the page's serif, unmapped, since Semaron's map is
735
- not drawn in it.
775
+ A missing font default is an error naming the required `font=` override.
776
+ An incompatible pair is an error; the build does not drop one half or guess a
777
+ replacement. A language written in several scripts states its usual one in
778
+ `data.writtenIn`, then uses both overrides for another:
779
+ `[Gar-Anlagh]{lang=khel .nativefont font=qalezu-hand map=qalezu}`.
736
780
 
737
- The default is the run's own language's, read after a div or fence around the
738
- run gives it its keys. Inside `::: {lang=vyl}`, a gloss marked
739
- `[an oath]{lang=en}` takes no face from Vylari. A language whose note states no
740
- `data.writtenIn` marks its runs with its tag alone.
781
+ `[Zaron]{lang=vyl font=serif}` stays Roman in the page's serif. Adding
782
+ `.nativefont` selects native mapping; a generic Roman font is not an escape
783
+ from the native map/font compatibility check.
741
784
 
742
785
  `lint` checks the key on the language note: `map` must be the `data.map.name`
743
786
  of a mapping note in the package, and `font` one of the faces that map lists.
@@ -767,10 +810,9 @@ an error. Because a tag is checked only for its form, a misspelled name that is
767
810
  still a well-formed tag, such as `vly` for `vyl`, is read as the tag of a real
768
811
  language. When such a value is within one edit of a declared name (a letter
769
812
  added, dropped or changed, two neighbours swapped, or a different case), `lint`
770
- warns and names the declared language. Text marked with `lang=` alone is not
771
- checked against any lexicon unless its language names
772
- [its script](#a-languages-script); a run with `lang=` and a map is, as
773
- [a mapped run's words](#a-mapped-runs-words) describes.
813
+ warns and names the declared language. A configured language with a `note`
814
+ checks its words whether the run stays Roman or opts into native presentation;
815
+ see [a mapped run's words](#a-mapped-runs-words).
774
816
 
775
817
  ### What `font=` takes
776
818
 
@@ -805,7 +847,12 @@ is one of them.
805
847
 
806
848
  **With `lang=`, the language's dictionary comes first.** Where
807
849
  [`languages.<name>.note`](../configuration.md#languages) names the language's
808
- note, each word of the run is looked up in its `data.words`:
850
+ note, each word of the run is looked up in its `data.words` and the words of
851
+ its `data.family` chain. The nearest exact NFC form supplies the entire word
852
+ entry, including variants and native spellings; an override replaces the whole
853
+ ancestor entry. Case and word separators remain part of that identity.
854
+ Grammar, registered names and the default writing script remain the daughter's
855
+ own. An inherited native spelling applies only to the map and face it names:
809
856
 
810
857
  1. **A word whose entry states a `native` form for the map** is written by it:
811
858
  the form stated for the run's face where there is one, else the form stated
@@ -824,8 +871,9 @@ form that begins otherwise cannot be capitalised by the rows, and the
824
871
  capitalised word is an error; state it as a word of its own, `Orlan` beside
825
872
  `orlan`, with its own native form.
826
873
 
827
- With `map=` and no `lang=`, a bare tag, or a declared language with no `note`,
828
- the rows alone apply.
874
+ A native run with an explicit bare BCP 47 tag, such as `lang=und`, or a
875
+ declared language with no `note`, uses the rows alone. It still requires
876
+ `.nativefont` and an effective font.
829
877
 
830
878
  Take Vylari's `zaron`, an oath, written in Semaron. With no exception stated,
831
879
  the rows spell it letter by letter, as they spell any word:
@@ -838,7 +886,7 @@ the rows spell it letter by letter, as they spell any word:
838
886
  ```
839
887
 
840
888
  Where the chancery writes the word another way, the entry states that once,
841
- and `[zaron]{lang=vyl font=semaron-kuriale map=semaron}` is written by it:
889
+ and `[zaron]{lang=vyl font=semaron-kuriale map=semaron .nativefont}` is written by it:
842
890
 
843
891
  ```yaml
844
892
  - form: zaron
@@ -858,7 +906,7 @@ vyl zaron` converts a passage, both through the build's own code; see
858
906
 
859
907
  ### A mapped run's words
860
908
 
861
- **Every word of a run with `lang=` and `map=` is a word of its language**, where
909
+ **Every word of a run with `lang=` is a word of its language**, where
862
910
  the language's [`note`](../configuration.md#languages) names its language note.
863
911
  Each word, case folded, is one of:
864
912
 
@@ -966,8 +1014,7 @@ register:
966
1014
  - { name: Revothar Baremzator, tongue: vylari }
967
1015
  ```
968
1016
 
969
- A run with `lang=` and no `map=`, a run with `map=` and no
970
- `lang=`, a bare BCP 47 tag and a declared language with no `note` are not
1017
+ A bare BCP 47 tag and a declared language with no `note` are not
971
1018
  checked.
972
1019
 
973
1020
  ### Logographic maps
@@ -1037,7 +1084,7 @@ words:
1037
1084
  built: [halzi, -unet]
1038
1085
  ```
1039
1086
 
1040
- `[halzi halzunet halziim]{lang=khel font=khelathi-zethu-glyphs map=zethu}` is
1087
+ `[halzi halzunet halziim]{lang=khel font=khelathi-zethu-glyphs map=zethu .nativefont}` is
1041
1088
  written U+1EABB, then U+1EABB U+1EBC7, then U+1EABB U+1EBE1, with the spaces
1042
1089
  the rows write between them. A word of the run that resolves to nothing is
1043
1090
  reported once per run:
@@ -1140,14 +1187,14 @@ finding the lint reports in `data.map`.
1140
1187
  Every target rewrites marked text first, so a page, a Foundry journal and a
1141
1188
  book all show the same thing.
1142
1189
 
1143
- | Marking | The text | The element |
1144
- | -------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
1145
- | `lang=` alone | As written | Tagged with the language's tag, `lang="art-x-vyl"` |
1146
- | `map=` | Rewritten by the map, line by line | As below |
1147
- | `font=` a face | As written, or as the map wrote it | The tag, `script` and the face's class; not indexed by the site's search |
1148
- | `font=mono`, `serif`, `sans` | As written, or as the map wrote it | The tag and `font-mono`, `font-serif` or `font-sans` |
1149
- | A div or fence in a right-to-left face | As above | Also `dir="rtl"`; a div also carries `script-block` |
1150
- | A scroll fence | Each paragraph on one line | `scroll`, the tag, `script` and the face's class; see [scrolls](#scrolls) |
1190
+ | Marking | The text | The element |
1191
+ | -------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------- |
1192
+ | `lang=` alone | As written | Tagged with the language's tag, `lang="art-x-vyl"` |
1193
+ | `lang=… .nativefont` | Rewritten by the configured or overridden map | Native font and language tag |
1194
+ | `lang=… .nativefont font=…` | Mapped text | The tag, `script` and the face's class; not indexed by the site's search |
1195
+ | `font=mono`, `serif`, `sans` | As written, or as the map wrote it | The tag and `font-mono`, `font-serif` or `font-sans` |
1196
+ | A div or fence in a right-to-left face | As above | Also `dir="rtl"`; a div also carries `script-block` |
1197
+ | A scroll fence | Each paragraph on one line | `scroll`, the tag, `script` and the face's class; see [scrolls](#scrolls) |
1151
1198
 
1152
1199
  No target writes `<bdo>`, `<bdi>` or a Unicode direction control character: a
1153
1200
  right-to-left face's code points carry their own direction. Text with an error
@@ -1162,10 +1209,12 @@ alone. A block or verse in a right-to-left face is set right to left.
1162
1209
  Text marked with `font=` or `map=`, or with a language the package declares, is
1163
1210
  plain text.
1164
1211
 
1165
- - **A span or a verse line** holds no emphasis, link, image, footnote,
1166
- wikilink, code or HTML, and no span but a marked one inside a div or a fence.
1167
- Text set in a face is the one exception: it takes `*…*` and `**…**`, as
1168
- [emphasis in a script](#emphasis-in-a-script) describes.
1212
+ - **A span or a verse line** holds no link, image, footnote, wikilink, code or
1213
+ HTML, and no unmarked nested span. Marked spans may be nested. English may
1214
+ use Markdown emphasis; emphasis inside a span with an effective non-English
1215
+ language is an error. A standalone wikilink may carry language, font and map
1216
+ keys directly after it, as above; only its label is set. See [emphasis in a
1217
+ script](#emphasis-in-a-script).
1169
1218
  - **A div** holds paragraphs and line breaks only: no heading, list, block
1170
1219
  quote, code fence, verse fence, table, rule, footnote definition or nested
1171
1220
  block. Mark a poem's own fence instead of a div around it.
@@ -1177,7 +1226,13 @@ and a doubled `[[` a wikilink. `[^id]` is a footnote only where the note
1177
1226
  defines `[^id]:`. A bracket with no partner takes a backslash, `\[`.
1178
1227
 
1179
1228
  Text marked with a real language's tag alone keeps its Markdown, so
1180
- `[ad _astra_]{lang=la}` and an English poem with emphasis are both accepted.
1229
+ English text and spans may use emphasis. Any actual bold or italic Markdown
1230
+ inside a span whose effective language is not English is an error, whether the
1231
+ span marks a real language or an invented one, and whether it declares the
1232
+ language itself or inherits it from a surrounding div or fence. English (`en`)
1233
+ and English BCP 47 tags such as `en-US` remain eligible. Escaped delimiter
1234
+ characters are literal text, not emphasis. This restriction applies throughout
1235
+ the note, including outside verse.
1181
1236
 
1182
1237
  ### Emphasis in a script
1183
1238
 
@@ -1212,26 +1267,17 @@ data:
1212
1267
  ---
1213
1268
  ```
1214
1269
 
1215
- So a tongue that states nothing takes its script's convention. Provenzal set in
1216
- Semaron is rubric:
1217
-
1218
- ```markdown
1219
- The lintel reads [a _stressed_ word]{lang=prv font=semaron-kuriale map=semaron}.
1220
- ```
1221
-
1222
- and renders on the site as
1223
-
1224
- ```html
1225
- <span class="script hl-semaron-kuriale" lang="art-x-prv" data-pagefind-ignore="true"
1226
- >… <em class="emph-rubric">…</em> …</span
1227
- >
1228
- ```
1270
+ So a tongue that states nothing takes its script's convention. A script may
1271
+ still define how accepted emphasis renders, but a span with an effective
1272
+ non-English language cannot use Markdown emphasis even when that convention is
1273
+ `rubric` or `overline`.
1229
1274
 
1230
1275
  **A language may mark emphasis with a word** instead of a mark:
1231
1276
  `data.emphasis: words` on its language note. Emphasis in a run of that language
1232
- is then an error at the emphasis, and the remedy is the word the language
1233
- stresses with. A language may also state `rubric` or `overline`, which it takes
1234
- in every script it is written in.
1277
+ is an error; for a non-English language, the span restriction also applies
1278
+ regardless of its `data.emphasis` value. A language may state `rubric` or
1279
+ `overline`, which it takes in every script it is written in, but marked
1280
+ emphasis remains disallowed inside its non-English spans.
1235
1281
 
1236
1282
  `_…_` is emphasis equal to `*…*`, and `__…__` equal to `**…**`, so a note keeps
1237
1283
  its meaning when a formatter rewrites one pair to the other. A strikethrough is
@@ -1262,8 +1308,7 @@ that `lint` reports and that fails nothing:
1262
1308
  | `` `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. |
1263
1309
  | `` `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. |
1264
1310
  | `` `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`. |
1265
- | ``text marked `lang=vyl` is plain text and holds no emphasis`` | Remove the markup, or escape the character with a backslash. |
1266
- | ``text marked `lang=prv font=semaron-kuriale map=semaron` takes emphasis only as `*…*`, `_…_`, `**…**` or `__…__` `` | Write the emphasis with stars or underscores. |
1311
+ | ``a span in non-English language `vyl` holds no bold or italic markup`` | Remove the markup, or escape its delimiter characters. |
1267
1312
  | `` `vyl` marks emphasis with a word, not a mark; write the word `` | Remove the emphasis marks and write the word the language stresses with. |
1268
1313
  | ``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. |
1269
1314
  | `` `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. |