Initial commit: Klammertext source distribution

Curated source subset assembled by klammertext-dev's doc/make_dist.sh: the Klammermachine (mac), the Standard Klammer Set (sks), the commands (com), editor plugins and install guides (doc), a test subset (tst), and lib/bin placeholders. Builds with 'make -C com'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-18 18:48:23 +02:00
commit 2ba7ceee7a
272 changed files with 27634 additions and 0 deletions

69
sks/table/table.k Normal file
View File

@@ -0,0 +1,69 @@
#[ f: 0->1; n: 1.. (integer)
l, c, r
[<numeric-size>] <width> <justification>
width is widest line in a cell f [default]
width is fraction of table <f>t
width is specific length <n>pt|px|in|cm [...not portable?]
width width is remaining (evenly divided) *
]#
@@@argtype table_hpos |
horizontal formatting in a table cell. One of 'l', 'c' or 'r' for each
cell in a row. If there are fewer positions than cells in a row, the
last value is repeated. Extra positions generate a warning. Default is 'l'
# :pattern ((f^|(0?\.'uint't^|\\*))[lcr]?^|\s)+
# :pattern ((f^|'float't^|\\*)[lcr]?^|\s)+
:pattern ([.\w]+^|\*^|\s+)+
#:pattern (l^|c^|r^|\s)+
:python_cast (lambda s : s.split())
@@@
@@@argtype table_hline |
a table's horizontal line description; one or more of 'top',
'head', 'inner', 'bottom', or a row number for a line at the bottom
of that row
#:pattern (top^|head^|inner^|bottom^|\d+^|\d+:\(\d+\-\d+\)^|\s+)*
#:python_cast (lambda s : s.split())
@@@
@@@argtype table_vline |
a table's vertical line description; one or more of 'outer', 'inner,
or a column number for a line at the right of that column
# :pattern (outer^|inner^|\d+^|\d+^|\d+:\(\d+\-\d+\)^|\s+)*
# :python_cast (lambda s : s.split())
@@@
@@@argtype table_span |
a list of spans in a table in the form (X,Y):N (no spaces), where
(X,Y) is the position in the table (zero origin in the top left
corner) and N is the number of columns or rows in the span
#:pattern (\(\d+(?:-\d+)?,\d+(?:-\d+)?\):\d+\s*)*
#:python_cast (lambda s : s.split())
@@@
@@rowcolor.tex s : \colorrow{*s*} @@
@@table rows.rest
:id
@caption_arguments@
:center.bool true
:indent.length 1em
:header.bool true
:allow_break.bool false
:hline.table_hline
:vline.table_vline
:grid.bool false
:cell_hpos.table_hpos c
:header_font.font i
:font.font_list r
:colspan.table_span
:rowspan.table_span
:leading.float 1.3
:colsep 4pt
:
@eval table.Table(K) eval@
@@
@@tbl spec.figure_id :
@reference *spec* | Table @
@@