katom types from ref/ in groups, @table :leading in lines of text and :rulesep, @code under txt, one table style attribute, literal-klammer options (from dev 2e453744f5e9)
kdesc --katoms is Klammertext rendered from ref/, the types in titled groups, with --katoms full for the regex column. @table :leading L is L lines of the surrounding text in html as in pdf (default 1), and :rulesep spaces the horizontal rules. The html table has one style attribute, so :column_width fractions take effect again. @code and @source_listing render in plain text; captions are numbered per kind there, and a table needs no blank line around it. @c takes :nd, and an option-shaped word before a bar inside literal code is code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
63956c00e5
commit
217c0f3fc5
23 files changed
+625
-290
No files matched your search
@@ -238,7 +238,12 @@ def hpos_container(element, hpos, offset=None):
|
||||
|
||||
def add_caption(element, caption_label, number, caption_text,
|
||||
font_symbol="i", hpos="center", side="bottom", as_string=True,
|
||||
font_size=.9, width=None, max_width=None, offset=None):
|
||||
font_size=.9, width=None, max_width=None, offset=None,
|
||||
caption_align=None):
|
||||
# caption_align "left" sets the caption flush with the element's left
|
||||
# edge, where the default centres it over the element: a caption above
|
||||
# a left-placed listing, which the tex target sets as a paragraph on the
|
||||
# listing's own indent.
|
||||
tag = element_tag(element)
|
||||
# Caption
|
||||
caption = ""
|
||||
@@ -276,6 +281,8 @@ def add_caption(element, caption_label, number, caption_text,
|
||||
#print("-"*80)
|
||||
|
||||
element = E("div").cls("caption_" + side).attr("data-label", caption_label).body(element)
|
||||
if caption_align == "left" and side in {"top", "bottom"}:
|
||||
element.cls("caption_flush_left")
|
||||
if width:
|
||||
# The element's width (e.g. a table's :column_width total) lives
|
||||
# on this wrapper: the element fills it, and the caption tracks
|
||||
|
||||
Reference in new issue
Block a user