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