diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-09 16:33:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-09 16:33:55 +0000 |
commit | a29c55aa7b233e8eba45a3959c851e9898c0ce93 (patch) | |
tree | e63b034856c111dc635bec27749bbae4de99c3a2 /Master/texmf-dist/tex/latex | |
parent | ca6438c53266207afc490d67c130e337b0816cb7 (diff) |
bidi (9apr13)
git-svn-id: svn://tug.org/texlive/trunk@29790 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
17 files changed, 539 insertions, 78 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty index 532097d6b17..c6511183424 100644 --- a/Master/texmf-dist/tex/latex/bidi/bidi.sty +++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty @@ -13,8 +13,8 @@ %% %% \NeedsTeXFormat{LaTeX2e} -\def\bididate{2013/04/04} -\def\bidiversion{v12.2} +\def\bididate{2013/04/16} +\def\bidiversion{v12.4} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\bidiinfo{% @@ -34,6 +34,9 @@ Location on CTAN: /macros/latex/contrib/bidi} \RequirePackage{zref-abspage} \RequirePackage{auxhook} \RequirePackage{ltxcmds} +\if@twocolumn + \RequirePackage{ftnright} +\fi \eqnewif{\if@RTLmain}{\if@rlmain} \eqnewif{\if@RTL}{\if@rl} \newif\if@RTLmaths diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.tex b/Master/texmf-dist/tex/latex/bidi/bidi.tex index 6225c0871a7..6a0cf4755ec 100644 --- a/Master/texmf-dist/tex/latex/bidi/bidi.tex +++ b/Master/texmf-dist/tex/latex/bidi/bidi.tex @@ -12,7 +12,7 @@ %% License information appended. %% %% -\def\bididate{2013/04/04} +\def\bididate{2013/04/16} \def\bidiversion{v0.2} \catcode`@=11 \let \protect \relax diff --git a/Master/texmf-dist/tex/latex/bidi/biditools.sty b/Master/texmf-dist/tex/latex/bidi/biditools.sty index 06db98b33c3..c71df92b67d 100644 --- a/Master/texmf-dist/tex/latex/bidi/biditools.sty +++ b/Master/texmf-dist/tex/latex/bidi/biditools.sty @@ -13,7 +13,7 @@ %% %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{biditools}[2012/05/01 v0.1 Programming tools for bidi package] +\ProvidesPackage{biditools}[2013/04/16 v0.2 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% @@ -105,6 +105,7 @@ \expandafter\@secondoftwo \fi} \newcommand{\if@bidi@csprimitive}[1]{% + \begingroup\expandafter\expandafter\expandafter\endgroup% \expandafter\ifprimitive\csname#1\endcsname% \expandafter\@firstoftwo \else diff --git a/Master/texmf-dist/tex/latex/bidi/color-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/color-xetex-bidi.def index a295a4c388a..a80f7dc9df8 100644 --- a/Master/texmf-dist/tex/latex/bidi/color-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/color-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{color-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for color package for XeTeX engine] +\ProvidesFile{color-xetex-bidi.def}[2013/04/08 v0.2 bidi adaptations for color package for XeTeX engine] \long\def\color@b@x#1#2#3{% \leavevmode\ifmmode\else\if@RTL\beginL\fi\fi \setbox\z@\hbox{\kern\fboxsep{\set@color\if@RTL\beginR\fi#3\if@RTL\endR\fi}\kern\fboxsep}% @@ -29,13 +29,13 @@ {\expandafter\let\expandafter\current@color \csname\string\color @#1\endcsname \set@color}% - \ignorespaces\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi} + \ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi\ignorespaces} \def\@undeclaredcolor[#1]#2{% \@ifundefined{color@#1}% {\c@lor@error{model `#1'}}% {\csname color@#1\endcsname\current@color{#2}% \set@color}% - \ignorespaces\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi} + \ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi\ignorespaces} \DeclareRobustCommand\bidicolor{% \@ifnextchar[\@bidiundeclaredcolor\@bidideclaredcolor} \def\@bidiundeclaredcolor[#1]#2{% diff --git a/Master/texmf-dist/tex/latex/bidi/cuted-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/cuted-xetex-bidi.def index 6daddea8f44..4ec97aabae7 100644 --- a/Master/texmf-dist/tex/latex/bidi/cuted-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/cuted-xetex-bidi.def @@ -12,11 +12,14 @@ %% License information appended. %% %% -\ProvidesFile{cuted-xetex-bidi.def}[2013/04/01 v0.1 bidi adaptations for cuted package for XeTeX engine] +\ProvidesFile{cuted-xetex-bidi.def}[2013/04/08 v0.2 bidi adaptations for cuted package for XeTeX engine] \def\RTL@outputdblcol{% \if@firstcolumn \global\@firstcolumnfalse \global\setbox\@leftcolumn \box\@outputbox -\else \global\@firstcolumntrue + \global\count\footins\@m + \global\skip\footins\rcol@footinsskip + \else \preparefootins + \global\@firstcolumntrue \setbox\@outputbox \vbox {\hbox to\textwidth {% \hskip \columnwidth \hfil \vrule width\columnseprule \hfil @@ -51,8 +54,10 @@ \if@firstcolumn \global \@firstcolumnfalse \global \setbox\@leftcolumn \box\@outputbox - \else - \global \@firstcolumntrue + \global\count\footins\@m + \global\skip\footins\rcol@footinsskip + \else \preparefootins + \global\@firstcolumntrue \setbox\@outputbox \vbox {% \hb@xt@\textwidth {% \hb@xt@\columnwidth {% diff --git a/Master/texmf-dist/tex/latex/bidi/fix2col-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/fix2col-xetex-bidi.def index c434498fd0a..1e7fed31a3f 100644 --- a/Master/texmf-dist/tex/latex/bidi/fix2col-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/fix2col-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{fix2col-xetex-bidi.def}[2012/12/12 v0.1 bidi adaptations for fix2col package for XeTeX engine] +\ProvidesFile{fix2col-xetex-bidi.def}[2013/04/08 v0.2 bidi adaptations for fix2col package for XeTeX engine] \def\RTL@outputdblcol{% \if@firstcolumn \global\@firstcolumnfalse @@ -31,7 +31,9 @@ \let\firstmark\@firstcolfirstmark \let\topmark\@firstcoltopmark}% \fi -\else \global\@firstcolumntrue + \global\count\footins\@m + \global\skip\footins\rcol@footinsskip +\else \preparefootins \global\@firstcolumntrue \setbox\@outputbox \vbox {\hbox to\textwidth {% \hskip \columnwidth \hfil \vrule width\columnseprule \hfil @@ -63,7 +65,9 @@ \let\firstmark\@firstcolfirstmark \let\topmark\@firstcoltopmark}% \fi - \else + \global\count\footins\@m + \global\skip\footins\rcol@footinsskip + \else \preparefootins \global\@firstcolumntrue \setbox\@outputbox\vbox{% \hb@xt@\textwidth{% diff --git a/Master/texmf-dist/tex/latex/bidi/floatrow-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/floatrow-xetex-bidi.def new file mode 100644 index 00000000000..6e602e89f8b --- /dev/null +++ b/Master/texmf-dist/tex/latex/bidi/floatrow-xetex-bidi.def @@ -0,0 +1,33 @@ +%% +%% This is file `floatrow-xetex-bidi.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bidi.dtx (with options: `floatrow-xetex-bidi.def') +%% +%% ______________________________________ +%% Copyright © 2009–2013 Persian TeX Group +%% +%% License information appended. +%% +%% +\ProvidesFile{floatrow-xetex-bidi.def}[2013/04/08 v0.1 bidi adaptations for floatrow package for XeTeX engine] +\renewcommand\flnew@within[1]{\@addtoreset{\FB@captype}{#1}% + \expandafter\edef\csname the\FB@captype\endcsname{% + \expandafter\noexpand\csname + the#1\endcsname\@SepMark\noexpand\arabic{\FB@captype}}} +%% +%% Copyright © 2009–2013 Persian TeX Group <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 +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is “maintained” (as per LPPL maintenance status) +%% by Persian TeX Group. +%% +%% +%% +%% +%% End of file `floatrow-xetex-bidi.def'. diff --git a/Master/texmf-dist/tex/latex/bidi/ftnright-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/ftnright-xetex-bidi.def index a59a5678ebc..9a15a8de26b 100644 --- a/Master/texmf-dist/tex/latex/bidi/ftnright-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/ftnright-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{ftnright-xetex-bidi.def}[2013/04/01 v0.1 bidi adaptations for ftnright package for XeTeX engine] +\ProvidesFile{ftnright-xetex-bidi.def}[2013/04/08 v0.2 bidi adaptations for ftnright package for XeTeX engine] \def\LTR@outputdblcol{\if@firstcolumn \global\@firstcolumnfalse \global\setbox\@leftcolumn\box\@outputbox @@ -57,7 +57,12 @@ {\@outputpage\@startdblcolumn}% \endgroup \fi} -\g@addto@macro\document{\let\footnoterule\@empty} +\let\left@footnoterule\@empty +\let\right@footnoterule\@empty +\let\textwidth@footnoterule\@empty +\long\def\@makefntext#1{\parindent 1em + \noindent\hbox to 2em{}% + \llap{\@thefnmark\hbox{.}\,\,}#1} %% %% Copyright © 2009–2013 Persian TeX Group <persian-tex@tug.org> %% diff --git a/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def index 047bad8abbb..b7c51787008 100644 --- a/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{hyperref-xetex-bidi.def}[2013/04/04 v0.6 bidi adaptations for hyperref package for XeTeX engine] +\ProvidesFile{hyperref-xetex-bidi.def}[2013/04/08 v0.7 bidi adaptations for hyperref package for XeTeX engine] \AtBeginDocument{% \def\contentsline#1#2#3#4{% \ifx\\#4\\% @@ -221,7 +221,7 @@ }% \fi \def\hyper@link#1#2#3{% - \ifmmode\else\beginL\fi\hyper@linkstart{#1}{#2}\if@RTL\beginR\fi#3\if@RTL\endR\fi\hyper@linkend\ifmmode\else\endL\fi + \ifmmode\else\beginL\fi\hyper@linkstart{#1}{#2}\ifmmode\else\if@RTL\beginR\fi\fi#3\ifmmode\else\if@RTL\endR\fi\fi\hyper@linkend\ifmmode\else\endL\fi } \def\url@#1{\beginL\hyper@linkurl{\Hurl{#1}}{#1}\endL} \def\hyper@natlinkstart#1{% @@ -245,6 +245,14 @@ \endgroup }% \endgroup +\pdfstringdefDisableCommands{% +\let\LRE\@firstofone +\let\LR\@firstofone +\let\RLE\@firstofone +\let\RL\@firstofone +\def\XeTeX{Xe\TeX} +\def\XeLaTeX{Xe\LaTeX} +} %% %% Copyright © 2009–2013 Persian TeX Group <persian-tex@tug.org> %% diff --git a/Master/texmf-dist/tex/latex/bidi/lettrine-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/lettrine-xetex-bidi.def index ac075d97fef..bcd2d6aa263 100644 --- a/Master/texmf-dist/tex/latex/bidi/lettrine-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/lettrine-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{lettrine-xetex-bidi.def}[2011/09/16 v0.1 bidi adaptations for lettrine package for XeTeX engine] +\ProvidesFile{lettrine-xetex-bidi.def}[2013/04/16 v0.2 bidi adaptations for lettrine package for XeTeX engine] \def\@lettrine[#1]#2#3{% \setcounter{L@lines}{\theDefaultLines}% \renewcommand*{\L@hang}{\DefaultLhang}% @@ -96,11 +96,10 @@ \addtolength{\L@next}{-\L@slope}% \advance\@tempcnta\@ne}% \if@RTL \edef\L@parshape{\L@parshape 0pt \the\linewidth}\else\edef\L@parshape{\L@parshape \rightmargin \the\linewidth}\fi - \noindent\leavevmode - \parshape=\L@parshape - $\smash{\if@RTL\rlap{\hskip \the\L@Findent\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}% - }\else\llap{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}% - \hskip \the\L@Findent}\fi}$% + \noindent + \parshape=\L@parshape\relax + \smash{\llap{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}% + \hskip \the\L@Findent}}% \usebox{\L@tbox}} %% %% Copyright © 2009–2013 Persian TeX Group <persian-tex@tug.org> diff --git a/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def b/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def index 6692e3e0246..c034ef37ffe 100644 --- a/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{loadingorder-bidi.def}[2012/12/12 v0.9 making sure that bidi is the last package loaded] +\ProvidesFile{loadingorder-bidi.def}[2013/04/16 v0.92 making sure that bidi is the last package loaded] \bidi@isloaded{amsmath} \bidi@isloaded{amstext} \bidi@isloaded{amsthm} @@ -26,6 +26,7 @@ \bidi@isloaded{xcolor} \bidi@isloaded{colortbl} \bidi@isloaded{float} +\bidi@isloaded{floatrow} \bidi@isloaded{flowfram} \bidi@isloaded{framed} \bidi@isloaded{ftnright} @@ -35,6 +36,8 @@ \bidi@isloaded{graphicx} \bidi@isloaded{geometry} \bidi@isloaded{hvfloat} +\bidi@isloaded{mdframed} +\bidi@isloaded{midfloat} \bidi@isloaded{ntheorem} \bidi@isloaded{ntheorem-hyper} \bidi@isloaded{hyperref} @@ -114,6 +117,9 @@ \if@bidi@floatloaded@\else \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package float after bidi package. Please load package float before bidi package, and then try to run xelatex on your document again}{}]{float} \fi% + \if@bidi@floatrowloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package floatrow after bidi package. Please load package floatrow before bidi package, and then try to run xelatex on your document again}{}]{floatrow} + \fi% \if@bidi@flowframloaded@\else \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package flowfram after bidi package. Please load package flowfram before bidi package, and then try to run xelatex on your document again}{}]{flowfram} \fi% @@ -141,6 +147,12 @@ \if@bidi@hvfloatloaded@\else \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package hvfloat after bidi package. Please load package hvfloat before bidi package, and then try to run xelatex on your document again}{}]{hvfloat} \fi% + \if@bidi@mdframedloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package mdframed after bidi package. Please load package mdframed before bidi package, and then try to run xelatex on your document again}{}]{mdframed} + \fi% + \if@bidi@midfloatloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package midfloat after bidi package. Please load package midfloat before bidi package, and then try to run xelatex on your document again}{}]{midfloat} + \fi% \if@bidi@ntheoremloaded@\else \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ntheorem after bidi package. Please load package ntheorem before bidi package, and then try to run xelatex on your document again}{}]{ntheorem} \fi% diff --git a/Master/texmf-dist/tex/latex/bidi/mdframed-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/mdframed-xetex-bidi.def new file mode 100644 index 00000000000..94c9ffa0dca --- /dev/null +++ b/Master/texmf-dist/tex/latex/bidi/mdframed-xetex-bidi.def @@ -0,0 +1,97 @@ +%% +%% This is file `mdframed-xetex-bidi.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bidi.dtx (with options: `mdframed-xetex-bidi.def') +%% +%% ______________________________________ +%% Copyright © 2009–2013 Persian TeX Group +%% +%% License information appended. +%% +%% +\ProvidesFile{mdframed-xetex-bidi.def}[2013/04/08 v0.1 bidi adaptations for mdframed package for XeTeX engine] +\newif\if@bidi@mdf@RTL +\def\mdf@lrbox#1{% +%%patch to work with amsthm + \mdf@patchamsthm +%%%end patch + \edef\mdf@restoreparams{% + \parindent=\the\parindent\relax \parskip=\the\parskip\relax}% + \if@RTL\@bidi@mdf@RTLtrue\fi% + \@RTLfalse% + \setbox#1\vbox\bgroup% + \color@begingroup% + \if@bidi@mdf@RTL\@RTLtrue\fi% + \mdf@horizontalmargin@equation% + \columnwidth=\hsize% + \textwidth=\hsize% + \let\if@nobreak\iffalse% + \let\if@noskipsec\iffalse% + \let\par\@@par% + \let\-\@dischyph% + \let\'\@acci\let\`\@accii\let\=\@acciii% + \parindent\z@ \parskip\z@skip% + \linewidth\hsize% + \@totalleftmargin\z@% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip% + \parfillskip\@flushglue \lineskip\normallineskip% + \baselineskip\normalbaselineskip% +%% \sloppy% + \let\\\@normalcr% + \mdf@restoreparams\relax% + \@afterindentfalse% + \@afterheading% +} +\newrobustcmd*\mdf@left@footnoterule{% + \kern0\p@% + \hrule \@width 1in \kern 2.6\p@} + +\newrobustcmd*\mdf@right@footnoterule{% + \hbox to \columnwidth + {\beginR \vbox{\kern0\p@% + \hrule \@width 1in \kern 2.6\p@}\hfil\endR}} + +\newrobustcmd*\mdf@textwidth@footnoterule{\kern0\p@% + \hrule \@width \columnwidth \kern 2.6\p@} + +\newrobustcmd*\mdf@leftfootnoterule{% +\bidi@autofootnoterulefalse% +\renewrobustcmd*\mdf@footnoterule{\mdf@left@footnoterule}} + +\newrobustcmd*\mdf@rightfootnoterule{% +\bidi@autofootnoterulefalse% +\renewrobustcmd*\mdf@footnoterule{\mdf@right@footnoterule}} + +\newrobustcmd*\mdf@textwidthfootnoterule{% +\bidi@autofootnoterulefalse% +\renewrobustcmd*\mdf@footnoterule{\mdf@textwidth@footnoterule}} + +\renewrobustcmd*\mdf@footnoteinput{% + \def\@mpfn{mpfootnote}% + \def\thempfn{\thempfootnote}% + \c@mpfootnote\z@% + \let\@footnotetext\@mpfootnotetext% + \let\@LTRfootnotetext\@mpLTRfootnotetext% + \let\@RTLfootnotetext\@mpRTLfootnotetext% + \let\leftfootnoterule\mdf@leftfootnoterule% + \let\LRfootnoterule=\leftfootnoterule% + \let\rightfootnoterule\mdf@rightfootnoterule% + \let\textwidthfootnoterule\mdf@textwidthfootnoterule% +} +%% +%% Copyright © 2009–2013 Persian TeX Group <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 +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is “maintained” (as per LPPL maintenance status) +%% by Persian TeX Group. +%% +%% +%% +%% +%% End of file `mdframed-xetex-bidi.def'. diff --git a/Master/texmf-dist/tex/latex/bidi/midfloat-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/midfloat-xetex-bidi.def new file mode 100644 index 00000000000..187609a1f5f --- /dev/null +++ b/Master/texmf-dist/tex/latex/bidi/midfloat-xetex-bidi.def @@ -0,0 +1,232 @@ +%% +%% This is file `midfloat-xetex-bidi.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bidi.dtx (with options: `midfloat-xetex-bidi.def') +%% +%% ______________________________________ +%% Copyright © 2009–2013 Persian TeX Group +%% +%% License information appended. +%% +%% +\ProvidesFile{midfloat-xetex-bidi.def}[2013/04/16 v0.1 bidi adaptations for midfloat package for XeTeX engine] +\def\RTL@outputdblcol{% + \if@firstcolumn + \global \@firstcolumnfalse + \global \setbox\@leftcolumn \box\@outputbox + \global\c@colht\@colht\global\c@addvipersep\z@ + \ifnum\juo@sk>0 + \remove@strip\juo@sar + \global\@colht\the\juo@pr + \ifdim\right@cor>\z@ + \global\advance\@colht by\right@cor + \fi + \global\advance\@colht by\cor@height + \global\cor@height=0pt + \fi + \global \setbox\@rightcolumn \vbox{}% + \else + \ifdim\c@colht>\@colht + \@tempdima\@colht + \ifdim\@colht>\z@ + \global\setbox\@rightcolumn \vbox{% + \unvbox\@rightcolumn + \vbox to\@tempdima{% + \vskip\c@addvipersep\unvbox\@outputbox}% + \vskip\stripsep + \vrule height\the\juo@ht width 0pt depth 0pt + \vskip\stripsep + }% + \global\c@addvipersep\m@addvipersep + \else + \global\setbox\@rightcolumn \vbox{% + \unvbox\@rightcolumn + \vrule height\the\juo@ht width 0pt depth 0pt + \vskip\stripsep + }% + \fi + \ifnum\juo@sk>0 + \remove@strip\juo@sar + \global\@colht\the\juo@pr + \global\advance\@colht by -\ht\@rightcolumn + \global\advance\@colht by\cor@height + \global\cor@height=0pt + \else + \global\advance\c@colht by-\ht\@rightcolumn + \global\@colht\c@colht + \fi + \global\count\footins\@m + \global\skip\footins\rcol@footinsskip + \else \preparefootins + \global\@firstcolumntrue + \global\setbox\@outputbox\vbox to\ht\@leftcolumn{% + \unvbox\@rightcolumn + \vskip\c@addvipersep + \unvbox\@outputbox + }% + \setbox\@outputbox \vbox {% + \hb@xt@\textwidth {% + \hskip \columnwidth + \hfil + \vrule \@width\columnseprule + \hfil + \hb@xt@\columnwidth {% + \box\@leftcolumn \hss}% + \hskip-\textwidth + \hb@xt@\columnwidth {% + \box\@outputbox \hss}% + \hskip\columnwidth + \hskip\columnsep}% + }% + \@combinedblfloats + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi + {\@outputpage + \@startdblcolumn}% + \endgroup + \global\juo@sk=0\global\juo@sar={}% + \global\cor@height\z@\global\c@addvipersep\z@ + \fi + \fi +} + +\def\LTR@outputdblcol{% + \if@firstcolumn + \global \@firstcolumnfalse + \global \setbox\@leftcolumn \box\@outputbox + \global\c@colht\@colht\global\c@addvipersep\z@ + \ifnum\juo@sk>0 + \remove@strip\juo@sar + \global\@colht\the\juo@pr + \ifdim\right@cor>\z@ + \global\advance\@colht by\right@cor + \fi + \global\advance\@colht by\cor@height + \global\cor@height=0pt + \fi + \global \setbox\@rightcolumn \vbox{}% + \else + \ifdim\c@colht>\@colht + \@tempdima\@colht + \ifdim\@colht>\z@ + \global\setbox\@rightcolumn \vbox{% + \unvbox\@rightcolumn + \vbox to\@tempdima{% + \vskip\c@addvipersep\unvbox\@outputbox}% + \vskip\stripsep + \vrule height\the\juo@ht width 0pt depth 0pt + \vskip\stripsep + }% + \global\c@addvipersep\m@addvipersep + \else + \global\setbox\@rightcolumn \vbox{% + \unvbox\@rightcolumn + \vrule height\the\juo@ht width 0pt depth 0pt + \vskip\stripsep + }% + \fi + \ifnum\juo@sk>0 + \remove@strip\juo@sar + \global\@colht\the\juo@pr + \global\advance\@colht by -\ht\@rightcolumn + \global\advance\@colht by\cor@height + \global\cor@height=0pt + \else + \global\advance\c@colht by-\ht\@rightcolumn + \global\@colht\c@colht + \fi + \global\count\footins\@m + \global\skip\footins\rcol@footinsskip + \else \preparefootins + \global\@firstcolumntrue + \global\setbox\@outputbox\vbox to\ht\@leftcolumn{% + \unvbox\@rightcolumn + \vskip\c@addvipersep + \unvbox\@outputbox + }% + \setbox\@outputbox \vbox {% + \hb@xt@\textwidth {% + \hb@xt@\columnwidth {% + \box\@leftcolumn \hss}% + \hfil + \vrule \@width\columnseprule + \hfil + \hb@xt@\columnwidth {% + \box\@outputbox \hss}% + }% + }% + \@combinedblfloats + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi + {\@outputpage + \@startdblcolumn}% + \endgroup + \global\juo@sk=0\global\juo@sar={}% + \global\cor@height\z@\global\c@addvipersep\z@ + \fi + \fi +} + +\def\@strip[#1/#2]{\global\@tempdima=#1\global\@tempdimb=#2% + \global \setbox\@viper\vbox\bgroup\if@RTLmain\moveleft\dimexpr(\columnwidth+\columnsep)\fi\vbox\bgroup% + \hsize\textwidth + \@parboxrestore + \col@number \@ne + \vrule height\topskip width0pt depth0pt +} + +\def\endstrip{% + \egroup\egroup + \if@firstcolumn + \ifdim\pagetotal>\z@ + \vskip\stripsep + \global\ht@strip\pagegoal + \global\advance\ht@strip by-\pagetotal + \global\advance\ht@strip by-\stripsep + \global\advance\ht@strip by-\ht\@viper + \global\advance\ht@strip by-\stripsep + \global\juo@ht=\ht\@viper + \else + \global\ht@strip\z@ + \fi + \ifdim\ht@strip>\z@ + \unvbox\@viper + \vskip\stripsep + \add@strip{\the\pagetotal}{\the\juo@ht}{\the\@tempdima}{\the\@tempdimb}% + \global\advance\juo@sk by1 + \else + \@latex@error{Strip needs more place!}\@ehc + \if@vihproof + \framebox[\columnwidth]{??? Strip ???}% + \fi + \fi + \else + \@latex@error{Strip is used only on left column!}\@ehc + \if@vihproof + \framebox[\columnwidth]{??? Strip ???}% + \fi + \fi +} +%% +%% Copyright © 2009–2013 Persian TeX Group <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 +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is “maintained” (as per LPPL maintenance status) +%% by Persian TeX Group. +%% +%% +%% +%% +%% End of file `midfloat-xetex-bidi.def'. diff --git a/Master/texmf-dist/tex/latex/bidi/picinpar-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/picinpar-xetex-bidi.def index 338cf136921..36bbe251b8f 100644 --- a/Master/texmf-dist/tex/latex/bidi/picinpar-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/picinpar-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{picinpar-xetex-bidi.def}[2011/11/05 v0.1 bidi adaptations for picinpar package for XeTeX engine] +\ProvidesFile{picinpar-xetex-bidi.def}[2013/04/08 v0.2 bidi adaptations for picinpar package for XeTeX engine] \long\def\@makewincaption#1#2{% \setbox\@tempboxa\hbox{\footnotesize{\bf #1:\enspace}{#2}}% \ifdim\wd\@tempboxa>\picwd @@ -20,6 +20,104 @@ \else \hbox to\picwd{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi} \fi} +\def\endwindow{% + \global\tcd=\tcdsav + \egroup\vskip\parskip\parshape=0 % reset parshape; end \box\rawtext + \vbadness=10000 + \splittopskip=0pt +\ifnum\tcd>0\setbox\holder=\vsplit\rawtext to \tcd\baselineskip +\tcn=\tcd +\loop\advance\tcn -1 +\setbox\fslice=\vsplit\holder to\baselineskip +\prune\fslice\linewidth +\topheight=0pt +\ifnum\dp\fslice>\dp\wstrutbox + \advance\topheight-\dp\fslice + \advance\topheight\dp\wstrutbox + \advance\topheight\ilg\fi +\hbox to\linewidth{\box\fslice} +\vskip-\topheight +\ifdim\ht\holder>0pt\repeat +\fi +\global\topheight=\tcl\baselineskip +\ifnum\cumpartcl>0\global\tcl=\cumtcl + \global\topheight=\vpic +\fi +\ifnum\bl>0 \ifnum\br>0 \multiply\topheight by 2\fi\fi +\ifnum\bl>0\setbox\holder=\vsplit\rawtext to\topheight +\else\ifnum\br>0\setbox\holder=\vsplit\rawtext to\topheight\fi\fi +\tcn=\tcl \na=0 \nb=0 +\ifnum\bl>0 \ifnum\br>0 \multiply\tcn by 2\fi\fi +\ifnum\bl>0\na=\tcn\ifnum\br>0\divide\na by 2\fi\fi +\ifnum\br>0\nb=\tcn\ifnum\bl>0\divide\nb by 2\fi\fi +\ifnum\na=0\ifnum\nb=0 + \setbox\waslice=\vbox to\vpic{\vss} + \setbox\wbslice=\vbox to\vpic{\vss} + \bl=1\br=1 + \vskip\ilg +\fi\fi +\ifnum\na>0 \ifnum\nb>0 +\loop\advance\nb -1 +\advance\na -1 +\if@RTL% +\setbox\bslice=\vsplit\holder to\baselineskip +\prune\bslice\rtside +\setbox\wbslice=\vbox{\unvbox\wbslice\hbox +to\rtside{\box\bslice\hfil}} +\setbox\aslice=\vsplit\holder to\baselineskip +\prune\aslice\lftside +\setbox\waslice=\vbox{\unvbox\waslice\hbox +to\lftside{\box\aslice\hfil}} +\else% +\setbox\aslice=\vsplit\holder to\baselineskip +\prune\aslice\lftside +\setbox\waslice=\vbox{\unvbox\waslice\hbox +to\lftside{\box\aslice\hfil}} +\setbox\bslice=\vsplit\holder to\baselineskip +\prune\bslice\rtside +\setbox\wbslice=\vbox{\unvbox\wbslice\hbox +to\rtside{\box\bslice\hfil}} +\fi% +\ifnum\nb>0\repeat +\fi\fi +\ifnum\na>0 + \loop\advance\na -1 + \setbox\aslice=\vsplit\holder to\baselineskip + \prune\aslice\lftside + \setbox\waslice=\vbox{\unvbox\waslice\hbox + to\lftside{\box\aslice\hfil}} + \ifdim\ht\holder>0pt\repeat +\fi +\ifnum\nb>0 + \loop\advance\nb -1 + \setbox\bslice=\vsplit\holder to\baselineskip + \prune\bslice\rtside + \setbox\wbslice=\vbox{\unvbox\wbslice\hbox + to\rtside{\box\bslice\hfil}} + \ifdim\ht\holder>0pt\repeat +\fi +\ifnum\bl=0\topheight=\ht\wbslice +\else\ifnum\br=0\topheight=\ht\waslice + \else\ifdim\ht\waslice>\ht\wbslice\topheight=\ht\waslice + \else\topheight=\ht\wbslice\fi\fi\fi +\ifnum\bl>0 \ifnum\br>0 \ifdim\ht\wbslice<\topheight +\setbox\wbslice=\vbox to\topheight{\box\wbslice\vfill} +\fi\fi\fi +\setbox\windowbox=\vbox{\hbox to\linewidth{% +\ifnum\bl>0\box\waslice\hfill\fi% +\vbox to\topheight{\hrule width\picwd height0pt depth0pt\vskip0pt% +\vfill\unvbox\picbox% +\ifnum\picwd>0\vfill\fi% +\vss}\ifnum\br>0\hfill\vbox{\box\wbslice}\fi}}% +\unvbox\windowbox% +\loop + \setbox\bslice=\vsplit\rawtext to\baselineskip + \prune\bslice\linewidth + \setbox\wbslice=\vbox{\hbox to\linewidth{\box\bslice\hfil}} + \unvbox\wbslice + \ifdim\ht\rawtext>0pt +\repeat +}% FINITO %% %% Copyright © 2009–2013 Persian TeX Group <persian-tex@tug.org> %% diff --git a/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def index 59ed3f286a6..0b0b2a68bb9 100644 --- a/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{titletoc-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for titletoc package for XeTeX engine] +\ProvidesFile{titletoc-xetex-bidi.def}[2013/04/16 v0.2 bidi adaptations for titletoc package for XeTeX engine] \renewcommand\filright{% \gdef\ttl@filleft##1{\hskip##1}% \gdef\ttl@filright##1{\hfill}% @@ -56,6 +56,11 @@ \advance\if@RTL\leftskip\else\rightskip\fi-\@pnumwidth\relax \advance\if@RTL\leftskip\else\rightskip\fi#2\relax \def\@pnumwidth{#2}} +\let\ttl@savel@part\l@part +\def\l@part{\ttl@lselect{part}} + +\let\ttl@savel@chapter\l@chapter +\def\l@chapter{\ttl@lselect{chapter}} %% %% Copyright © 2009–2013 Persian TeX Group <persian-tex@tug.org> %% diff --git a/Master/texmf-dist/tex/latex/bidi/xcolor-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/xcolor-xetex-bidi.def index c35078b4324..f6bfcfa9058 100644 --- a/Master/texmf-dist/tex/latex/bidi/xcolor-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/xcolor-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{xcolor-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for xcolor package for XeTeX engine] +\ProvidesFile{xcolor-xetex-bidi.def}[2013/04/08 v0.2 bidi adaptations for xcolor package for XeTeX engine] \long\def\color@b@x#1#2#3% {\leavevmode\ifmmode\else\if@RTL\beginL\fi\fi \setbox\z@\hbox{\kern\fboxsep{\set@color\if@RTL\beginR\fi#3\if@RTL\endR\fi}\kern\fboxsep}% @@ -58,11 +58,11 @@ {\c@lor@error{model `#1'}}% {\@nameuse{color@#1}\current@color{#2}% \edef\XC@current@color{\noexpand\xcolor@{}{\current@color}{#1}{#2}}% - \XC@display}\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi} + \XC@display}\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi\ignorespaces} \def\XC@declaredc@lor {\XC@let@Nc\XC@current@color{\string\color@\XC@@tmp}% \edef\current@color{\XC@current@color}% - \XC@display\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi} + \XC@display\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi\ignorespaces} \DeclareRobustCommand\bidicolor {\@ifnextchar[\@bidiundeclaredcolor\@bidideclaredcolor} \def\@bidiundeclaredcolor[#1]#2% diff --git a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def index 08583dcdb0e..975129c0232 100644 --- a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{xetex-bidi.def}[2012/12/12 v1.0.6 bidi adaptations for XeTeX engine] +\ProvidesFile{xetex-bidi.def}[2013/04/16 v1.0.8 bidi adaptations for XeTeX engine] \newcommand{\TeXXeTOn}{\TeXXeTstate=1 } \newcommand{\TeXXeTOff}{\TeXXeTstate=0 } \TeXXeTOn @@ -102,6 +102,7 @@ \@ifpackageloaded{mathtools}{\RequirePackage{graphicx}}{} \@ifpackageloaded{crop}{\RequirePackage{graphicx}}{} \@ifpackageloaded{sidecap}{\RequirePackage{ragged2e}}{} +\@ifpackageloaded{floatrow}{\RequirePackage{color}}{} \DeclareOption{RTLdocument}{\@RTLtrue\@RTL@footnotetrue\g@addto@macro\document{\autofootnoterule}} \DeclareOption{rldocument}{\@RTLtrue\@RTL@footnotetrue\g@addto@macro\document{\autofootnoterule}} \def\RTLcases#1{\left.\vcenter{\normalbaselines\m@th @@ -387,51 +388,6 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \hb@xt@\@pnumwidth{{\hfil\normalfont \normalcolor #5}}% \par}% \fi} -\def\RTL@outputdblcol{% -\if@firstcolumn \global\@firstcolumnfalse -\global\setbox\@leftcolumn \box\@outputbox -\else \global\@firstcolumntrue -\setbox\@outputbox \vbox {\hbox to\textwidth {% -\hskip \columnwidth -\hfil \vrule width\columnseprule \hfil -\hbox to\columnwidth {\box\@leftcolumn \hss}% -\hskip -\textwidth -\hbox to\columnwidth{\box\@outputbox \hss}% -\hskip \columnsep -\hskip \columnwidth }}% -\@combinedblfloats \@outputpage -\begingroup \@dblfloatplacement \@startdblcolumn -\@whilesw\if@fcolmade \fi -{\@outputpage \@startdblcolumn }\endgroup -\fi} -\def\LTR@outputdblcol{% - \if@firstcolumn - \global \@firstcolumnfalse - \global \setbox\@leftcolumn \box\@outputbox - \else - \global \@firstcolumntrue - \setbox\@outputbox \vbox {% - \hb@xt@\textwidth {% - \hb@xt@\columnwidth {% - \box\@leftcolumn \hss}% - \hfil - {\normalcolor\vrule \@width\columnseprule}% - \hfil - \hb@xt@\columnwidth {% - \box\@outputbox \hss}% - }% - }% - \@combinedblfloats - \@outputpage - \begingroup - \@dblfloatplacement - \@startdblcolumn - \@whilesw\if@fcolmade \fi - {\@outputpage - \@startdblcolumn}% - \endgroup - \fi -} \renewcommand{\@outputdblcol}{\if@RTLmain\RTL@outputdblcol\else\LTR@outputdblcol\fi} \newcommand{\RTLdblcol}{\renewcommand{\@outputdblcol}{\RTL@outputdblcol}} \newcommand{\LTRdblcol}{\renewcommand{\@outputdblcol}{\LTR@outputdblcol}} @@ -691,12 +647,14 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \@ifpackageloaded{caption}{\input{caption-xetex-bidi.def}}{} \@ifpackageloaded{caption3}{\input{caption3-xetex-bidi.def}}{} \@ifpackageloaded{crop}{\@ifclassloaded{memoir}{}{\input{crop-xetex-bidi.def}}}{} +\@ifpackageloaded{floatrow}{\input{floatrow-xetex-bidi.def}}{} \@ifpackageloaded{color}{\input{color-xetex-bidi.def}}{} \@ifpackageloaded{cutwin}{\input{cutwin-xetex-bidi.def}}{} +\@ifpackageloaded{ftnright}{\input{ftnright-xetex-bidi.def}}{} \@ifpackageloaded{cuted}{\input{cuted-xetex-bidi.def}}{} \@ifpackageloaded{xcolor}{\input{xcolor-xetex-bidi.def}}{} \@ifpackageloaded{colortbl}{\input{colortbl-xetex-bidi.def}}{} -\@ifpackageloaded{float}{\input{float-xetex-bidi.def}}{} +\@ifpackageloaded{float}{\@ifpackageloaded{floatrow}{}{\input{float-xetex-bidi.def}}}{} \@ifpackageloaded{flowfram}{\input{flowfram-xetex-bidi.def}}{} \@ifpackageloaded{xltxtra}{\input{xltxtra-xetex-bidi.def}}{} \@ifpackageloaded{wrapfig}{\input{wrapfig-xetex-bidi.def}}{} @@ -708,11 +666,11 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \@ifpackageloaded{ntheorem-hyper}{\input{ntheorem-hyper-xetex-bidi.def}}{} \@ifpackageloaded{fancyhdr}{\input{fancyhdr-xetex-bidi.def}}{} \@ifpackageloaded{fix2col}{\input{fix2col-xetex-bidi.def}}{} +\@ifpackageloaded{midfloat}{\input{midfloat-xetex-bidi.def}}{} \@ifpackageloaded{draftwatermark}{\input{draftwatermark-xetex-bidi.def}}{} \@ifpackageloaded{dblfnote}{\input{dblfnote-xetex-bidi.def}}{} \@ifpackageloaded{empheq}{\input{empheq-xetex-bidi.def}}{} \@ifpackageloaded{framed}{\input{framed-xetex-bidi.def}}{} -\@ifpackageloaded{ftnright}{\input{ftnright-xetex-bidi.def}}{} \@ifpackageloaded{pdfpages}{\input{pdfpages-xetex-bidi.def}}{} \@ifpackageloaded{lettrine}{\input{lettrine-xetex-bidi.def}}{} \@ifpackageloaded{listings}{\input{listings-xetex-bidi.def}}{} @@ -748,6 +706,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \@ifpackageloaded{subfigure}{\input{subfigure-xetex-bidi.def}}{} \@ifpackageloaded{longtable}{\input{longtable-xetex-bidi.def}}{} \@ifpackageloaded{arydshln}{\input{arydshln-xetex-bidi.def}}{} +\@ifpackageloaded{mdframed}{\input{mdframed-xetex-bidi.def}}{} \@ifpackageloaded{multicol}{\input{multicol-xetex-bidi.def}}{} \@ifpackageloaded{multienum}{\input{multienum-xetex-bidi.def}}{} \@ifpackageloaded{natbib}{\input{natbib-xetex-bidi.def}}{} |