Offer-motivated features: :hline defaults, ranged :hpos, @date :days, :bottom none

- @table: a writer's :hline/:vline replaces the default lines; new
  boundary name 'none' removes all lines
- @table: ranged :hpos argument overrides :cell_hpos per cell
  (\multicolumn{1} in tex; positions a colspan anchor's merged cell)
- @date/@datetime: :days offset argument (sks/date/date.py)
- @document: ":bottom none" suppresses the footer (\pagestyle{empty})

Also carries the escape-system generator/renderer fixes, per-cell-range
:format, and uppercase .TTF/.OTF font recognition from klammertext-dev.
This commit is contained in:
2026-07-24 21:37:58 +02:00
parent 8a2699a253
commit 4262fc6136
14 changed files with 657 additions and 146 deletions

View File

@@ -12,10 +12,13 @@ class Cell:
def __init__(self, text, font, hpos,
top, right, bottom, left,
left_all, right_all,
rowspan, colspan, first_column=False):
rowspan, colspan, first_column=False, hpos_forced=False):
self.text = text
self.font = font
self.hpos = hpos
# An :hpos override on an ordinary cell must reach the tex target
# through a \multicolumn{1} (the column spec sets the default).
self.hpos_forced = hpos_forced
self.border = border.Border(top, right, bottom, left, left_all, right_all)
self.rowspan = rowspan
self.colspan = colspan
@@ -74,7 +77,7 @@ class Cell:
left_marker = "xL" if remove_left else "L" if self.border.left_all else ""
right_marker = "Rx" if remove_right else "R" if self.border.right_all else ""
result = f"{left_marker} {result} {right_marker}"
if remove_left or remove_right:
if remove_left or remove_right or self.hpos_forced:
pos = self.hpos
if self.border.left_all and self.border.left:
pos = "|" + pos