1
2
3
4
5
6
7
8
9
10
11
12
13
14\unprotect
15
16
17
18
19\setnewconstant\directionlefttoright\zerocount
20\setnewconstant\directionrighttoleft\plusone
21
22\immutable\edef\??bdir{\ifdefined\bodydir bdir\else direction\fi}
23
24\permanent\protected\edef\naturalhbox {\hbox \??bdir\directionlefttoright}
25\permanent\protected\edef\naturalvbox {\vbox \??bdir\directionlefttoright}
26\permanent\protected\edef\naturalvtop {\vtop \??bdir\directionlefttoright}
27\permanent\protected\edef\naturalhpack {\hpack \??bdir\directionlefttoright}
28\permanent\protected\edef\naturalvpack {\vpack \??bdir\directionlefttoright}
29\permanent\protected\edef\naturaltpack {\tpack \??bdir\directionlefttoright}
30
31\permanent\protected\edef\reversehbox {\hbox \??bdir\directionrighttoleft}
32\permanent\protected\edef\reversevbox {\vbox \??bdir\directionrighttoleft}
33\permanent\protected\edef\reversevtop {\vtop \??bdir\directionrighttoleft}
34\permanent\protected\edef\reversehpack {\hpack \??bdir\directionrighttoleft}
35\permanent\protected\edef\reversevpack {\vpack \??bdir\directionrighttoleft}
36\permanent\protected\edef\reversetpack {\tpack \??bdir\directionrighttoleft}
37
38
39
40
41\def\syst_direction_string#1{\ifcase#1=\plusone r2l\else l2r\fi}
42
43\permanent\protected\def\showdirsinmargin
44 {\normalexpanded{\inleft{\naturalhbox
45 {\ttxx[\syst_direction_string\pardirection,\syst_direction_string\textdirection]}}}}
46
47\protect \endinput
48 |