Debian Codegraph @

texmf-dist/source/latex/cals/rtl.dtx

raw
1 % \subsection{RTL (right-to-left) hooks}
2
3 % \begin{macro}{\if@RTL}
4 % \begin{macro}{\if@RTLtab}
5 % \begin{macro}{\@RTLtabtrue}
6 % Provide RTL status commands even if the RTL packages are not loaded.
7 % \begin{macrocode}
8 \def\next{%
9 \let\if@RTL=\iffalse
10 \let\if@RTLtab=\iffalse
11 \let\@RTLtabtrue=\relax
12 }
13 \ifdefined\if@RTL \relax \else \next \fi
14 % \end{macrocode}
15 % \end{macro}
16 % \end{macro}
17 % \end{macro}
18
19 % \begin{macro}{\cals@setup@alignment}
20 % Swap alignment in the RTL mode.
21 % \begin{macrocode}
22 \newcommand\cals@setup@alignment[1]{%
23 \if c#1\relax \cals@vfillAdd \leftskip \cals@vfillAdd \rightskip \fi
24 \if@RTL
25 \if l#1\relax \cals@vfillAdd \leftskip \cals@vfillDrop\rightskip \fi
26 \if r#1\relax \cals@vfillDrop\leftskip \cals@vfillDrop\rightskip \fi
27 \else
28 \if l#1\relax \cals@vfillDrop\leftskip \cals@vfillDrop\rightskip \fi
29 \if r#1\relax \cals@vfillAdd \leftskip \cals@vfillDrop\rightskip \fi
30 \fi
31 }
32 % \end{macrocode}
33 % \end{macro}
34
35 % \begin{macro}{\cals@hskip@lr}
36 % Do |hskip| with the first argument, unless in the RTL mode.
37 % \begin{macrocode}
38 \newcommand\cals@hskip@lr[2]{%
39 \if@RTL \hskip#2\relax \else \hskip#1\relax \fi}
40 % \end{macrocode}
41 % \end{macro}
42