summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bidi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-10-15 22:18:14 +0000
committerKarl Berry <karl@freefriends.org>2011-10-15 22:18:14 +0000
commit1bfe3d499389a5382e4966a21a7abc403b2a9b32 (patch)
tree954c04809a0b49487cc029b6bd49406907cd8be7 /Master/texmf-dist/tex/latex/bidi
parent3f2d4d65cd2b3d0e392e411919b3e2c8e45b38fb (diff)
bidi (15oct11)
git-svn-id: svn://tug.org/texlive/trunk@24297 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi')
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidi.sty2
-rw-r--r--Master/texmf-dist/tex/latex/bidi/biditools.sty41
-rw-r--r--Master/texmf-dist/tex/latex/bidi/graphicx-xetex-bidi.def19
3 files changed, 58 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty
index f300d867951..e62202863ed 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidi.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2012/01/01}
-\def\bidiversion{v1.3.8}
+\def\bidiversion{v1.3.9}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
diff --git a/Master/texmf-dist/tex/latex/bidi/biditools.sty b/Master/texmf-dist/tex/latex/bidi/biditools.sty
index 020aad1d168..612ad455391 100644
--- a/Master/texmf-dist/tex/latex/bidi/biditools.sty
+++ b/Master/texmf-dist/tex/latex/bidi/biditools.sty
@@ -434,6 +434,47 @@
\long\def\bidi@append#1#2{#1#2}
\long\def\bidi@prepend#1#2{#2#1}
+\bidi@newrobustcmd*{\bidi@AtEndPreamble}{\bidi@gappto\bidi@endpreamblehook}
+\newcommand*{\bidi@endpreamblehook}{}
+
+\bidi@preto\document{%
+ \endgroup
+ \let\bidi@AtEndPreamble\@firstofone
+ \bidi@endpreamblehook
+ \protected\def\bidi@AtEndPreamble{\@notprerr\@gobble}%
+ \bidi@undef\bidi@endpreamblehook
+ \begingroup}
+
+\bidi@newrobustcmd*{\bidi@AfterPreamble}{\AtBeginDocument}
+\bidi@AtEndPreamble{\let\bidi@AfterPreamble\@firstofone}
+
+\bidi@newrobustcmd*{\bidi@AfterEndPreamble}{\bidi@gappto\bidi@afterendpreamblehook}
+\newcommand*{\bidi@afterendpreamblehook}{}
+
+\bidi@appto\document{%
+ \let\bidi@AfterEndPreamble\@firstofone
+ \bidi@afterendpreamblehook
+ \protected\def\bidi@AfterEndPreamble{\@notprerr\@gobble}%
+ \bidi@undef\bidi@afterendpreamblehook
+ \ignorespaces}
+
+\AtEndDocument{\let\bidi@AfterEndPreamble\@gobble}
+
+\bidi@newrobustcmd*{\bidi@AfterEndDocument}{\bidi@gappto\bidi@afterenddocumenthook}
+\newcommand*{\bidi@afterenddocumenthook}{}
+
+\bidi@patchcmd\enddocument
+ {\deadcycles}
+ {\let\bidi@AfterEndDocument\@firstofone
+ \bidi@afterenddocumenthook
+ \deadcycles}
+ {}
+ {\let\bidi@@end\@@end
+ \def\@@end{%
+ \let\bidi@AfterEndDocument\@firstofone
+ \bidi@afterenddocumenthook
+ \bidi@@end}}
+
\bidi@newrobustcmd{\bidi@AtBeginEnvironment}[1]{%
\bidi@csgappto{@begin@#1@hook}}
diff --git a/Master/texmf-dist/tex/latex/bidi/graphicx-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/graphicx-xetex-bidi.def
index 8bc6e0dfd66..f59dd2b3450 100644
--- a/Master/texmf-dist/tex/latex/bidi/graphicx-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/graphicx-xetex-bidi.def
@@ -12,7 +12,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{graphicx-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for graphicx package for XeTeX engine]
+\ProvidesFile{graphicx-xetex-bidi.def}[2012/01/01 v0.4 bidi adaptations for graphicx package for XeTeX engine]
\def\Grot@box@std#1#2{\ifmmode\else\if@RTL\beginL\fi\fi%
\Grot@setangle{#1}%
\setbox\z@\hbox{{\ifmmode\if@RTL\beginR\fi#2\if@RTL\endR\fi\else\if@RTL\beginR\fi#2\if@RTL\endR\fi\fi}}%
@@ -37,20 +37,33 @@
\wd\tw@#1\wd\z@
\box\tw@
\fi\ifmmode\else\if@RTL\endL\fi\fi}
-\def\Gin@ii[#1]#2{\ifmmode\else\if@RTL\beginL\fi\fi%
+\def\Gin@iii[#1,#2][#3,#4]#5{%
+ \begingroup
+ \ifmmode\else\if@RTL\beginL\fi\fi
+ \Gin@bboxtrue
+ \Gin@defaultbp\Gin@llx{#1}%
+ \Gin@defaultbp\Gin@lly{#2}%
+ \Gin@defaultbp\Gin@urx{#3}%
+ \Gin@defaultbp\Gin@ury{#4}%
+ \Ginclude@graphics{#5}%
+ \ifmmode\else\if@RTL\endL\fi\fi
+ \endgroup}
+\def\Gin@ii[#1]#2{%
\def\@tempa{[}\def\@tempb{#2}%
\ifx\@tempa\@tempb
\def\@tempa{\Gin@iii[#1][}%
\expandafter\@tempa
\else
\begingroup
+ \ifmmode\else\if@RTL\beginL\fi\fi
\@tempswafalse
\toks@{\Ginclude@graphics{#2}}%
\setkeys{Gin}{#1}%
\Gin@esetsize
\the\toks@
+ \ifmmode\else\if@RTL\endL\fi\fi
\endgroup
- \fi\ifmmode\else\if@RTL\endL\fi\fi}
+ \fi}
\def\reflectbox{\bidiGscale@box-1[1]}
\long\def\bidiGscale@box#1[#2]#3{\ifmmode\else\if@RTL\beginL\fi\fi%
\leavevmode