The ansi target, txt table styles, kdesc reference from ref/, typeface and table-width fixes (from dev fcec5e2e77ac)
Since the previous release: Machine::read_string() (the fs::path/std::string overload pair split); kdesc -c and -u rendered from the ref/ reflection klammerset; a fit column's tex width measured in TeX over every entry; @typeface resolving to the family its css declares (a store directory name now works in html) and hieroglyphs in @unicode_examples set in their typeface; the ansi target -- plain text with the type styles a terminal can show, identical to txt once the escape sequences are stripped -- with the txt @table carrying :header_style, :style and :hline; @block anchoring, @table spacing and the Image_quality state variable; and the rewritten doc/klammertext_for_llm.md.
This commit is contained in:
1 parent
760fda5470
commit
9b0d0d7897
34 files changed
+895
-394
No files matched your search
@@ -67,16 +67,25 @@ class Klammer_base:
|
||||
print(label)
|
||||
pprint.pprint(self.__dict__)
|
||||
|
||||
# A target that :includes another renders through the included one's
|
||||
# method: pdf is tex compiled, ansi is txt with escape sequences. The
|
||||
# Python side cannot see :includes, so the relation is restated here.
|
||||
# SYNC: the @@@target declarations in sks/target/target.k.
|
||||
TARGET_METHOD = {"html": "html",
|
||||
"tex": "tex", "pdf": "tex",
|
||||
"txt": "txt", "ansi": "txt"}
|
||||
|
||||
def __str__(self):
|
||||
result = None
|
||||
if self.K_target == 'html':
|
||||
method = Klammer_base.TARGET_METHOD.get(self.K_target)
|
||||
if method == 'html':
|
||||
result = self.html()
|
||||
elif self.K_target in {'tex', 'pdf'}:
|
||||
elif method == 'tex':
|
||||
result = kutil.escape(self.tex())
|
||||
elif self.K_target == 'txt':
|
||||
elif method == 'txt':
|
||||
result = self.txt()
|
||||
if result is None:
|
||||
#print(self.__dict__)
|
||||
raise Exception(
|
||||
f'Target "{self.K_target}" is undefined for klammer "@{self.K_klammer}"')
|
||||
f'Target "{self.K_target}" is undefined for klammer class '
|
||||
f'"{self.__class__.__name__}"')
|
||||
return result
|
||||
Reference in new issue
Block a user