supp-dir.mkxl /size: 1760 b    last modification: 2023-12-21 09:44
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\aliased\let\directionlefttoright\zerocount
17\aliased\let\directionrighttoleft\plusone
18
19\immutable\edef\??bdir{\ifdefined\bodydir bdir\else direction\fi}
20
21\permanent\protected\edef\naturalhbox  {\hbox  \??bdir\directionlefttoright}
22\permanent\protected\edef\naturalvbox  {\vbox  \??bdir\directionlefttoright}
23\permanent\protected\edef\naturalvtop  {\vtop  \??bdir\directionlefttoright}
24\permanent\protected\edef\naturalhpack {\hpack \??bdir\directionlefttoright}
25\permanent\protected\edef\naturalvpack {\vpack \??bdir\directionlefttoright}
26\permanent\protected\edef\naturaltpack {\tpack \??bdir\directionlefttoright}
27
28\permanent\protected\edef\reversehbox  {\hbox  \??bdir\directionrighttoleft}
29\permanent\protected\edef\reversevbox  {\vbox  \??bdir\directionrighttoleft}
30\permanent\protected\edef\reversevtop  {\vtop  \??bdir\directionrighttoleft}
31\permanent\protected\edef\reversehpack {\hpack \??bdir\directionrighttoleft}
32\permanent\protected\edef\reversevpack {\vpack \??bdir\directionrighttoleft}
33\permanent\protected\edef\reversetpack {\tpack \??bdir\directionrighttoleft}
34
35\def\syst_direction_string#1{\ifcase#1=\plusone r2l\else l2r\fi}
36
37\permanent\protected\def\showdirsinmargin
38  {\normalexpanded{\inleft{\naturalhbox
39     {\ttxx[\syst_direction_string\pardirection,\syst_direction_string\textdirection]}}}}
40
41\protect \endinput
42