txt section numbering, @typeface :middle/:lift and html scale, NewGardinerOmni, html :leading (from dev 9fa469dd74ed)

Section headings under txt are numbered inside a @document only; @typeface
gains :middle and :lift and its :scale now means the same in html and
pdf; NewGardinerOmni ships (OFL 1.1, Mark-Jan Nederhof) and @egyptian /
@chinese replace @cjk; @table :leading and :colsep reach html; kdesc
--typeface help names the flag; @document.txt is a Python class.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ackandClaude Fable 5.1 committed 2026-09-18 20:02:44 +02:00
1 parent 0ead40f272
commit 63956c00e5
26 files changed
+437 -173

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
import kutil
import klammer_base
import phases
class Document(klammer_base.Klammer_base):
def __init__(self, K):
super().__init__(K)
if self.files:
raise Exception("The :files option is not defined for the 'txt' target")
def html(self):
raise Exception("Implemented by document.cpp")
def tex(self):
raise Exception("Implemented by document.cpp")
def txt(self):
# The document marker: section numbering under txt is a document
# service, and the numbering phase numbers only when it finds this
# at the head of the text (a fragment, as kdesc renders, has none).
result = phases.txt_document_marker() + "\n"
if self.title:
result += f"@b {self.title} @ @nl@\n"
if self.subtitle:
result += f"@b {self.subtitle} @ @nl@\n"
result += "\n"
if self.author:
result += f"@i {self.author} @ @nl@\n"
if self.date:
result += f"@i {self.date} @ @nl@\n"
result += "\n"
result += self.text
return result