summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-21 21:33:02 +0000
committerKarl Berry <karl@freefriends.org>2013-09-21 21:33:02 +0000
commit91196b7f1f05127d784069b65ec8c445fa6364ba (patch)
tree5cecadcb1c83b1105e771219f89d9b0f363f221f /Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
parent38e329e19dfddde3b0231ac9467f4d2db92be59d (diff)
bidi (21sep13)
git-svn-id: svn://tug.org/texlive/trunk@31712 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def21
1 files changed, 14 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
index d359fbdc04b..10c4f4c7331 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
@@ -1,5 +1,10 @@
%%
-%% This is file `plain-xetex-bidi.def'.
+%% This is file `plain-xetex-bidi.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bidi.dtx (with options: `plain-xetex-bidi.def')
%%
%% ______________________________________
%% Copyright © 2009–2013 Vafa Khalighi
@@ -57,8 +62,6 @@
\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
@@ -77,10 +80,14 @@
\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}}}
+\long\def\bidi@reflect@box#1{%
+ \leavevmode
+ \setbox\z@\hbox{{#1}}%
+ \setbox\tw@\hbox{\special{x:gsave}\special{x:scale -1 1}\rlap{\copy\z@}\special{x:grestore}}%
+ \hbox to \wd\z@{\kern\wd\z@\box\tw@\hss}%
+}
\def\XeTeX{\LR{\leavevmode$\smash{\hbox{X\lower.5ex
- \hbox{\kern-.125em\reflect{E}}\kern-.1667em \TeX}}$}}
+ \hbox{\kern-.125em\bidi@reflect@box{E}}\kern-.1667em \TeX}}$}}
\let\setRL=\setRTL
\let\setLR=\setLTR
\let\unsetRL=\setLTR
@@ -92,7 +99,7 @@
\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–2013 Vafa Khalighi <vafakh@me.com>
+%% Copyright © 2009–2013 Vafa Khalighi <persian-tex@tug.org>
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of