summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/biditools.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/biditools.sty32
1 files changed, 30 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/biditools.sty b/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
index 23a5aaeffa9..e8add482ae7 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
@@ -17,7 +17,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{47549}
+%% \CheckSum{47593}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -35,7 +35,7 @@
%% Right brace \} Tilde \~}
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{biditools}[2016/11/27 v0.9 Programming tools for bidi package]
+\ProvidesPackage{biditools}[2016/11/30 v0.9 Programming tools for bidi package]
\providecommand{\@bidi@saveprimitive}[2]{\begingroup\escapechar`\\\relax
\edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -143,6 +143,22 @@ ill-advised in the old versions of bidi package.%
\expandafter\@gobbletwo\string#3\endcsname
{\let#2#3%
\let#1#3}}
+\newcommand*{\SetBoolean}[2]{%
+ \lowercase{\def\@tempa{#2}}%
+ \@ifundefined{@tempswa\@tempa}%
+ {\PackageError{biditools}%
+ {You can only set a boolean to `true' or `false'}\@ehc}%
+ {\@ifundefined{#1\@tempa}%
+ {\PackageError{biditools}{Boolean #1 undefined}\@ehc}%
+ {\csname#1\@tempa\endcsname}}}
+\newcommand*{\SetatBoolean}[2]{%
+ \lowercase{\def\@tempa{#2}}%
+ \@ifundefined{@tempswa\@tempa}%
+ {\PackageError{biditools}%
+ {You can only set a boolean to `true' or `false'}\@ehc}%
+ {\@ifundefined{@#1\@tempa}%
+ {\PackageError{ifthen}{Boolean @#1 undefined}\@ehc}%
+ {\csname @#1\@tempa\endcsname}}}
\def\@bidi@removefromreset#1#2{{%
\expandafter\let\csname c@#1\endcsname\@bidi@removefromreset
\def\@elt##1{%
@@ -176,6 +192,18 @@ ill-advised in the old versions of bidi package.%
\else
\expandafter\@firstoftwo
\fi}
+\newcommand*{\ifRtoLhboxconstruct}{%
+ \if@hboxRconstruct
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\newcommand*{\ifLtoRhboxconstruct}{%
+ \if@hboxRconstruct
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
\newcommand*{\iflatin}{%
\if@nonlatin
\expandafter\@secondoftwo