1
2
3
4
5
6
7
8
9
10
11
12
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 |