cldf-com.lua /size: 976 b    last modification: 2020-07-01 14:35
1if not modules then modules = { } end modules ['cldf-com'] = {
2    version   = 1.001,
3    comment   = "companion to cldf-com.mkiv",
4    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5    copyright = "PRAGMA ADE / ConTeXt Development Team",
6    license   = "see context related readme files"
7}
8
9-- Some day I'll make a table toolkit ...
10
11local tostring, select = tostring, select
12
13local context = context
14local ctxcore = context.core
15
16local ctx_NC  = ctxcore.NC
17local ctx_NR  = ctxcore.NR
18
19local function tabulaterow(how,...)
20    local ctx_flush = how and context[how] or context
21    for i=1,select("#",...) do
22        ctx_NC()
23        ctx_flush(tostring(select(i,...)))
24    end
25    ctx_NC()
26    ctx_NR()
27end
28
29function ctxcore.tabulaterow    (...) tabulaterow(false, ...) end
30function ctxcore.tabulaterowbold(...) tabulaterow("bold",...) end
31function ctxcore.tabulaterowtype(...) tabulaterow("type",...) end
32function ctxcore.tabulaterowtyp (...) tabulaterow("typ", ...) end
33