diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-15 23:19:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-15 23:19:04 +0000 |
commit | 8369ad5a44fba9e4154c1a9d2e12b68bd53d35e5 (patch) | |
tree | fa10280aa5ff26827700bff52d2f5f219d49575b /Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def | |
parent | d76b75890bbe6fcc8e7417b910a6e548a7a5fe42 (diff) |
bidi update (14apr10)
git-svn-id: svn://tug.org/texlive/trunk@17886 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def new file mode 100644 index 00000000000..d20d4cc5840 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def @@ -0,0 +1,107 @@ +%% +%% This is file `plain-xetex-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ifx\TeXXeTstate\undefined\else% + \TeXXeTstate=1 +\fi +\def\Bidi@RTL@everypar{\if@RTL{\setbox\z@\lastbox\beginR\box\z@}\fi} + \let\o@everypar=\everypar + \newtoks\n@everypar + \n@everypar\expandafter{\the\o@everypar} + \o@everypar{\Bidi@RTL@everypar\the\n@everypar} + \let\everypar=\n@everypar +\def\moreLRE{\bracetext \aftergroup\endL \beginL\@RTLfalse} +\def\moreRLE{\bracetext \aftergroup\endR \beginR\@RTLtrue} +\protected\def\hboxR{\hbox\bgroup + \everyhbox{% + \aftergroup\egroup + \everyhbox{}% + \beginR + \bgroup + \aftergroup\endR + \aftergroup\egroup + }\hbox} +\protected\def\hboxL{\hbox\bgroup + \everyhbox{% + \aftergroup\egroup + \everyhbox{}% + \beginL + \bgroup + \aftergroup\endL + \aftergroup\egroup + }\hbox} +\protected\def\vboxR{\vbox\bgroup + \everyvbox{% + \aftergroup\egroup + \everyvbox{}% + \beginR + \bgroup + \aftergroup\endR + \aftergroup\egroup + }\vbox} +\protected\def\vboxL{\vbox\bgroup + \everyvbox{% + \aftergroup\egroup + \everyvbox{}% + \beginL + \bgroup + \aftergroup\endL + \aftergroup\egroup + }\vbox} +\def\LTR{\par\@RTLfalse\@RTL@footnotefalse\hsize\linewidth\parshape\z@} +\def\endLTR{\par} +\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\hsize\linewidth\parshape\z@} +\def\endRTL{\par} +\def\ltr{\if@RTL\par\@RTLfalse\@RTL@footnotefalse\fi} +\def\rtl{\if@RTL\relax\else\par\@RTLtrue\@RTL@footnotetrue\fi} +\def\setRTL{\@RTLtrue\@RTL@footnotetrue} +\def\setLTR{\@RTLfalse\@RTL@footnotefalse} +\let\unsetRTL=\setLTR +\let\unsetLTR=\setRTL +\let\LR=\LRE +\let\RL=\RLE +\def\@ensure@RTL#1{\if@RTL#1\else\RLE{#1}\fi} +\def\@ensure@LTR#1{\if@RTL\LRE{#1}\else#1\fi} +\let\@ensure@RL=\@ensure@RTL +\let\@ensure@LR=\@ensure@LTR +\def\@ensure@dir#1{\if@RTL\RLE{#1}\else{#1}\fi} +\let\@ensure@maindir=\@ensure@dir +\def\@@RTL{RTL} +\def\@@LTR{LTR} +\def\save@dir{\if@RTL\gdef\saved@@dir{RTL}\else\gdef\saved@@dir{LTR}\fi} +\def\reset@dir{\ifx\saved@@dir\@@RTL\setRTL\else\ifx\saved@@dir\@@LTR\setLTR\else\relax\fi\fi} +\let\@@TeX\TeX +\def\TeX{\@ensure@LTR{\@@TeX}} +\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0 + \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}} +\def\XeTeX{\LR{\leavevmode$\smash{\hbox{X\lower.5ex + \hbox{\kern-.125em\reflect{E}}\kern-.1667em \TeX}}$}} +\let\setRL=\setRTL +\let\setLR=\setLTR +\let\unsetRL=\setLTR +\everydisplay{\predisplaydirection=0 } +\def\centerline#1{\line{\hss\if@RTL\beginR\fi#1\if@RTL\endR\fi\hss}} +\def\leftline#1{\line{\if@RTL\beginR\fi#1\if@RTL\endR\fi\hss}} +\def\rightline#1{\line{\hss\if@RTL\beginR\fi#1\if@RTL\endR\fi}} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com> +%% +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) +%% by Vafa Khalighi. +%% +%% +%% +%% +%% +%% End of file `plain-xetex-bidi.def'. |