diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-12-19 19:26:36 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-12-19 19:26:36 +0100 |
commit | 5d695b87d2f514578ee4872da7957007d0d36f79 (patch) | |
tree | 59d13c3016393a959c0eb408eba540ecd08eda55 /tex/context/base/mkiv/core-lmt.lua | |
parent | 65d8c090a0a9fe003f171eabdf0493b534270636 (diff) | |
download | context-5d695b87d2f514578ee4872da7957007d0d36f79.tar.gz |
2018-12-19 18:57:00
Diffstat (limited to 'tex/context/base/mkiv/core-lmt.lua')
-rw-r--r-- | tex/context/base/mkiv/core-lmt.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/core-lmt.lua b/tex/context/base/mkiv/core-lmt.lua new file mode 100644 index 000000000..2f4f43116 --- /dev/null +++ b/tex/context/base/mkiv/core-lmt.lua @@ -0,0 +1,36 @@ +if not modules then modules = { } end modules ['core-lmt'] = { + version = 1.001, + comment = "companion to core-lmt.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local implement = interfaces.implement +local scankeyword = tokens.scanners.keyword + +local settextdir = tex.settextdir +local setlinedir = tex.setlinedir +local setpagedir = tex.setpagedir +local setpardir = tex.setpardir +local setbodydir = tex.setbodydir +local setboxdir = tex.setboxdir + +local function scandir(what) + if scankeyword("tlt") then + what(0) + elseif scankeyword("trt") then + what(1) + elseif scankeyword("rtt") then + what(2) + elseif scankeyword("ltl") then + what(3) + end +end + +implement { name = "textdir", public = true, protected = true, actions = function() scandir(settextdir) end } +implement { name = "linedir", public = true, protected = true, actions = function() scandir(setlinedir) end } +implement { name = "pagedir", public = true, protected = true, actions = function() scandir(setpagedir) end } +implement { name = "pardir", public = true, protected = true, actions = function() scandir(setpardir) end } +implement { name = "bodydir", public = true, protected = true, actions = function() scandir(setbodydir) end } +implement { name = "boxdir", public = true, protected = true, actions = function() scandir(setboxdir) end } |