diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/xetex/latex/bidi/bidi-doc-plain-programming.ltx |
Initial commit
Diffstat (limited to 'macros/xetex/latex/bidi/bidi-doc-plain-programming.ltx')
-rw-r--r-- | macros/xetex/latex/bidi/bidi-doc-plain-programming.ltx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/macros/xetex/latex/bidi/bidi-doc-plain-programming.ltx b/macros/xetex/latex/bidi/bidi-doc-plain-programming.ltx new file mode 100644 index 0000000000..607417a0ec --- /dev/null +++ b/macros/xetex/latex/bidi/bidi-doc-plain-programming.ltx @@ -0,0 +1,35 @@ +\documentclass{ltxdoc} +\input{bidi-doc-preamble.ltx} +\begin{document} +\section{Some Useful Internal Macros and Programming Tips} +There are some useful internal macros and programming tips that might be helpful for you. This section, explains all these useful internals and programming tips. +\subsection{RTL Conditional} +\begin{BDef} +\Lcs{if@RTL} +\end{BDef} +\Lcs{if@RTL} conditional is true inside RTL mode and it is false in LTR mode. +\subsection{Main RTL Conditional} +\begin{BDef} +\Lcs{if@RTLmain} +\end{BDef} +If the main direction of the document is RTL, \Lcs{if@RTLmain} is true and if the main direction of the document is LTR, \Lcs{if@RTLmain} is false. +\subsection{Direction Ensuring Macros} +\begin{BDef} +\Lcs{@ensure@RTL}\Largb{\Larga{text}}\quad\Lcs{@ensure@RL}\Largb{\Larga{text}}\quad\Lcs{@ensure@LTR}\Largb{\Larga{text}}\\ +\Lcs{@ensure@LR}\Largb{\Larga{text}}\quad +\Lcs{@ensure@dir}\Largb{\Larga{text}}\quad\Lcs{@ensure@maindir}\Largb{\Larga{text}} +\end{BDef} +\begin{itemize} +\item \Lcs{@ensure@RTL} and \Lcs{@ensure@RL} internals make sure that \Larga{text} is always typeset RTL, independent on the current mode. +\item \Lcs{@ensure@LTR} and \Lcs{@ensure@LR} internals make sure that \Larga{text} is always typeset LTR, independent on the current mode. +\item \Lcs{@ensure@dir} and \Lcs{@ensure@maindir} if used in RTL mode, they put \Larga{text} inside \Lcs{RLE} and if used in LTR mode, they put the text as it is. +\end{itemize} +\subsection{Reset Direction Macro} +\begin{BDef} +\Lcs{save@dir}\quad\Lcs{saved@@dir}\quad\Lcs{reset@dir} +\end{BDef} +\begin{itemize} +\item \Lcs{save@dir}, if the direction of typesetting is RTL, defines \Lcs{saved@@dir} to be RTL and if the direction of typesetting is LTR, defines \Lcs{saved@@dir} to be LTR. +\item \Lcs{reset@dir}, if \Lcs{saved@@dir} is defined as RTL, inserts \Lcs{setRTL} otherwise, if \Lcs{saved@@dir} is defined as LTR, inserts \Lcs{setLTR}, otherwise does nothing. +\end{itemize} +\end{document}
\ No newline at end of file |