From 1bfe3d499389a5382e4966a21a7abc403b2a9b32 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 15 Oct 2011 22:18:14 +0000 Subject: bidi (15oct11) git-svn-id: svn://tug.org/texlive/trunk@24297 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bidi/README | 2 +- Master/texmf-dist/doc/latex/bidi/bidi.pdf | Bin 152770 -> 152694 bytes Master/texmf-dist/source/latex/bidi/bidi.dtx | 66 ++++++++++++++++++--- Master/texmf-dist/tex/latex/bidi/bidi.sty | 2 +- Master/texmf-dist/tex/latex/bidi/biditools.sty | 41 +++++++++++++ .../tex/latex/bidi/graphicx-xetex-bidi.def | 19 +++++- 6 files changed, 118 insertions(+), 12 deletions(-) diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README index bd3df44346d..f0075fe5374 100644 --- a/Master/texmf-dist/doc/latex/bidi/README +++ b/Master/texmf-dist/doc/latex/bidi/README @@ -1,6 +1,6 @@ ___________________ The bidi package -v1.3.8 +v1.3.9 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX. diff --git a/Master/texmf-dist/doc/latex/bidi/bidi.pdf b/Master/texmf-dist/doc/latex/bidi/bidi.pdf index 066b25b7595..8309d2c2d33 100644 Binary files a/Master/texmf-dist/doc/latex/bidi/bidi.pdf and b/Master/texmf-dist/doc/latex/bidi/bidi.pdf differ diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx index 410e292f51b..4ae00824c1b 100644 --- a/Master/texmf-dist/source/latex/bidi/bidi.dtx +++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx @@ -5,7 +5,7 @@ %<*readme> ___________________ The bidi package -v1.3.8 +v1.3.9 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX. @@ -231,7 +231,7 @@ by Vafa Khalighi. % Support for bidirectional typesetting in plain \TeX{} and \LaTeXe} % \author{Vafa Khalighi\\ % \url{vafaklg@gmail.com}} -% \date{\today\qquad Version 1.3.8} +% \date{\today\qquad Version 1.3.9} % \maketitle % \tableofcontents %\section*{Introduction} @@ -246,7 +246,7 @@ by Vafa Khalighi. %in plain TeX and LaTeX. The package includes adaptations for use %with many other commonly-used packages. %Copyright (c) 2009-2012 Vafa Khalighi -%v1.3.8, 2012/01/01 +%v1.3.9, 2012/01/01 %License: LaTeX Project Public License, version 1.3c or higher (your choice) %Location on CTAN: /macros/latex/contrib/bidi %\end{lstlisting} @@ -2520,7 +2520,7 @@ by Vafa Khalighi. % \begin{macrocode} \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{% @@ -3689,7 +3689,46 @@ Location on CTAN: /macros/latex/contrib/bidi} \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}} @@ -10066,7 +10105,7 @@ bidi implementation of tufte title] %\fi % \subsection{\textsf{graphicx-xetex-bidi.def}} % \begin{macrocode} -\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}}% @@ -10091,20 +10130,33 @@ bidi implementation of tufte title] \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 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 -- cgit v1.2.3