Verbatim-safe typography, ^-punctuation quoting, full-range ^UUUU^, polyglot html

Typographic transforms (---, quote pairs, ~) no longer touch verbatim
text: @c/@code/@source_listing content and ^'...'^ spans show exactly the
characters written. "^" before any punctuation character quotes it in
every target (the apostrophe excepted: ^' opens a literal span), with the
new :resolve option on @@@target declaring per-target renderings. The
^UUUU^ code-point form accepts 4-6 hex digits, the full Unicode range.
The html output and transform spellings are polyglot (XML-valid), in
preparation for an EPUB target. New suites: transform_test, character_test
(engine), typography_test (SKS).

(from dev 07ce5ea86a0a)
This commit is contained in:
2026-08-23 20:48:26 +02:00
parent d982c0d6cc
commit 37b6ba1c4f
77 changed files with 1665 additions and 1608 deletions

View File

@@ -8,7 +8,7 @@ kt-part {
padding-top: 1.5rem;
margin-top: 0px;
font-family: var(--sans-serif);
font-size: 1.5rem;
/* font-size: 2.03rem; */ /* ladder top: 1.125^6 ... */
}
kt-chapter {
@@ -16,10 +16,11 @@ kt-chapter {
padding-top: 1.5rem;
margin-top: 0px;
font-family: var(--sans-serif);
font-size: 1.5rem;
/* font-size: 1.80rem; */ /* ... 1.125^5 */
}
/*
h1 {
padding-top: 1.5rem;
margin-top: 0;
@@ -27,10 +28,58 @@ h1 {
h2, h3, h4, h5 {
padding-top: 0.5rem;
margin-bottom: .5rem;
padding-top: 0.25rem;
margin-bottom: .25rem;
padding-bottom: 0rem;
}
*/
/* The heading ladder: a modular scale, ratio 1.125 (a "major second"),
flattening to weight below h4 -- seven visibly distinct sizes is more
hierarchy than an eye tracks. font-size-adjust (font.css) makes these
steps family-independent, so the rem values are the whole truth. */
/*
h1 {
font-size: 1.60rem;
}
h2 {
font-size: 1.42rem;
}
h3 {
font-size: 1.27rem;
}
h4 {
font-size: 1.13rem;
}
h5, h6 {
font-size: 1rem;
font-weight: bold;
}
*/
/* Too big. How about: */
kt-part { font-size: 1.4rem; }
kt-chapter { font-size: 1.4rem; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.15rem; }
h4, h5, h6 { font-size: 1.125rem; }
/* Vertical space not used to indicate hierarchical level: */
kt-part, kt-chapter, h1, h2, h3, h4, h5, h6 {
margin-top: 1.2rem;
margin-bottom: 0.0rem;
padding-top: 0;
padding-bottom: 0;
}
/* Table of contents: */
.sectiontitle {
}