diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-par.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/node-par.lua | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-par.lua b/Master/texmf-dist/tex/context/base/node-par.lua new file mode 100644 index 00000000000..f275a103559 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/node-par.lua @@ -0,0 +1,43 @@ +if not modules then modules = { } end modules ['node-par'] = { + version = 1.001, + comment = "companion to node-par.lua", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +parbuilders = parbuilders or { } +parbuilders.constructors = parbuilders.constructors or { } +parbuilders.names = parbuilders.names or { } +parbuilders.attribute = attributes.numbers['parbuilder'] or 999 + +storage.register("parbuilders.names", parbuilders.names, "parbuilders.names") + +-- store parbuilders.names + +function parbuilders.register(name,attribute) + parbuilders.names[attribute] = name +end + +function parbuilders.main(head,interupted_by_display) + local attribute = node.has_attribute(head,parbuilders.attribute) + if attribute then + local constructor = parbuilders.names[attribute] + if constructor then + return parbuilders.constructors[constructor](head,interupted_by_display) + end + end + return false +end + +-- just for testing + +function parbuilders.constructors.default(head,ibd) + return false +end + +-- also for testing (no surrounding spacing done) + +function parbuilders.constructors.oneline(head,ibd) + return node.hpack(head) +end |