@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.
- package/CHANGELOG.md +53 -0
- package/README.md +6 -0
- package/assets/styles/content-base.css +25 -10
- package/docs/authoring/links-and-markup.md +221 -176
- package/docs/commands.md +5 -2
- package/docs/configuration.md +6 -3
- package/docs/content-format.md +4 -3
- package/docs/diagnostics.md +57 -29
- package/docs/guides/book.md +1 -1
- package/docs/guides/module-project.md +2 -2
- package/docs/guides/site.md +2 -2
- package/docs/guides/writing-in-invented-scripts.md +175 -125
- package/docs/reference/format-details.md +65 -38
- package/docs/reference/note-types.md +10 -10
- package/docs/reference/theme-pages.md +18 -9
- package/engine/content-render.mjs +23 -2
- package/engine/content-scripts.mjs +349 -120
- package/engine/content-spans.mjs +13 -1
- package/engine/content-verse.mjs +158 -373
- package/engine/core-report.mjs +10 -2
- package/engine/map-lexicon.mjs +37 -5
- package/engine/note-vocabulary.mjs +5 -5
- package/engine/pdf-render.mjs +63 -44
- package/engine/run-rows.mjs +18 -20
- package/engine/run-words.mjs +7 -7
- package/engine/verse-metre.mjs +36 -8
- package/engine/written-in.mjs +9 -13
- package/package.json +1 -1
- package/site-theme/static/css/style.css +19 -10
- package/types/engine/content-scripts.d.mts +18 -7
- package/types/engine/content-verse.d.mts +37 -163
- package/types/engine/map-lexicon.d.mts +3 -1
- package/types/engine/run-rows.d.mts +16 -9
- package/types/engine/run-words.d.mts +2 -1
- package/types/engine/verse-metre.d.mts +4 -3
|
@@ -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.
|
|
347
|
-
is one verse line
|
|
348
|
-
|
|
349
|
-
number.
|
|
350
|
-
|
|
351
|
-
Leading
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
an
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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
|
|
387
|
-
|
|
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
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
-
[
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
[
|
|
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
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
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
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
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
|
-
|
|
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
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
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
|
-
|
|
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.
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
` ```scroll {rows=25 cols=12 lang=tsu}
|
|
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
|
|
633
|
-
| ``
|
|
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
|
-
|
|
643
|
-
|
|
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
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
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
|
-
|
|
670
|
-
|
|
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
|
-
**
|
|
692
|
-
|
|
693
|
-
|
|
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
|
|
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
|
-
|
|
712
|
-
|
|
713
|
-
|
|
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
|
-
|
|
717
|
-
|
|
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
|
-
|
|
721
|
-
|
|
722
|
-
default:
|
|
765
|
+
This applies to divs, verse fences, [scroll fences](#scrolls) and standalone
|
|
766
|
+
wikilinks. The overrides are independent:
|
|
723
767
|
|
|
724
|
-
|
|
|
725
|
-
|
|
|
726
|
-
| neither
|
|
727
|
-
| `font=` alone
|
|
728
|
-
| `map=` alone
|
|
729
|
-
| both
|
|
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
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
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
|
-
|
|
738
|
-
|
|
739
|
-
|
|
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.
|
|
771
|
-
|
|
772
|
-
[
|
|
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
|
-
|
|
828
|
-
the rows alone
|
|
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=`
|
|
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
|
|
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
|
|
1144
|
-
| -------------------------------------- |
|
|
1145
|
-
| `lang=` alone | As written
|
|
1146
|
-
| `
|
|
1147
|
-
| `
|
|
1148
|
-
| `font=mono`, `serif`, `sans` | As written, or as the map wrote it
|
|
1149
|
-
| A div or fence in a right-to-left face | As above
|
|
1150
|
-
| A scroll fence | Each paragraph on one line
|
|
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
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
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
|
-
|
|
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.
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
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
|
|
1233
|
-
|
|
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
|
-
| ``
|
|
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. |
|