core-lmt.lua /size: 1225 b    last modification: 2020-07-01 14:35
1
if
not
modules
then
modules
=
{
}
end
modules
[
'
core-lmt
'
]
=
{
2
version
=
1
.
001
,
3
comment
=
"
companion to core-lmt.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
local
implement
=
interfaces
.
implement
10
local
scankeyword
=
tokens
.
scanners
.
keyword
11 12
local
settextdir
=
tex
.
settextdir
13
local
setlinedir
=
tex
.
setlinedir
14
local
setpardir
=
tex
.
setpardir
15
local
setboxdir
=
tex
.
setboxdir
16 17
local
function
scandir
(
what
)
18
if
scankeyword
(
"
tlt
"
)
then
19
what
(
0
)
20
elseif
scankeyword
(
"
trt
"
)
then
21
what
(
1
)
22
-- elseif scankeyword("rtt") then
23
-- what(2)
24
-- elseif scankeyword("ltl") then
25
-- what(3)
26
else
27
what
(
0
)
28
end
29
end
30 31
implement
{
name
=
"
textdir
"
,
public
=
true
,
protected
=
true
,
actions
=
function
(
)
scandir
(
settextdir
)
end
}
32
implement
{
name
=
"
linedir
"
,
public
=
true
,
protected
=
true
,
actions
=
function
(
)
scandir
(
setlinedir
)
end
}
33
implement
{
name
=
"
pardir
"
,
public
=
true
,
protected
=
true
,
actions
=
function
(
)
scandir
(
setpardir
)
end
}
34
implement
{
name
=
"
boxdir
"
,
public
=
true
,
protected
=
true
,
actions
=
function
(
)
scandir
(
setboxdir
)
end
}
35