supp-dir.mkiv /size: 2134 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=supp-dir,
3
%D version=2004.11.11,
4
%D title=\CONTEXT\ Support Macros,
5
%D subtitle=Directional Things,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\unprotect
15 16
\chardef
\directionlefttoright\zerocount
17
\chardef
\directionrighttoleft\plusone
18 19
\edef
\??bdir
{
\ifdefined
\bodydir
bdir
\else
direction
\fi
}
20 21
\unexpanded
\edef
\naturalhbox
{
\hbox
\??bdir
\directionlefttoright
}
22
\unexpanded
\edef
\naturalvbox
{
\vbox
\??bdir
\directionlefttoright
}
23
\unexpanded
\edef
\naturalvtop
{
\vtop
\??bdir
\directionlefttoright
}
24
\unexpanded
\edef
\naturalhpack
{
\hpack
\??bdir
\directionlefttoright
}
25
\unexpanded
\edef
\naturalvpack
{
\vpack
\??bdir
\directionlefttoright
}
26
\unexpanded
\edef
\naturaltpack
{
\tpack
\??bdir
\directionlefttoright
}
27 28
\unexpanded
\edef
\reversehbox
{
\hbox
\??bdir
\directionrighttoleft
}
29
\unexpanded
\edef
\reversevbox
{
\vbox
\??bdir
\directionrighttoleft
}
30
\unexpanded
\edef
\reversevtop
{
\vtop
\??bdir
\directionrighttoleft
}
31
\unexpanded
\edef
\reversehpack
{
\hpack
\??bdir
\directionrighttoleft
}
32
\unexpanded
\edef
\reversevpack
{
\vpack
\??bdir
\directionrighttoleft
}
33
\unexpanded
\edef
\reversetpack
{
\tpack
\??bdir
\directionrighttoleft
}
34 35
\ifdefined
\bodydir
36
\let
\bodydir
\undefined
\let
\normalbodydir
\undefined
37
\let
\bodydirection
\undefined
\let
\normalbodydirection
\undefined
38
\fi
39 40
\ifdefined
\pagedir
41
\let
\pagedir
\undefined
\let
\normalpagedir
\undefined
42
\let
\pagedirection
\undefined
\let
\normalpagedirection
\undefined
43
\fi
44 45
% \expanded{\defineactivecharacter \number"2000E} {\textdirection\directionrighttoleft\relax}
46
% \expanded{\defineactivecharacter \number"2000F} {\textdirection\directionlefttoright\relax}
47 48
\def
\syst_direction_string
#
1
{
\ifcase
#
1
=
\plusone
r
2
l
\else
l
2
r
\fi
}
49 50
\unexpanded
\def
\showdirsinmargin
51
{
\normalexpanded
{
\inleft
{
\naturalhbox
52
{
\ttxx
[
\syst_direction_string
\pardirection
,
\syst_direction_string
\textdirection
]
}}}}
53 54
\protect
\endinput
55