blob: dfde3d753b2eb990e8a2b5e5a5aec474c828afbc (
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
55
56
57
58
59
60
61
62
63
|
%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.
%D We no longer have the \ETEX\ direction primitives.
\unprotect
% \expanded{\defineactivecharacter \number"2000E} {\textdir TRT\relax}
% \expanded{\defineactivecharacter \number"2000F} {\textdir TLT\relax}
%D As we have less directions now we can use something
% \chardef\@@D@@TLT0
% \chardef\@@D@@TRT1
% \chardef\@@D@@RTT0
% \chardef\@@D@@LRL1
%
% \def\thetextdir{\csname @@D@@\the\textdir\endcsname}
%
% \ifnum\thetextdir=0 L\else R\fi \textdir TRT \ifnum\thetextdir=0 L\else R\fi
\unexpanded\def\showdirsinmargin
{\inleft{\normalexpanded{\noexpand\hbox bdir\directionlefttoright{\ttxx[\the\pardir,\the\textdir]}}}}
% this will become:
% \def\syst_direction_string#1{\ifnum#1=\plusone r2l\else l2r\fi}
%
% \unexpanded\def\showdirsinmargin
% {\inleft{\normalexpanded{\noexpand\hbox bdir\directionlefttoright
% {\ttxx[\syst_direction_string\pardirection,\syst_direction_string\textdirection]}}}}
% will become obsolete:
\bgroup
\catcode`L=\othercatcode \gdef\istltdir#1#2#3{\if#2L0\else1\fi}
\catcode`R=\othercatcode \gdef\istrtdir#1#2#3{\if#2R0\else1\fi}
\egroup
\def\istlttextdir{\expandafter\istltdir\the\textdir}
\def\istrttextdir{\expandafter\istrtdir\the\textdir}
\def\istltpardir {\expandafter\istltdir\the\pardir }
\def\istrtpardir {\expandafter\istrtdir\the\pardir }
% in 1.10 but obsolete helpers anyway
% \def\istlttextdir{\ifnum\textdirection=\plusone \zerocount\else \plusone \fi}
% \def\istrttextdir{\ifnum\textdirection=\plusone \plusone \else \zerocount\fi}
% \def\istltpardir {\ifnum\pardirection =\plusone \zerocount\else \plusone \fi}
% \def\istrtpardir {\ifnum\pardirection =\plusone \plusone \else \zerocount\fi}
\protect \endinput
|