summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-30 22:25:34 +0000
committerKarl Berry <karl@freefriends.org>2016-11-30 22:25:34 +0000
commitd3aa19f2fc5afa9977b1c1091de42262fc8c772c (patch)
tree1b3f68f578641e0c7a6ea145a83f0c091eeef4c7 /Master/texmf-dist/tex/xelatex/bidi/biditools.sty
parentfe071a3248b7f619d72c83bed1ac96acb78abbfe (diff)
bidi (30nov16)
git-svn-id: svn://tug.org/texlive/trunk@42611 c570f23f-e606-0410-a88d-b1316a301751
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