diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-07-20 11:09:33 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-07-20 11:09:33 +0200 |
commit | 81095dd1bf20eb5f7e126adbdc8047f940504180 (patch) | |
tree | c0cdf7b074e8a2d00c56fde09519e89f155bd425 /tex/context/base/mkiv/core-lmt.lmt | |
parent | f1129626606384a7a55a21a83531f51f8b5dee25 (diff) | |
download | context-81095dd1bf20eb5f7e126adbdc8047f940504180.tar.gz |
2020-07-20 10:42:00
Diffstat (limited to 'tex/context/base/mkiv/core-lmt.lmt')
-rw-r--r-- | tex/context/base/mkiv/core-lmt.lmt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/core-lmt.lmt b/tex/context/base/mkiv/core-lmt.lmt new file mode 100644 index 000000000..700ce4721 --- /dev/null +++ b/tex/context/base/mkiv/core-lmt.lmt @@ -0,0 +1,34 @@ +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 setpardir = tex.setpardir +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) + else + what(0) + 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 = "pardir", public = true, protected = true, actions = function() scandir(setpardir) end } +implement { name = "boxdir", public = true, protected = true, actions = function() scandir(setboxdir) end } |