<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \subsection{RTL (right-to-left) hooks}

% \begin{macro}{\if@RTL}
% \begin{macro}{\if@RTLtab}
% \begin{macro}{\@RTLtabtrue}
% Provide RTL status commands even if the RTL packages are not loaded.
%    \begin{macrocode}
\def\next{%
  \let\if@RTL=\iffalse
  \let\if@RTLtab=\iffalse
  \let\@RTLtabtrue=\relax
}
\ifdefined\if@RTL \relax \else \next \fi
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}

% \begin{macro}{\cals@setup@alignment}
% Swap alignment in the RTL mode.
%    \begin{macrocode}
\newcommand\cals@setup@alignment[1]{%
\if c#1\relax \cals@vfillAdd \leftskip \cals@vfillAdd \rightskip \fi
\if@RTL
 \if l#1\relax \cals@vfillAdd \leftskip \cals@vfillDrop\rightskip \fi
 \if r#1\relax \cals@vfillDrop\leftskip \cals@vfillDrop\rightskip \fi
\else
 \if l#1\relax \cals@vfillDrop\leftskip \cals@vfillDrop\rightskip \fi
 \if r#1\relax \cals@vfillAdd \leftskip \cals@vfillDrop\rightskip \fi
\fi
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\cals@hskip@lr}
% Do |hskip| with the first argument, unless in the RTL mode.
%    \begin{macrocode}
\newcommand\cals@hskip@lr[2]{%
\if@RTL \hskip#2\relax \else \hskip#1\relax \fi}
%    \end{macrocode}
% \end{macro}

</pre></body></html>