diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-11 18:46:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-11 18:46:44 +0000 |
commit | b2653703ac55bf05f550a80ffa1fe05c5fe8bd47 (patch) | |
tree | f1134c0157d1fefadb188b15f095c13674484ea9 /Master/texmf-dist/tex/xelatex/bidi | |
parent | 47bbbc330ace9242ab5ee3af16c08d19a1496ac6 (diff) |
bidi update (6jan10)
git-svn-id: svn://tug.org/texlive/trunk@16674 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi')
62 files changed, 3403 insertions, 2803 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsart-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsart-bidi.def index fa6ebca6530..4eaa7ac72ed 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/amsart-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/amsart-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `amsart-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `amsart-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{amsart-bidi.def}[2010/03/01 v0.3 adaptations for amsart class] \def\@tocline#1#2#3#4#5#6#7{\relax \ifnum #1>\c@tocdepth % then omit \else @@ -35,7 +32,7 @@ \renewcommand\thesubparagraph {\theparagraph\@SepMark\arabic{subparagraph}} \def\part{\@startsection{part}{0}% \z@{\linespacing\@plus\linespacing}{.5\linespacing}% - {\normalfont\bfseries\raggedleft}} + {\normalfont\bfseries\if@RTL\raggedleft\else\raggedright\fi}} \renewenvironment{thebibliography}[1]{% \@bibtitlestyle \normalfont\bibliofont\labelsep .5em\relax @@ -50,8 +47,56 @@ \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}% \endlist } +\def\right@footnote{% + \hbox to \columnwidth + {\beginR \vbox{\kern-.4\p@ + \hrule\@width 5pc\kern11\p@\kern-\footnotesep}\hfil\endR}} +\def\left@footnote{\kern-.4\p@ + \hrule\@width 5pc\kern11\p@\kern-\footnotesep} +\long\def\@footnotetext#1{% + \begingroup + \setbox\footins + \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore \parindent\normalparindent \sloppy + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces#1\unskip\strut\par}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@RTLfootnotetext#1{% + \begingroup + \setbox\footins + \vbox{\@RTLtrue\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore \parindent\normalparindent \sloppy + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces #1\unskip\strut\par}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@LTRfootnotetext#1{% + \begingroup + \setbox\footins + \vbox{\@RTLfalse\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore \parindent\normalparindent \sloppy + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces #1\unskip\strut\par}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsbook-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsbook-bidi.def index f0ad9f886b0..04bbebd7966 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/amsbook-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/amsbook-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `amsbook-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `amsbook-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{amsbook-bidi.def}[2010/03/01 v0.3 adaptations for amsbook class] \def\@tocline#1#2#3#4#5#6#7{\relax \ifnum #1>\c@tocdepth % then omit \else @@ -60,8 +57,56 @@ \def\@idxitem{\par\hangindent -2em} \def\subitem{\par\hangindent -2em\hspace*{1em}} \def\subsubitem{\par\hangindent -3em\hspace*{2em}} +\def\right@footnote{% + \hbox to \columnwidth + {\beginR \vbox{\kern-.4\p@ + \hrule\@width 5pc\kern11\p@\kern-\footnotesep}\hfil\endR}} +\def\left@footnote{\kern-.4\p@ + \hrule\@width 5pc\kern11\p@\kern-\footnotesep} +\long\def\@footnotetext#1{% + \begingroup + \setbox\footins + \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore \parindent\normalparindent \sloppy + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces#1\unskip\strut\par}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@RTLfootnotetext#1{% + \begingroup + \setbox\footins + \vbox{\@RTLtrue\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore \parindent\normalparindent \sloppy + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces #1\unskip\strut\par}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@LTRfootnotetext#1{% + \begingroup + \setbox\footins + \vbox{\@RTLfalse\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore \parindent\normalparindent \sloppy + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces #1\unskip\strut\par}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsmath-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsmath-bidi.def new file mode 100644 index 00000000000..e148fc0fc4d --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/amsmath-bidi.def @@ -0,0 +1,50 @@ +%% +%% This is file `amsmath-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{amsmath-bidi.def}[2010/03/01 v0.2 adaptations for amsmath package] +\renewenvironment{equation}{% + \incr@eqnum + \mathdisplay@push + \st@rredfalse \global\@eqnswtrue + \beginL\mathdisplay{equation}% +}{% + \endmathdisplay{equation}\endL% + \mathdisplay@pop + \ignorespacesafterend +} + +\renewcommand{\numberwithin}[3][\arabic]{% + \@ifundefined{c@#2}{\@nocounterr{#2}}{% + \@ifundefined{c@#3}{\@nocnterr{#3}}{% + \@addtoreset{#2}{#3}% + \@xp\xdef\csname the#2\endcsname{% + \@xp\@nx\csname the#3\endcsname \@SepMark\@nx#1{#2}}}}% +} +\def\tagform@#1{\maketag@@@{\if@RTL\beginR\fi(\ignorespaces#1\unskip\@@italiccorr)\if@RTL\endR\fi}} +\renewcommand{\eqref}[1]{\beginL\textup{\tagform@{\ref{#1}}}\endL} +\let\@@text=\text +\def\text#1{\@@text{\if@RTL\beginR\fi#1\if@RTL\endR\fi}} +\DeclareRobustCommand{\[}{\begin{equation*}} +\DeclareRobustCommand{\]}{\end{equation*}} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `amsmath-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsthm-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsthm-bidi.def index a0ed8577aef..a51a758c584 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/amsthm-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/amsthm-bidi.def @@ -1,20 +1,17 @@ %% %% This is file `amsthm-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `amsthm-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{amsthm-bidi.def}[2010/03/01 v0.1 adaptations for amsthm package] \def\@thmcountersep{\@SepMark} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/array-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/array-bidi.def index 9f2fa8a1193..cf1986e1aaa 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/array-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/array-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `array-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `array-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{array-bidi.def}[2010/03/01 v0.1 adaptations for array package] \def\@testpach{\@chclass \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else \ifnum \@lastchclass=7 5 \else @@ -95,7 +92,7 @@ \let \par \@empty } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/article-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/article-bidi.def index 71a77895019..328d17fcee1 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/article-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/article-bidi.def @@ -1,17 +1,108 @@ %% %% This is file `article-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `article-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{article-bidi.def}[2010/03/01 v0.2 adaptations for standard article class] +\if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + \null\vfil + \vskip 60\p@ + \begin{center}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{center}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\else +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \end{center}% + \par + \vskip 1.5em} +\fi \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty @@ -40,7 +131,7 @@ \else \addcontentsline{toc}{part}{#1}% \fi - {\parindent \z@ \raggedleft + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne @@ -77,44 +168,44 @@ \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\sl\beginR\leftmark\endR\hfil\thepage}% - \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}% + \def\@evenhead{\sl\if@RTLmain\beginR\fi\leftmark\if@RTLmain\endR\fi\hfil\thepage}% + \def\@oddhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi - \beginR##1\endR}}{}}% + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne - \beginR\thesubsection\quad\endR + \if@RTLmain\beginR\fi\thesubsection\quad\if@RTLmain\endR\fi \fi - \beginR##1\endR}}} + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi}}} \else \def\ps@headings{% \let\@oddfoot\@empty - \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}% + \def\@oddhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne - \beginR\thesection\quad\endR + \if@RTLmain\beginR\fi\thesection\quad\if@RTLmain\endR\fi \fi - \beginR##1\endR}}}} + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}% - \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}% + \def\@evenhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\leftmark\if@RTLmain\endR\fi}% + \def\@oddhead{\sl\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \pagestyle{plain} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/arydshln-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/arydshln-bidi.def new file mode 100644 index 00000000000..5021c938aaf --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/arydshln-bidi.def @@ -0,0 +1,160 @@ +%% +%% This is file `arydshln-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{arydshln-bidi.def}[2010/03/01 v0.1 adaptations for arydshln package] +\def\endarray{\adl@endarray \egroup \adl@arrayrestore \if@RTLtab\egroup\endR\egroup\fi\egroup} +\def\endtabular{\endarray $\if@RTLtab\endR\fi\egroup\global\@RTLtabfalse} +\expandafter\let\csname endtabular*\endcsname\endtabular +\let\adl@array\@array +\def\@array{\adl@everyvbox\everyvbox + \everyvbox{\adl@arrayinit \the\adl@everyvbox \everyvbox\adl@everyvbox}% + \ifadl@inactive \adl@inactivate \else \adl@activate \fi + \let\adl@noalign\noalign + \adl@array} +\ifadl@usingarypkg +\def\@testpach{\@chclass + \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else + \ifnum \@lastchclass=7 5 \else + \ifnum \@lastchclass=8 \tw@ \else + \ifnum \@lastchclass=9 \thr@@ + \else \z@ + \ifnum \@lastchclass = 10 \else + \edef\@nextchar{\expandafter\string\@nextchar}% + \@chnum + \if \@nextchar c\z@ \else + \if \@nextchar \if@RTLtab r\else l\fi\@ne \else + \if \@nextchar \if@RTLtab l\else r\fi\tw@ \else + \z@ \@chclass + \if\@nextchar |\@ne \let\@arrayrule\adl@arrayrule \else + \if\@nextchar :\@ne \let\@arrayrule\adl@arraydashrule \else + \if\@nextchar ;\@ne \let\@arrayrule\adl@argarraydashrule \else + \if \@nextchar !6 \else + \if \@nextchar @7 \else + \if \@nextchar <8 \else + \if \@nextchar >9 \else + 10 + \@chnum + \if \@nextchar m\thr@@\else + \if \@nextchar p4 \else + \if \@nextchar b5 \else + \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi \fi \fi + \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi} + +\def\@classz{\@classx + \@tempcnta \count@ + \prepnext@tok + \@addtopreamble{\ifcase \@chnum + \hfil + \adl@putlrc{\d@llarbegin \insert@column \d@llarend}\hfil \or + \hskip1sp\adl@putlrc{\d@llarbegin \insert@column \d@llarend}\hfil \or + \hfil\hskip1sp\adl@putlrc{\d@llarbegin \insert@column \d@llarend}\or + \setbox\adl@box\hbox \adl@startmbox{\@nextchar}\insert@column + \adl@endmbox\or + \setbox\adl@box\vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or + \setbox\adl@box\vbox \@startpbox{\@nextchar}\insert@column \@endpbox + \fi}\prepnext@tok} +\def\adl@class@start{4} +\def\adl@class@iiiorvii{7} + +\else +\def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4\relax \else + \ifnum \@lastchclass=\thr@@ 5\relax \else + \z@ \if #1c\@chnum \z@ \else + \if \if@RTLtab#1r\else#1l\fi\@chnum \@ne \else + \if \if@RTLtab#1l\else#1r\fi\@chnum \tw@ \else + \@chclass + \if #1|\@ne \let\@arrayrule\adl@arrayrule \else + \if #1:\@ne \let\@arrayrule\adl@arraydashrule \else + \if #1;\@ne \let\@arrayrule\adl@argarraydashrule \else + \if #1@\tw@ \else + \if #1p\thr@@ \else \z@ \@preamerr 0\fi + \fi \fi \fi \fi \fi \fi \fi \fi \fi} + +\def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or + \or \or \@addamp \or + \@acolampacol \or \@firstampfalse \@acol \fi + \edef\@preamble{\@preamble + \ifcase \@chnum + \hfil\adl@putlrc{$\relax\@sharp$}\hfil + \or \adl@putlrc{$\relax\@sharp$}\hfil + \or \hfil\adl@putlrc{$\relax\@sharp$}\fi}} +\def\@tabclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or + \or \or \@addamp \or + \@acolampacol \or \@firstampfalse \@acol \fi + \edef\@preamble{\@preamble + \ifcase \@chnum + \hfil\adl@putlrc{\@sharp\unskip}\hfil + \or \adl@putlrc{\@sharp\unskip}\hfil + \or \hfil\hskip\z@ \adl@putlrc{\@sharp\unskip}\fi}} +\def\adl@class@start{6} +\def\adl@class@iiiorvii{3} +\fi +\@ifpackageloaded{colortbl}{% +\def\adl@inactivate{\adl@org@inactivate \let\CT@setup\adl@CT@setup} +\def\adl@activate{\adl@org@activate \let\CT@setup\adl@act@CT@setup + \let\@endpbox\adl@org@endpbox} +\let\adl@CT@setup\CT@setup +\def\CT@setup{\adl@CT@setup + \@tempdima\ht\z@ \advance\@tempdima\minrowclearance + \ifdim\adl@height<\@tempdima \global\adl@height\@tempdima \fi + \ifdim\adl@depth<\dp\z@ \global\adl@depth\dp\z@\fi} +\let\adl@act@CT@setup\CT@setup +\def\@classz{\@classx + \@tempcnta\count@ \prepnext@tok + \expandafter\CT@extract\the\toks\@tempcnta\columncolor!\@nil + \expandafter\adl@extract@arc\the\toks\@tempcnta\arrayrulecolor!\@nil + \expandafter\adl@extract@drsc + \the\toks\@tempcnta\doublerulesepcolor!\@nil + \expandafter\adl@extract@dgc\the\toks\@tempcnta\dashgapcolor!\@nil + \@addtopreamble{\if@RTL\beginL\fi% + \setbox\z@\hbox\bgroup\bgroup\if@RTL\beginR\fi + \ifcase \@chnum + \hskip\stretch{.5}\kern\z@ + \d@llarbegin + \insert@column + \d@llarend\hskip\stretch{.5}% + \or \d@llarbegin \insert@column \d@llarend \hfill + \or \hfill \kern\z@ \d@llarbegin \insert@column \d@llarend + \or $\vcenter + \@startpbox{\@nextchar}\insert@column \@endpbox $% + \or \vtop \@startpbox{\@nextchar}\insert@column \@endpbox + \or \vbox \@startpbox{\@nextchar}\insert@column \@endpbox + \fi + \if@RTL\endR\fi\egroup\egroup + \begingroup + \CT@setup + \CT@column@color + \CT@row@color + \CT@cell@color + \CT@do@color + \endgroup + \@tempdima\ht\z@ + \advance\@tempdima\minrowclearance + \vrule\@height\@tempdima\@width\z@ + \unhbox\z@\if@RTL\endL\fi}% + \prepnext@tok} +\let\adl@act@classz\@classz +\let\adl@org@classz\@classz +}{} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `arydshln-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerthemebidiJLTree.sty b/Master/texmf-dist/tex/xelatex/bidi/beamerthemebidiJLTree.sty deleted file mode 100644 index 010f8255575..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/beamerthemebidiJLTree.sty +++ /dev/null @@ -1,133 +0,0 @@ -%% -%% This is file `beamerthemebidiJLTree.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `beamerthemebidiJLTree.sty') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% -\ProvidesPackage{beamerthemebidiJLTree} - -\newif\ifbeamer@tree@showhooks -\beamer@tree@showhookstrue - -\DeclareOptionBeamer{hooks}[true]{\csname beamer@tree@showhooks#1\endcsname} - -\ProcessOptionsBeamer -\mode -<presentation> - -\setbeamertemplate{navigation symbols}{} -\usecolortheme{rose} -\useinnertheme[shadow=true]{rounded}% les block - -\defbeamertemplate*{footline}{bidiJLTree theme} -{ - \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot} - \end{beamercolorbox} - \hbox{% - \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{date in head/foot}% - \usebeamerfont{date in head/foot} - \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} - \end{beamercolorbox}% - \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{title in head/foot}% - \usebeamerfont{title in head/foot}\beginR\hspace*{2ex}\insertauthor \hspace*{1ex} (\insertshortinstitute) \hspace*{2ex} \insertdate\endR - \end{beamercolorbox}}% -} - -\defbeamertemplate*{sidebar right}{bidiJLTree theme}{} - -\usesectionheadtemplate -{\hfil\insertsectionhead} -{\hfill\color{fg!50!bg}\insertsectionhead} - -\usesubsectionheadtemplate -{\hfil\insertsubsectionhead} -{\hfill\color{fg!50!bg}\insertsubsectionhead} - -\defbeamertemplate*{headline}{bidiJLTree theme} -{% - \leavevmode% - \begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{upper separation line head} - \end{beamercolorbox} - \@tempdimb=3.625ex% 2.4375ex% - \multiply\@tempdimb by\beamer@sectionmax% -%% \advance\@tempdimb by 1.125ex% - \advance\@tempdimb by -1.125ex% - \ifdim\@tempdimb<10.9ex% 3*(2.5+1.125) - \@tempdimb=10.9ex% - \fi - \begin{beamercolorbox}[wd=.45\paperwidth, ht=\@tempdimb]{left block}% - \usebeamerfont{section in head/foot}% - \vbox to\@tempdimb{\vfill\insertsectionnavigation{.45\paperwidth}\vfill}% - \end{beamercolorbox}% - \begin{beamercolorbox}[wd=1.125ex,ht=\@tempdimb,dp=1.125ex]{middle separation line head}% - \end{beamercolorbox}% - \begin{beamercolorbox}[wd=.44\paperwidth]{middle block}% - \vbox to\@tempdimb{\vfill% - \begin{beamercolorbox}[wd=.44\paperwidth,ht=2.5ex,dp=1.125ex,% - leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}% - \usebeamerfont{title in head/foot}\insertshorttitle - \end{beamercolorbox} - \begin{beamercolorbox}[wd=.44\paperwidth,ht=2.5ex,dp=1.125ex,% - leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot} - \usebeamerfont{section in head/foot}% - \ifbeamer@tree@showhooks - \setbox\beamer@tempbox=\hbox{\insertsectionhead}% - \ifdim\wd\beamer@tempbox>1pt% - \hskip2pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}% - \hskip1pt% - \fi% - \else% - \hskip6pt% - \fi% - \insertsectionhead - \end{beamercolorbox} - \begin{beamercolorbox}[wd=.44\paperwidth,ht=2.5ex,dp=1.125ex,% - leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot} - \usebeamerfont{subsection in head/foot}% - \ifbeamer@tree@showhooks - \setbox\beamer@tempbox=\hbox{\insertsubsectionhead}% - \ifdim\wd\beamer@tempbox>1pt% - \hskip9.4pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}% - \hskip1pt% - \fi% - \else% - \hskip12pt% - \fi% - \insertsubsectionhead - \end{beamercolorbox}% - \vfill}% - \end{beamercolorbox}% - \begin{beamercolorbox}[wd=.1\paperwidth,ht=\@tempdimb,right]{right block}% - \vbox to\@tempdimb{\vfill\insertlogo\vfill} - \end{beamercolorbox} - \vfill - \begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{lower separation line head} - \end{beamercolorbox} -} -\setbeamercolor{separation line}{use=structure,bg=structure.fg!50!bg} - -\mode -<all> -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `beamerthemebidiJLTree.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bibitem.pdf b/Master/texmf-dist/tex/xelatex/bidi/bibitem.pdf Binary files differdeleted file mode 100755 index 49191743021..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/bibitem.pdf +++ /dev/null diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi.sty b/Master/texmf-dist/tex/xelatex/bidi/bidi.sty index c453366df83..89f18c2000e 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/bidi.sty +++ b/Master/texmf-dist/tex/xelatex/bidi/bidi.sty @@ -1,28 +1,42 @@ %% %% This is file `bidi.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidi.sty') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% \NeedsTeXFormat{LaTeX2e} -\def\bididate{2009/08/09} -\def\bidiversion{v1.0.3} -\def\bidirevision{revision 82} +\def\bididate{2010/03/01} +\def\bidiversion{v1.0.4} +\def\bidirevision{revision 202} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space <\bidirevision> Bidirectional typesetting in XeLaTeX] \AtBeginDocument{\special{pdf: docinfo << -/Creator (Bidi \bidiversion\space <\bidirevision> Copyright © 2009 Vafa Khalighi) +/Creator (Bidi \bidiversion\space <\bidirevision> Copyright © 2009-2010 Vafa Khalighi) >>}} +\edef\bidiinfo{% +bidi package (Support for bidirectional typesetting with XeLaTeX)^^J +Description: A convenient interface for typesetting bidirectional^^J +texts with XeLaTeX. The package includes adaptations for use^^J +with many other commonly-used packages.^^J +Copyright © 2009-2010 Vafa Khalighi^^J +\bidiversion, <\bidirevision>, \bididate^^J +License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J +Home: http://bidi.berlios.de^^J +Location on CTAN: /macros/xetex/latex/bidi} +\typeout{\bidiinfo} +\edef\bidi@everyjob{\the\everyjob} +\everyjob{\bidi@everyjob\typeout{\bidiinfo}} +\def\@tagsextension{clo} +\def\@definitionfileextension{def} +\def\@iftagsloaded{\@ifl@aded\@tagsextension} +\def\@ifdefinitionfileloaded{\@ifl@aded\@definitionfileextension} \newif\if@RTLmain \newif\if@RTL +\newif\if@Latin \newif\if@RTLtab \newif\if@sentdir \newif\if@RTL@footnote @@ -39,20 +53,6 @@ Bidirectional typesetting in XeLaTeX] \let\@tab@rltrue=\@RTLtabtrue \let\@tab@rlfalse=\@RTLtabfalse \@RTLmainfalse -\RequirePackage{amsmath} -\newcommand\bidi@isloaded[2][]{ - \expandafter\ifx\csname if@bidi@#2loaded@\endcsname\relax - \expandafter\newif\csname if@bidi@#2loaded@\endcsname - \fi - \@ifpackageloaded{#2} - {\csname @bidi@#2loaded@true\endcsname #1} - {\csname @bidi@#2loaded@false\endcsname}} -\bidi@isloaded{xunicode} -\AtBeginDocument{ - \if@bidi@xunicodeloaded@ - \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xunicode before bidi package. Please load package xunicode after bidi package, and then try to run xelatex on your document again}{}]{xunicode} - \fi% -} \ifx\TeXXeTstate\undefined\else% \TeXXeTstate=1 \fi @@ -123,12 +123,13 @@ Bidirectional typesetting in XeLaTeX] \let\setRL=\setRTL \let\setLR=\setLTR \let\unsetRL=\setLTR -\DeclareOption{RTLdocument}{\@RTLtrue\@RTL@footnotetrue\RTLdblcol\autofootnoterule} -\DeclareOption{rldocument}{\@RTLtrue\@RTL@footnotetrue\RTLdblcol\autofootnoterule} +\DeclareOption{RTLdocument}{\@RTLtrue\@RTL@footnotetrue\autofootnoterule} +\DeclareOption{rldocument}{\@RTLtrue\@RTL@footnotetrue\autofootnoterule} \def\rcases#1{\left.\vcenter{\normalbaselines\m@th \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\,\right\}} \def\SepMark#1{\gdef\@SepMark{\if@RTL\beginR\fi#1\if@RTL\endR\fi}} \SepMark{.} +\def\@thmcountersep{\@SepMark} \def\list#1#2{% \ifnum \@listdepth >5\relax \@toodeep @@ -183,8 +184,8 @@ Bidirectional typesetting in XeLaTeX] \def\narrower{% \advance\if@RTL\rightskip\else\leftskip\fi\parindent \advance\if@RTL\leftskip\else\rightskip\fi\parindent} -\def\leftmark{\beginR\expandafter\@leftmark\botmark\@empty\@empty\endR} -\def\rightmark{\beginR\expandafter\@rightmark\firstmark\@empty\@empty\endR} +\def\leftmark{\if@RTLmain\beginR\fi\expandafter\@leftmark\botmark\@empty\@empty\if@RTLmain\endR\fi} +\def\rightmark{\if@RTLmain\beginR\fi\expandafter\@rightmark\firstmark\@empty\@empty\if@RTLmain\endR\fi} \def\underline#1{% \relax \ifmmode\@@underline{#1}% @@ -282,39 +283,141 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \@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}} -\long\def\@makecaption#1#2{% - \vskip 10pt% - \setbox\@tempboxa\hbox{#1: #2}% - \ifdim \wd\@tempboxa >\hsize \if@RTL\beginR\fi#1: #2\par% - \else \hbox -to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil% -\if@RTL\endR\fi}% - \fi} -\renewenvironment{equation}{% - \incr@eqnum - \mathdisplay@push - \st@rredfalse \global\@eqnswtrue - \beginL\mathdisplay{equation}% -}{% - \endmathdisplay{equation}\endL% - \mathdisplay@pop - \ignorespacesafterend -} -\renewcommand{\numberwithin}[3][\arabic]{% - \@ifundefined{c@#2}{\@nocounterr{#2}}{% - \@ifundefined{c@#3}{\@nocnterr{#3}}{% - \@addtoreset{#2}{#3}% - \@xp\xdef\csname the#2\endcsname{% - \@xp\@nx\csname the#3\endcsname \@SepMark\@nx#1{#2}}}}% +\def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox + \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne + \if@twocolumn + \if@firstcolumn \@tempcnta\m@ne \fi + \else + \if@mparswitch + \ifodd\c@page \else\@tempcnta\m@ne \fi + \fi + \if@reversemargin \@tempcnta -\@tempcnta \fi + \fi + \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi + \@tempdima\@mparbottom + \advance\@tempdima -\@pageht + \advance\@tempdima\ht\@marbox + \ifdim\@tempdima >\z@ + \@latex@warning@no@line {Marginpar on page \thepage\space moved}% + \else + \@tempdima\z@ + \fi + \global\@mparbottom\@pageht + \global\advance\@mparbottom\@tempdima + \global\advance\@mparbottom\dp\@marbox + \global\advance\@mparbottom\marginparpush + \advance\@tempdima -\ht\@marbox + \global\setbox \@marbox + \vbox {\vskip \@tempdima + \box \@marbox}% + \global \ht\@marbox \z@ + \global \dp\@marbox \z@ + \kern -\@pagedp + \nointerlineskip + \hb@xt@\columnwidth + {\if@RTL\beginR\fi\ifnum \@tempcnta >\z@ + \hskip\columnwidth \hskip\marginparsep + \else + \hskip -\marginparsep \hskip -\marginparwidth + \fi + \box\@marbox \hss\if@RTL\endR\fi}% + \nointerlineskip + \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}} +\def\@stopline{\unskip\@stopfield\if@rjfield \global\@rjfieldfalse + \@tempdima\@totalleftmargin \advance\@tempdima\linewidth +\hbox to\@tempdima{\if@RTL\beginR\fi\@itemfudge\hskip\dimen\@curtabmar + \box\@curline\hfil\box\@curfield\if@RTL\endR\fi}\else\@addfield + \hbox to\linewidth{\if@RTL\beginR\fi\@itemfudge + \hskip\dimen\@curtabmar\box\@curline\hfil\if@RTL\endR\fi}% +\fi} +\def\@outputpage{% +\begingroup % the \endgroup is put in by \aftergroup + \let \protect \noexpand + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse + \@parboxrestore + \shipout \vbox{% + \set@typeset@protect + \aftergroup \endgroup + \aftergroup \set@typeset@protect + % correct? or just restore by ending + % the group? + \if@specialpage + \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% + \fi + \if@twoside + \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot + \let\@themargin\oddsidemargin + \else \let\@thehead\@evenhead + \let\@thefoot\@evenfoot \let\@themargin\evensidemargin + \fi + \ifx\@thehead\@empty \let\@thehead\hfil \fi + \ifx\@thefoot\@empty \let\@thefoot\hfil \fi + \else %% not @twoside + \ifx\@oddhead\@empty \let\@thehead\hfil \fi + \ifx\@oddfoot\@empty \let\@thefoot\hfil \fi + \fi + \reset@font + \normalsize + \normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \@begindvi + \vskip \topmargin + \moveright\@themargin \vbox {% + \setbox\@tempboxa \vbox to\headheight{% + \vfil + \color@hbox + \normalcolor + \hb@xt@\textwidth{\if@RTLmain\beginR\fi\@thehead\if@RTLmain\endR\fi}% + \color@endbox + }% %% 22 Feb 87 + \dp\@tempboxa \z@ + \box\@tempboxa + \vskip \headsep + \box\@outputbox + \baselineskip \footskip + \color@hbox + \normalcolor + \hb@xt@\textwidth{\if@RTLmain\beginR\fi\@thefoot\if@RTLmain\endR\fi}% + \color@endbox + }% + }% + \global\let\if@newlist\@@if@newlist + \global \@colht \textheight + \stepcounter{page}% + \let\firstmark\botmark } -\def\tagform@#1{\maketag@@@{\if@RTL)\else(\fi\ignorespaces\text{#1}\unskip\@@italiccorr\if@RTL(\else)\fi}} -\renewcommand{\eqref}[1]{\beginL\textup{\tagform@{\ref{#1}}}\endL} -\let\@@text=\text -\def\text#1{\@@text{\if@RTL\beginR\fi#1\if@RTL\endR\fi}} +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + \if@RTL\beginR\fi#1: #2\if@RTL\endR\fi\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}% + \fi + \vskip\belowcaptionskip} +\def\equation{\beginL$$\refstepcounter{equation}} +\def\endequation{\eqno \hbox{\@eqnnum}$$\endL\@ignoretrue} +\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}} \input{footnote-bidi.def} +\input{loadingorder-bidi.def} +\@iftagsloaded{leqno}{\input{leqno-bidi.def}}{} +\@iftagsloaded{fleqn}{\input{fleqn-bidi.def}}{} +\@ifpackageloaded{amsmath}{\input{amsmath-bidi.def}}{} \@ifpackageloaded{amsthm}{\input{amsthm-bidi.def}}{} +\@ifpackageloaded{breqn}{\input{breqn-bidi.def}}{} +\@ifpackageloaded{color}{\input{color-bidi.def}}{} +\@ifpackageloaded{xcolor}{\input{xcolor-bidi.def}}{} +\@ifpackageloaded{colortbl}{\input{colortbl-bidi.def}}{} +\@ifpackageloaded{flowfram}{\input{flowfram-bidi.def}}{} \@ifpackageloaded{xltxtra}{\input{xltxtra-bidi.def}}{} \@ifpackageloaded{wrapfig}{\input{wrapfig-bidi.def}}{} \@ifpackageloaded{graphicx}{\input{graphicx-bidi.def}}{} @@ -328,6 +431,8 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil% \@ifpackageloaded{array}{\input{array-bidi.def}}{} \@ifpackageloaded{stabular}{\input{stabular-bidi.def}}{} \@ifpackageloaded{longtable}{\input{longtable-bidi.def}}{} +\@ifpackageloaded{arydshln}{\input{arydshln-bidi.def}}{} +\@ifpackageloaded{multicol}{\input{multicol-bidi.def}}{} \@ifpackageloaded{minitoc}{\input{minitoc-bidi.def}}{} \@ifpackageloaded{ragged2e}{\input{ragged2e-bidi.def}}{} \@ifpackageloaded{tabls}{\input{tabls-bidi.def}}{} @@ -335,9 +440,10 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil% \@ifpackageloaded{tocstyle}{\input{tocstyle-bidi.def}}{} \@ifclassloaded{article}{\input{article-bidi.def}}{} \@ifclassloaded{amsart}{\input{amsart-bidi.def}}{} +\@ifclassloaded{letter}{\input{letter-bidi.def}}{} \@ifclassloaded{memoir}{\input{memoir-bidi.def}}{} \@ifclassloaded{refrep}{\input{refrep-bidi.def}}{} -\@ifclassloaded{report}{\input{report-bidi.def}}{} +\@ifclassloaded{report}{\@ifpackageloaded{flowfram}{}{\input{report-bidi.def}}}{} \@ifclassloaded{rapport3}{\input{rapport3-bidi.def}}{} \@ifclassloaded{scrartcl}{\input{scrartcl-bidi.def}}{} \@ifclassloaded{scrbook}{\input{scrbook-bidi.def}}{} @@ -345,14 +451,13 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil% \@ifclassloaded{amsbook}{\input{amsbook-bidi.def}}{} \@ifclassloaded{bookest}{\input{bookest-bidi.def}}{} \@ifclassloaded{extbook}{\input{extbook-bidi.def}}{} -\@ifclassloaded{book}{\input{book-bidi.def}}{} -\@ifclassloaded{bidibeamer}{\input{bidibeamer-bidi.def}}{} +\@ifclassloaded{book}{\@ifpackageloaded{flowfram}{}{\input{book-bidi.def}}}{} \@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-bidi.def}}}{} \@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-bidi.def}}}{} \ProcessOptions %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty b/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty index c8eb1450449..3501e5d9480 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty +++ b/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty @@ -1,13 +1,9 @@ %% %% This is file `bidi2in1.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidi2in1.sty') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% @@ -70,7 +66,7 @@ } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidibeamer-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/bidibeamer-bidi.def deleted file mode 100644 index decc751e62c..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/bidibeamer-bidi.def +++ /dev/null @@ -1,395 +0,0 @@ -%% -%% This is file `bidibeamer-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidibeamer-bidi.def') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% -\raggedleft -\def\LTR{\bgroup\par\raggedright\@RTLfalse} -\def\endLTR{\par\egroup} -\def\RTL{\bgroup\par\raggedleft\@RTLtrue} -\def\endRTL{\par\egroup} -\long\def\beamer@@frametitle[#1]#2{% - \beamer@ifempty{#2}{}{% - \gdef\insertframetitle{\raggedleft\rightskip=2em{\beginR#2\endR\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}% - \gdef\beamer@frametitle{\beginR#2\endR}% - \gdef\beamer@shortframetitle{\beginR#1\endR}% -}% -} -\def\@thm#1#2#3{% - \ifhmode\unskip\unskip\par\fi - \normalfont - \let\thmheadnl\relax - \let\thm@swap\@gobble - \thm@headpunct{.}% add period after heading - \thm@space@setup - #1% style overrides - \def\inserttheoremname{#3} - \def\inserttheorempunctuation{\the\thm@headpunct} - \def\@tempa{#2}% - \ifx\@empty\@tempa - \def\inserttheoremnumber{} - \else - \refstepcounter{#2}% - \expandafter\def\expandafter\inserttheoremnumber\expandafter{ \csname the#2\endcsname} - \fi - \beamer@begintheorem% -\raggedleft\@RTLtrue -} - \ifbeamer@countsect - \newtheorem{biditheorem}{\raggedleft \biditheoremname}[section] - \else - \newtheorem{biditheorem}{\raggedleft \biditheoremname} - \fi - \newtheorem{bidicorollary}[theorem]{\raggedleft \bidicorollaryname} - \newtheorem{bidifact}[theorem]{\raggedleft \bidifactname} - \newtheorem{bidilemma}[theorem]{\raggedleft \bidilemmaname} - \newtheorem{bidiproblem}[theorem]{\raggedleft \bidiproblemname} - \newtheorem{bidisolution}[theorem]{\raggedleft \bidisolutionname} -\theoremstyle{definition} - \newtheorem{bididefinition}[theorem]{\raggedleft \bididefinitionname} - \newtheorem{bididefinitions}[theorem]{\raggedleft \bididefinitionsname} -\theoremstyle{example} - \newtheorem{bidiexample}[theorem]{\raggedleft \bidiexamplename} - \newtheorem{bidiexamples}[theorem]{\raggedleft \bidiexamplesname} -\newenvironment<>{bidiproof}[1][\raggedleft \bidiproofname]{% - \par - \def\insertproofname{#1\@addpunct{}}% - \pushQED{\qed} - \usebeamertemplate{proof begin}\@RTLtrue#2} -{\popQED\usebeamertemplate{proof end}} - \newenvironment<>{bidiblock}[1]{% - \begin{actionenv}#2% - \def\insertblocktitle{\raggedleft#1}% - \par% - \usebeamertemplate{block begin}\raggedleft\@RTLtrue} - {\par% - \usebeamertemplate{block end}% - \end{actionenv}} - \newenvironment<>{bidialertblock}[1]{% - \begin{actionenv}#2% - \def\insertblocktitle{\raggedleft#1}% - \par% - \mode<presentation>{%\usebeamerfont{block}% - \setbeamercolor{local structure}{parent=alerted text}}% - \usebeamertemplate{block alerted begin}\raggedleft\@RTLtrue} - {\par% - \usebeamertemplate{block alerted end}% - \end{actionenv}} - \newenvironment<>{bidiexampleblock}[1]{% - \begin{actionenv}#2% - \def\insertblocktitle{\raggedleft#1}% - \par% - \mode<presentation>{%\usebeamerfont{block}% - \setbeamercolor{local structure}{parent=example text}}% - \usebeamertemplate{block example begin}\raggedleft\@RTLtrue} - {\par% - \usebeamertemplate{block example end}% - \end{actionenv}} -\def\@listi{\if@RTL\rightmargin\leftmargini\else\leftmargin\leftmargini\fi - \topsep 3\p@ \@plus2\p@ \@minus2.5\p@ - \parsep 0\p@ - \itemsep3\p@ \@plus2\p@ \@minus3\p@} -\let\@listI\@listi -\def\@listii{\if@RTL\rightmargin\leftmarginii\else\leftmargin\leftmarginii\fi - \topsep 2\p@ \@plus1\p@ \@minus2\p@ - \parsep 0\p@ \@plus\p@ - \itemsep \parsep} -\def\@listiii{\if@RTL\rightmargin\leftmarginiii\else\leftmargin\leftmarginiii\fi - \topsep 2\p@ \@plus1\p@ \@minus2\p@ - \parsep 0\p@ \@plus\p@ - \itemsep \parsep} -\def\beamer@enum@{% - \beamer@computepref\@itemdepth% sets \beameritemnestingprefix - \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}% - \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}% - \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}% - \expandafter - \list - {\usebeamertemplate{\beamer@enumtempl}} - {\usecounter\@enumctr% - \def\makelabel##1{{\hss\llap{{% - \usebeamerfont*{enumerate \beameritemnestingprefix item}% - \usebeamercolor[fg]{enumerate \beameritemnestingprefix item}##1}}}}}% - \beamer@cramped% - \raggedleft% - \beamer@firstlineitemizeunskip% -} -\renewcommand{\itemize}[1][]{% - \beamer@ifempty{#1}{}{\def\beamer@defaultospec{#1}}% - \ifnum \@itemdepth >2\relax\@toodeep\else - \advance\@itemdepth\@ne - \beamer@computepref\@itemdepth% sets \beameritemnestingprefix - \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}% - \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}% - \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}% - \list - {\usebeamertemplate{itemize \beameritemnestingprefix item}} - {\def\makelabel##1{% - {% - \hss\llap{{% - \usebeamerfont*{itemize \beameritemnestingprefix item}% - \usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}% - }% - }% - } - \fi% - \beamer@cramped% - \raggedleft% - \beamer@firstlineitemizeunskip% -} -\def\@@description{% - \advance\beamer@descdefault by \labelsep% - \list - {} - {\labelwidth\beamer@descdefault\leftmargin\beamer@descdefault\let\makelabel\beamer@descriptionitem}% - \beamer@cramped% - \raggedleft\rightskip=6em - \beamer@firstlineitemizeunskip% -} -\AtBeginDocument{\@RTLfalse} -\renewenvironment{beamer@frameslide}{% - \ifbeamer@autobreak\else% - \ifx\beamer@againname\@empty% - {\let\@elt\beamer@restorecounter\beamer@overlaycounterresets}% - \else% - {\let\@elt\beamer@labelrestorecounter\beamer@overlaycounterresets}% - \fi% - \fi% - \global\c@beamerpauses=1\relax% - \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{% - \refstepcounter{subsectionslide}% - \xdef\beamer@framestartpage{\the\c@page}% only first time - }{\clearpage\beamer@notesactions}% cleanup from previous slide - \hypersetup{pdfpagetransition=R}% - \hypersetup{pdfpageduration=}% - \xdef\beamer@frameendpage{\the\c@page}% every time - \beamer@setuplinks% - \beamer@displaybreak% - \global\setbox\beamer@zoombox=\box\voidb@x% - \def\beamer@zoomer{}% - \beamer@slidehaszoomfalse% - \gdef\insertframetitle{}% - \gdef\insertframesubtitle{}% - \gdef\beamer@frametitle{}% - \gdef\beamer@shortframetitle{}% - \gdef\beamer@framesubtitle{}% - \let\beamer@startcomment=\beamer@startcommentinframe% - % Start slide: - \beamer@framenotesbegin\@RTLtrue% - \global\setbox\beamer@framebox=\vbox\bgroup% - \beamer@inframetrue% - \let\frame=\framelatex% inside frames, use LaTeX's \frame command - \begin{beamer@framepauses}% - \ifbeamer@shrink% - \hsize=\beamer@shrinkfactorinv\hsize% - \textwidth=\beamer@shrinkfactorinv\textwidth% - \linewidth=\beamer@shrinkfactorinv\linewidth% - \fi% - % Insert labels if necessary: - \ifx\beamer@againname\@empty\else% - \nointerlineskip\vbox to0pt{\vss% - \label<\the\beamer@slideinframe>{\beamer@againname<\the\beamer@slideinframe>}% - \ifnum\beamer@slideinframe=1\relax% - \label<1>{\beamer@againname}% - \fi% - }\nointerlineskip% - \fi% - \ifx\beamer@framehypertargets\@empty\else% - \nointerlineskip\vbox to0pt{\vss% - \beamer@framehypertargets% - \global\let\beamer@framehypertargets\@empty% - }\nointerlineskip% - \fi% - \vskip-\parskip\vbox{}% - \beamer@initfirstlineunskip% - \ifbeamer@plainframe\nointerlineskip\fi% - \beamer@checkframetitle}% - {\end{beamer@framepauses}% - \egroup% - \ifx\beamer@frametitle\@empty% - \setbox\beamer@frametitlebox=\box\voidb@x% - \else% - \setbox\beamer@frametitlebox=\vbox{% - \vbox{}% - {\parskip0pt\usebeamertemplate***{frametitle}\vskip0.25em}% - }% - \fi% - \ifbeamer@plainframe% - \beamer@frametextheight=\paperheight% - \else% - \beamer@frametextheight=\textheight% - \fi% - \advance\beamer@frametextheight by-\ht\beamer@frametitlebox% - \advance\beamer@frametextheight by-\dp\beamer@frametitlebox% - \advance\beamer@frametextheight by-\beamer@frametopskip% - \ifbeamer@shrink% - \beamer@shrinkframebox% - \fi% - \ifx\beamer@zoomer\@empty - \setbox\beamer@framebox=\vbox{% - \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak% - \nointerlineskip\unvbox\beamer@frametitlebox% - \nobreak% - \ifbeamer@autobreak% - \vskip\beamer@frametopskipautobreak% - \else% - \vskip\beamer@frametopskip% - \fi% - \nobreak% - \nointerlineskip\box\beamer@zoombox\nointerlineskip% - \nobreak% - \ifbeamer@slidehaszoom\box\beamer@framebox\else\unvbox\beamer@framebox\fi% - % bottom skip is added in autobreakframebox - }% - \beamer@autobreakframebox% - \else% - \beamer@zoomer% - \fi% - \beamer@undolabels% - \beamer@framenotesend% - \box\beamer@framebox} -\long\def\beamer@title[#1]#2{% - \def\inserttitle{\beginR#2\endR}% - \def\beamer@shorttitle{\beginR#1\endR}% - } -\long\def\beamer@subtitle[#1]#2{% - \def\insertsubtitle{\beginR#2\endR}% - \def\beamer@shortsubtitle{\beginR#1\endR}% - } -\long\def\beamer@date[#1]#2{% - \def\insertdate{\beginR#2\endR}% - \def\beamer@shortdate{\beginR#1\endR}% - } -\long\def\beamer@author[#1]#2{% - \def\insertauthor{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}\beginR#2\endR}% - \def\beamer@shortauthor{\beginR#1\endR}% - \ifbeamer@autopdfinfo% - \def\beamer@andstripped{}% - \beamer@stripands#2 \and\relax - {\let\inst=\@gobble\let\thanks=\@gobble\def\and{, }\hypersetup{pdfauthor={\beamer@andstripped}}} - \fi% -} -\long\def\beamer@institute[#1]#2{% - \def\beamer@temp{\beginR#2\endR}% - \ifx\beamer@temp\@empty - \def\insertinstitute{} - \else - \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}\beginR#2\endR}% - \fi - \def\beamer@shortinstitute{\beginR#1\endR}} -\renewenvironment{thebibliography}[1] -{%\leavevmode\unskip% - \list{\@biblabel{\@arabic\c@enumiv}}% - {\settowidth\labelwidth{\beamer@biblabeltemplate{\@biblabel{#1}}}% - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \itemsep=0pt% - \partopsep=0pt% - \topsep=0pt% - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{\@arabic\c@enumiv} - \let\makelabel\beamer@biblabeltemplate}% - \sloppy\raggedleft - \clubpenalty10000 - \@clubpenalty \clubpenalty - \widowpenalty10000% - \sfcode`\.\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \ifhmode\unskip\fi\endlist} -\long\def\beamer@@@section#1{\beamer@section[\beginR#1\endR]{#1}} -\def\beamer@@@subsection#1{\beamer@subsection[\beginR#1\endR]{#1}} -\def\beamer@@@subsubsection#1{\beamer@subsubsection[\beginR#1\endR]{#1}} -\long\def\beamer@subsectionintoc#1#2#3#4#5#6{% - \ifnum\c@tocdepth>1% - \ifnum#5=\beamer@showpartnumber% - { - \beamer@saveanother% - \gdef\beamer@todo{}% - \beamer@slideinframe=#1\relax% - \expandafter\only\beamer@tocsections{\gdef\beamer@todo{% - \ifbeamer@pausesubsections\pause\fi% - \beamer@tempcount=#6% - \advance\beamer@tempcount by\beamer@sectionadjust% - \edef\inserttocsectionnumber{\the\beamer@tempcount}% - \def\inserttocsubsectionnumber{#2}% - \def\inserttocsubsection{\rightskip=1.5em\hyperlink{Navigation#4}{\beginR#3\endR\hfill}}% - \beamer@tocifnothide{\ifnum\c@section=#1\beamer@toc@oss\else\beamer@toc@ooss\fi}% - {% - \def\beamer@breakhere{\\}% - \beamer@tocact{\ifnum\c@section=#1\ifnum\c@subsection=#2\beamer@toc@css\else\beamer@toc@oss\fi\else\beamer@toc@ooss\fi} - {subsection in toc}% - }% - }}% - \beamer@restoreanother% - } - \beamer@todo% - \fi\fi% -} -\long\def\beamer@subsubsectionintoc#1#2#3#4#5#6#7{% - \ifnum\c@tocdepth>2% - \ifnum#1=\beamer@showpartnumber% - { - \beamer@saveanother% - \gdef\beamer@todo{}% - \beamer@slideinframe=#2\relax% - \expandafter\only\beamer@tocsections{\gdef\beamer@todo{% - \ifbeamer@pausesubsections\pause\fi% - \beamer@tempcount=#6% - \advance\beamer@tempcount by\beamer@sectionadjust% - \edef\inserttocsectionnumber{\the\beamer@tempcount}% - \def\inserttocsubsectionnumber{#3}% - \def\inserttocsubsubsectionnumber{#4}% - \def\inserttocsubsubsection{\rightskip=3em\hyperlink{Navigation#5}{\beginR#7\endR\hfill}}% - \beamer@tocifnothide{\ifnum\c@section=#2\beamer@toc@oss\else\beamer@toc@ooss\fi}% - {% - \def\beamer@breakhere{\\}% - \beamer@tocact{\ifnum\c@section=#2\ifnum\c@subsection=#3\beamer@toc@css\else\beamer@toc@oss\fi\else\beamer@toc@ooss\fi} - {subsubsection in toc}% - }% - }}% - \beamer@restoreanother% - } - \beamer@todo% - \fi\fi% -} -\long\def\beamer@makecaption#1#2{% - \def\insertcaptionname{\csname#1name\endcsname}% - \def\insertcaptionnumber{\csname the#1\endcsname}% - \def\insertcaption{#2}% - \nobreak\vskip\abovecaptionskip\nobreak - \sbox\@tempboxa{\usebeamertemplate**{caption}}% - \ifdim \wd\@tempboxa >\hsize - \usebeamertemplate**{caption}\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}% - \fi - \nobreak\vskip\belowcaptionskip\nobreak} -\let\origin@alert=\alert -\def\alert#1{\ifmmode\origin@alert{#1}\else\if@RTL\beginL\origin@alert{\beginR#1\endR}\endL\else\origin@alert{#1}\fi\fi} -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `bidibeamer-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidibeamer.cls b/Master/texmf-dist/tex/xelatex/bidi/bidibeamer.cls deleted file mode 100644 index 3efdf50bd0f..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/bidibeamer.cls +++ /dev/null @@ -1,370 +0,0 @@ -%% -%% This is file `bidibeamer.cls', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidibeamer.cls') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% - -\RequirePackage{beamerbasercs} -\def\beamer@version{3.07} - -\RequirePackage{beamerbasemodes} - -\beamer@transferifnecessary - -\ifx\pdfoutput\@undefined \newcount\pdfoutput \fi -\ifx\pdfoutput\relax \newcount\pdfoutput \fi - - -\newdimen\headheight % Total height of the headline (including depth) -\newdimen\headdp % Depth of the headline -\newdimen\footheight % Height of the footline -\newdimen\sidebarheight % Height of the sidebars - -\newdimen\beamer@tempdim -\newdimen\beamer@finalheight -\newdimen\beamer@animht -\newdimen\beamer@animdp -\newdimen\beamer@animwd -\newdimen\beamer@leftmargin -\newdimen\beamer@rightmargin -\newdimen\beamer@leftsidebar -\newdimen\beamer@rightsidebar -\newdimen\beamer@boxsize -\newdimen\beamer@vboxoffset -\newdimen\beamer@descdefault -\newdimen\beamer@descriptionwidth - -\newskip\beamer@lastskip - -\newbox\beamer@areabox -\newbox\beamer@animcurrent -\newbox\beamer@animshowbox -\newbox\beamer@sectionbox -\newbox\beamer@logobox -\newbox\beamer@linebox - -\newcount\beamer@sectioncount -\newcount\beamer@subsubsectionmax -\newcount\beamer@subsectionmax -\newcount\beamer@sectionmax -\newcount\beamer@totalheads -\newcount\beamer@headcounter -\newcount\beamer@partstartpage -\newcount\beamer@sectionstartpage -\newcount\beamer@subsectionstartpage -\newcount\beamer@animationtempa -\newcount\beamer@animationtempb -\newcount\beamer@xpos -\newcount\beamer@ypos -\newcount\beamer@showpartnumber -\newcount\beamer@currentsubsection -\newcount\beamer@coveringdepth -\newcount\beamer@sectionadjust -\newcount\beamer@tocsectionnumber - -\newif\ifbeamer@sansmath -\newif\ifbeamer@altmode -\newif\ifbeamer@notes -\newif\ifbeamer@notesnormals -\newif\ifbeamer@compress -\newif\ifbeamer@centered -\newif\ifbeamer@draftmode -\newif\ifbeamer@suppressreplacements % decides whether fonts should be substituted -\newif\ifbeamer@frameswithnotesonly -\newif\ifbeamer@ignorenonframe -\newif\ifbeamer@autopdfinfo - -\RequirePackage{beamerbaseoptions} - - -\beamer@suppressreplacementsfalse -\beamer@altmodefalse -\beamer@notesfalse -\beamer@notesnormalstrue -\beamer@compressfalse -\beamer@draftmodefalse -\beamer@frameswithnotesonlyfalse -\beamer@ignorenonframefalse -\beamer@autopdfinfotrue - -\DeclareOptionBeamer{usepdftitle}[true]{\csname beamer@autopdfinfo#1\endcsname} -\DeclareOptionBeamer{envcountsect}{\beamer@countsecttrue} -\DeclareOptionBeamer{notheorems}{\beamer@blocksfalse} -\DeclareOptionBeamer{noamsthm}{\beamer@blocksfalse\beamer@amsfalse} - -\DeclareOptionBeamer{compress}{\beamer@compresstrue} - -\DeclareOptionBeamer{t}{\beamer@centeredfalse} -\DeclareOptionBeamer{c}{\beamer@centeredtrue} - -\DeclareOptionBeamer{leqno}{\input{leqno.clo}} -\DeclareOptionBeamer{fleqn}{\input{fleqn.clo}} - -\def\beamer@currentmode{beamer} -\DeclareOptionBeamer{handout}{\gdef\beamer@currentmode{handout}} -\DeclareOptionBeamer{trans}{\gdef\beamer@currentmode{trans}} - -\DeclareOptionBeamer{pdftex}{}% Used by hyperref -\DeclareOptionBeamer{nativepdf}{}% Used by hyperref -\DeclareOptionBeamer{pdfmark}{}% Used by hyperref -\DeclareOptionBeamer{dvips}{}% Used by hyperref -\DeclareOptionBeamer{dviwindo}{}% Used by hyperref -\DeclareOptionBeamer{dvipsone}{}% Used by hyperref -\DeclareOptionBeamer{vtex}{}% Used by hyperref -\DeclareOptionBeamer{ps2pdf}{}% Used by hyperref - -\DeclareOptionBeamer{ignorenonframetext}{\beamer@ignorenonframetrue} - -\def\beamer@size{{size11.clo}} -\DeclareOptionBeamer{bigger}{\def\beamer@size{{size12.clo}}} -\DeclareOptionBeamer{smaller}{\def\beamer@size{{size10.clo}}} - -\DeclareOptionBeamer{8pt}{\def\beamer@size{{size8.clo}}} -\DeclareOptionBeamer{9pt}{\def\beamer@size{{size9.clo}}} -\DeclareOptionBeamer{10pt}{\def\beamer@size{{size10.clo}}} -\DeclareOptionBeamer{11pt}{\def\beamer@size{{size11.clo}}} -\DeclareOptionBeamer{12pt}{\def\beamer@size{{size12.clo}}} -\DeclareOptionBeamer{14pt}{\def\beamer@size{{size14.clo}}} -\DeclareOptionBeamer{17pt}{\def\beamer@size{{size17.clo}}} -\DeclareOptionBeamer{20pt}{\def\beamer@size{{size20.clo}}} - -\DeclareOptionBeamer{draft}{\beamer@draftmodetrue} -\def\insertpagenumber{\thepage} - -\def\beamer@activecjk{} -\def\beamer@hypercjk{} - -\DeclareOptionBeamer{CJK}{\ExecuteOptionsBeamer{cjk}} -\DeclareOptionBeamer{cjk}{ - \def\beamer@hypercjk{\hypersetup{CJKbookmarks=true}} - - \def\beamer@activecjk{ - % Activate all >=128 characters. - \count@=127 - \@whilenum\count@<254 \do{% - \advance\count@ by 1 - \lccode`\~=\count@ - \catcode\count@=\active - \lowercase{\def~{\kern1ex}} - } - } -} - -\DeclareOptionBeamer{notes}[show]{\csname beamer@notesaction@#1\endcsname} -\def\beamer@notesaction@hide{% - \ClassWarning{beamer}{This option is obsolete. Use beamer option - ``hide notes'' instead.}% - \beamer@notesfalse} -\def\beamer@notesaction@show{% - \ClassWarning{beamer}{This option is obsolete. Use beamer option - ``show notes'' instead.}% - \beamer@notestrue} -\def\beamer@notesaction@only{% - \ClassWarning{beamer}{This option is obsolete. Use beamer option - ``show only notes'' instead.}% - \beamer@notestrue - \beamer@notesnormalsfalse - \nofiles -} -\def\beamer@notesaction@onlyslideswithnotes{% - \beamer@notestrue% - \beamer@frameswithnotesonlytrue% - \nofiles -} -\DeclareOptionBeamer{inrow}{ - \ClassError{beamer}{``inrow'' no longer supported. Use ``compress'' instead.}{}} -\DeclareOptionBeamer{compressnotes}{% - \ClassWarning{beamer}{``compressnotes'' is obsolete. Use - \noexpand\setbeamertemplate{note page}[compressed] instead} - \AtBeginDocument{\beamertemplatenotecompress}} -\DeclareOptionBeamer{notesonly}{ - \ClassWarning{beamer}{``notesonly'' is obsolete. Use beamer option - ``show only notes'' instead.} - \beamer@notesaction@only} -\DeclareOptionBeamer{blue}{ - \ClassWarning{beamer}{``blue'' is obsolete. Use color theme structure instead} - \def\beamer@loadlater{\usecolortheme[rgb={0.2,0.2,0.7}]{structure}}} -\DeclareOptionBeamer{red}{ - \ClassWarning{beamer}{``red'' is obsolete. Use color theme structure instead} - \def\beamer@loadlater{\usecolortheme[rgb={0.7,0.2,0.2}]{structure}}} -\DeclareOptionBeamer{blackandwhite}{ - \ClassWarning{beamer}{``blackandwhite'' is obsolete. Use color theme structure instead} - \def\beamer@loadlater{\usecolortheme[rgb={0.2,0.2,0.2}]{structure}}} -\DeclareOptionBeamer{brown}{ - \ClassWarning{beamer}{``brown'' is obsolete. Use color theme structure instead} - \def\beamer@loadlater{\usecolortheme[rgb={0.66,0.4,0.166}]{structure}}} -\DeclareOptionBeamer{slidescentered}{ - \ClassWarning{beamer}{``slidescentered'' is obsolete. Use ``c'' instead} - \beamer@centeredtrue} -\DeclareOptionBeamer{slidestop}{ - \ClassWarning{beamer}{``slidestop'' is obsolete. Use ``t'' instead} - \beamer@centeredfalse} -\DeclareOptionBeamer{sans}{% - \ClassWarning{beamer}{``sans'' is obsolete. Just remove this option} - \def\familydefault{\sfdefault} - \def\mathfamilydefault{\sfdefault} - \beamer@sansmathtrue -} -\DeclareOptionBeamer{serif}{% - \ClassWarning{beamer}{``serif'' is obsolete. Use font theme ``serif'' instead} - \def\familydefault{\rmdefault} - \def\mathfamilydefault{\rmdefault} - \beamer@sansmathfalse -} -\DeclareOptionBeamer{mathsans}{ - \ClassWarning{beamer}{``mathsans'' is obsolete. Use font theme ``serif'' with option ``butsansserifmath''} - \def\mathfamilydefault{\sfdefault}\beamer@sansmathtrue} -\DeclareOptionBeamer{mathserif}{ - \ClassWarning{beamer}{``mathserif'' is obsolete. Use font theme ``serif'' with option ``onlymath''} - \def\mathfamilydefault{\rmdefault}\beamer@sansmathfalse} -\DeclareOptionBeamer{professionalfont}{ - \ClassWarning{beamer}{``professionalfont'' is obsolete. Use font theme ``professionalfonts'' instead} - \beamer@suppressreplacementstrue} - -\def\familydefault{\rmdefault} -\def\mathfamilydefault{\sfdefault} -\beamer@sansmathtrue - -\PassOptionsToPackage{bookmarks=true,% - bookmarksopen=true,% - pdfborder={0 0 0},% - pdfhighlight={/N},% - linkbordercolor={.5 .5 .5}}{hyperref} - -\DeclareOptionBeamer{pgf}{\PassOptionsToPackage{#1}{pgf}} -\DeclareOptionBeamer{hyperref}{\PassOptionsToPackage{#1}{hyperref}} -\DeclareOptionBeamer{color}{\PassOptionsToPackage{#1}{color}} -\DeclareOptionBeamer{xcolor}{\PassOptionsToPackage{#1}{xcolor}} - -\def\beamer@loaducs{} - -\DeclareOptionBeamer{ucs}{% - \ifcase\pdfoutput - \def\beamer@loaducs{ - \RequirePackage{ucs}% - \AtBeginDocument{\PreloadUnicodePage{0}}% - \AtBeginDocument{\PreloadUnicodePage{1}}% - } - \or - \PassOptionsToPackage{pdftex,unicode}{hyperref} - \def\beamer@loaducs{ - \RequirePackage[hyperref]{ucs}% - \AtBeginDocument{\PreloadUnicodePage{0}}% - \AtBeginDocument{\PreloadUnicodePage{1}}% - } - \fi -} -\DeclareOptionBeamer{utf8}{\ExecuteOptionsBeamer{ucs}% - \g@addto@macro\beamer@loaducs{\RequirePackage[utf8]{inputenc}}% -} - - -\ExecuteOptionsBeamer{c} -\ProcessOptionsBeamer - -\beamer@filterclassoptions - -\RequirePackage{pgfcore,pgfbaseimage} - -\RequirePackage{xxcolor} - -\RequirePackage{amssymb} - -\RequirePackage[% - papersize={12.80cm,9.60cm}, - hmargin=1cm,% - vmargin=0cm,% - head=0.5cm,% will be changed later - headsep=0pt,% - foot=0.5cm% will be changed later - ]{geometry} - -\RequirePackage[implicit=false]{hyperref} - -\hypersetup{pdfcreator={LaTeX with beamer class version \beamer@version}} - -\beamer@loaducs -\beamer@hypercjk - -\expandafter\input\beamer@size -\geometry{headsep=0pt} - -\RequirePackage{beamerbasecompatibility} - -\RequirePackage{beamerbasefont} - -\normalfont -\raggedleft - -\AtBeginDocument -{ - \addtocontents{toc}{\protect\beamer@endinputifotherversion{\beamer@version pt}} - \addtocontents{nav}{\protect\beamer@endinputifotherversion{\beamer@version pt}} -} - -\RequirePackage{beamerbasemisc} - -\RequirePackage{beamerbasetwoscreens} - -\RequirePackage{beamerbaseoverlay} - -\RequirePackage{beamerbasetitle} - -\RequirePackage{beamerbasesection} - -\RequirePackage{beamerbaseframe} - -\RequirePackage{beamerbaseverbatim} - -\RequirePackage{beamerbaseframesize} - -\RequirePackage{beamerbaseframecomponents} - -\RequirePackage{beamerbasecolor} - -\RequirePackage{beamerbasenotes} - -\RequirePackage{beamerbasetoc} - -\RequirePackage{bidibeamerbasetemplates} - -\RequirePackage{beamerbaselocalstructure} - -\RequirePackage{beamerbasenavigation} - -\RequirePackage{beamerbasetheorems} - -\RequirePackage{beamerbasethemes} - -\usetheme{default} - -\csname beamer@loadlater\endcsname - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "~/texmf/tex/latex/beamer/examples/beamerexample1.tex" -%%% End: -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `bidibeamer.cls'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidibeamerbaseauxtemplates.sty b/Master/texmf-dist/tex/xelatex/bidi/bidibeamerbaseauxtemplates.sty deleted file mode 100644 index d6129057d6a..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/bidibeamerbaseauxtemplates.sty +++ /dev/null @@ -1,693 +0,0 @@ -%% -%% This is file `bidibeamerbaseauxtemplates.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidibeamerbaseauxtemplates.sty') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% - -\mode<presentation> - -\RequirePackage{beamerbaseboxes} - - -\normalsize -\pgfdeclareradialshading[bg,parent.bg]{tocsphere}{\pgfpoint{-0.5ex}{0.6ex}}% -{% - color(0cm)=(bg!35!white); - color(0.44ex)=(bg!75!white); - color(0.88ex)=(bg!70!black!90!parent.bg); - color(1.2ex)=(bg!50!black!90!parent.bg); - color(1.3ex)=(parent.bg)} - -\pgfdeclareradialshading[bg,parent.bg]{bigsphere}{\pgfpoint{-0.1849315ex}{.2260273ex}}% -{% - color(0cm)=(bg!15); - color(0.1643835ex)=(bg!75); - color(0.3287671ex)=(bg!70!black); - color(0.4520547ex)=(bg!50!black); - color(0.53ex)=(parent.bg)} - -\pgfdeclareradialshading[bg,parent.bg]{smallsphere}{\pgfpoint{-0.1479452ex}{0.18287671ex}}% -{% - color(0cm)=(bg!15); - color(0.1315068ex)=(bg!75); - color(0.2630136ex)=(bg!70!black); - color(0.36164383ex)=(bg!50!black); - color(0.427ex)=(parent.bg)} - -\def\beamer@usesphere#1#2{% - \hbox{\usebeamercolor{#1}\normalsize\pgfuseshading{#2}}} - - -\define@key{beamer@backgroundgrid}{step}{\def\beamer@bggw{#1}} -\define@key{beamer@backgroundgrid}{color}{\def\beamer@bggc{\color{#1}}} - -\defbeamertemplate{background}{grid}[1][] -{% - \setkeys{beamer@backgroundgrid}{step=0.5cm,color=fg!10!bg}% - \setkeys{beamer@backgroundgrid}{#1}% - \begin{pgfpicture}{0cm}{0cm}{\the\paperwidth}{\the\paperheight} - \beamer@bggc - \pgfpathgrid[stepx=\beamer@bggw,stepy=\beamer@bggw]{\pgfpointorigin}{\pgfpoint{\the\paperwidth}{\the\paperheight}} - \pgfusepath{stroke} - \end{pgfpicture}% -} - -\define@key{beamer@backgroundshade}{top}{\def\beamer@bgst{#1}} -\define@key{beamer@backgroundshade}{bottom}{\def\beamer@bgsb{#1}} -\define@key{beamer@backgroundshade}{right}{\def\beamer@bgst{#1}} -\define@key{beamer@backgroundshade}{left}{\def\beamer@bgsb{#1}} -\define@key{beamer@backgroundshade}{middle}{\def\beamer@bgsm{#1}} -\define@key{beamer@backgroundshade}{midpoint}{\def\beamer@bgsmp{#1}} - -\def\beamer@calcvertshading#1#2#3{% - {\usebeamercolor{palette primary}} - \usebeamercolor{normal text} - \setkeys{beamer@backgroundshade}{top=palette primary.bg!25!bg,bottom=bg,middle={},midpoint=0.5}% - \setkeys{beamer@backgroundshade}{#3} - \ifx\beamer@bgsm\@empty - \pgfdeclareverticalshading{#1}{#2}% - {color(0cm)=(\beamer@bgsb); color(\the\paperheight)=(\beamer@bgst)} - \colorlet{beamer@backgroundshadestart}{\beamer@bgsb}% - \colorlet{beamer@backgroundshadeend}{\beamer@bgst}% - \colorlet{beamer@average}{beamer@backgroundshadestart!50!beamer@backgroundshadeend}% - \else - \pgfdeclareverticalshading{#1}{#2}% - {color(0cm)=(\beamer@bgsb); color(\beamer@bgsmp\paperheight)=(\beamer@bgsm); color(\the\paperheight)=(\beamer@bgst)} - \colorlet{beamer@average}{\beamer@bgsm} - \fi% -} - -\def\beamer@calchorishading#1#2#3{% - {\usebeamercolor{palette primary}} - \usebeamercolor{normal text} - \setkeys{beamer@backgroundshade}{left=palette primary.bg!25!bg,right=bg,middle={},midpoint=0.5}% - \setkeys{beamer@backgroundshade}{#3} - \ifx\beamer@bgsm\@empty - \pgfdeclarehorizontalshading{#1}{\the\paperheight}% - {color(0cm)=(\beamer@bgsb); color(#2)=(\beamer@bgst)} - \colorlet{beamer@backgroundshadestart}{\beamer@bgsb}% - \colorlet{beamer@backgroundshadeend}{\beamer@bgst}% - \colorlet{beamer@average}{beamer@backgroundshadestart!50!beamer@backgroundshadeend}% - \else - \pgfdeclarehorizontalshading{#1}{\the\paperheight}% - {color(0cm)=(\beamer@bgsb); color(\beamer@bgsmp#2)=(\beamer@bgsm); color(#2)=(\beamer@bgst)} - \colorlet{beamer@average}{\beamer@bgsm} - \fi% -} - -\defbeamertemplate{background canvas}{vertical shading}[1][] -{% - \pgfuseshading{beamer@backgroundshading}% -} -[action] -{ - \beamer@calcvertshading{beamer@backgroundshading}{\the\paperwidth}{#1} - \colorlet{beamer@@average}{beamer@average} - \setbeamercolor{normal text}{bg=beamer@@average} -} - - -\defbeamertemplate{sidebar canvas left}{vertical shading}[1][] -{% - \pgfuseshading{beamer@sidebarcanvasleftshading}% -} -[action] -{ - \beamer@calcvertshading{beamer@sidebarcanvasleftshading}{\the\beamer@leftsidebar}{#1} -} - -\defbeamertemplate{sidebar canvas right}{vertical shading}[1][] -{% - \pgfuseshading{beamer@sidebarcanvasrightshading}% -} -[action] -{ - \beamer@calcvertshading{beamer@sidebarcanvasrightshading}{\the\beamer@rightsidebar}{#1} -} - -\defbeamertemplate{sidebar canvas left}{horizontal shading}[1][] -{% - \pgfuseshading{beamer@sidebarcanvasleftshading}% -} -[action] -{ - \beamer@calchorishading{beamer@sidebarcanvasleftshading}{\beamer@leftsidebar}{#1} -} - -\defbeamertemplate{sidebar canvas right}{horizontal shading}[1][] -{% - \pgfuseshading{beamer@sidebarcanvasrightshading}% -} -[action] -{ - \beamer@calchorishading{beamer@sidebarcanvasrightshading}{\beamer@rightsidebar}{#1} -} - - -\defbeamertemplate{section in toc}{sections numbered} -{\leavevmode\inserttocsectionnumber\@SepMark \inserttocsection\par} - -\defbeamertemplate{subsection in toc}{sections numbered} -{\leavevmode\if@RTL\rightskip=2.5em\else\leftskip=2.5em\fi\inserttocsubsection\par} - -\defbeamertemplate{subsubsection in toc}{sections numbered} -{\leavevmode\normalsize\usebeamerfont{subsection in toc}\if@RTL\rightskip=3.5em\else\leftskip=3.5em\fi\usebeamerfont{subsubsection in toc}% - \inserttocsubsubsection\par} - - -\defbeamertemplate{section in toc}{subsections numbered} -{\leavevmode\if@RTL\rightskip=2em\else\leftskip=2em\fi\inserttocsection\par} - -\defbeamertemplate{subsection in toc}{subsections numbered} -{\leavevmode\if@RTL\rightskip=2em\else\leftskip=2em\fi\rlap{\hskip-2em\inserttocsectionnumber\@SepMark\inserttocsubsectionnumber}\inserttocsubsection\par} - -\defbeamertemplate{subsubsection in toc}{subsections numbered} -{\leavevmode\normalsize\usebeamerfont{subsection in - toc}\if@RTL\rightskip=3em\else\leftskip=3em\fi\usebeamerfont{subsubsection in toc}% - \inserttocsubsubsection\par} - - -\defbeamertemplate{section in toc}{circle} -{\leavevmode\if@RTL\rightskip=2ex\else\leftskip=2ex\fi% - \llap{% - \usebeamerfont*{section number projected}% - \usebeamercolor{section number projected}% - \beginL\begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex} - \color{bg} - \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} - \pgfusepath{fill} - \pgftext[base]{\color{fg}\inserttocsectionnumber} - \end{pgfpicture}\endL\kern1.25ex% - }% - \inserttocsection\par} - -\defbeamertemplate{subsection in toc}{circle} -{\leavevmode\if@RTL\rightskip=2em\else\leftskip=2em\fi\inserttocsubsection\par} - -\defbeamertemplate{subsubsection in toc}{circle} -{\leavevmode\normalsize\usebeamerfont{subsection in - toc}\if@RTL\rightskip=3em\else\leftskip=3em\fi\usebeamerfont{subsubsection in toc}% - \inserttocsubsubsection\par} - - -\defbeamertemplate{section in toc}{square} -{\leavevmode\if@RTL\rightskip=1.75ex\else\leftskip=1.75ex\fi% - \llap{% - \usebeamerfont*{section number projected}% - \usebeamercolor[bg]{section number projected}% - \vrule width2.25ex height1.85ex depth.4ex% - \hskip-2.25ex% - \hbox to2.25ex{\hfil\color{fg}\inserttocsectionnumber\hfil}}% - \kern1.25ex\inserttocsection\par} - -\defbeamertemplate{subsection in toc}{square} -{\leavevmode\if@RTL\rightskip=5ex\else\leftskip=5ex\fi\llap{% - \usebeamercolor[bg]{subsection number projected}% - \vrule width1ex height1ex\kern1ex}\inserttocsubsection\par} - -\defbeamertemplate{subsubsection in toc}{square} -{\leavevmode\normalsize\usebeamerfont{subsection in - toc}\if@RTL\rightskip=7ex\else\leftskip=7ex\fi\usebeamerfont{subsubsection in toc}% - \llap{% - \usebeamercolor[bg]{subsubsection number projected}% - \vrule width0.75ex height0.75ex\kern1ex}\inserttocsubsubsection\par} - - -\defbeamertemplate{section in toc}{ball unnumbered} -{\leavevmode\raise0.1ex\beamer@usesphere{section number projected}{bigsphere}\kern1.25ex\inserttocsection\par} - -\defbeamertemplate{subsection in toc}{ball unnumbered} -{\leavevmode\if@RTL\rightskip=1.5em\else\leftskip=1.5em\fi\raise0.2ex\beamer@usesphere{subsection number projected}{smallsphere}% - \kern1ex\inserttocsubsection\par} - -\defbeamertemplate{subsubsection in toc}{ball unnumbered} -{\leavevmode\normalsize\usebeamerfont{subsection in - toc}\if@RTL\rightskip=3em\else\leftskip=3em\fi\usebeamerfont{subsubsection in toc}% - \beamer@usesphere{subsubsection number projected}{smallsphere}% - \kern0.75ex\inserttocsubsubsection\par} - - -\defbeamertemplate{section in toc}{ball} -{\leavevmode\if@RTL\rightskip=2.75ex\else\leftskip=2.75ex\fi% - \llap{% - \normalsize% - \beginL\begin{pgfpicture}{-1ex}{-0.7ex}{1ex}{1ex} - \pgftext{\beamer@usesphere{section number projected}{tocsphere}} - \pgftext{% - \usebeamerfont*{section number projected}% - \usebeamercolor{section number projected}% - \color{fg!90!bg}% - \inserttocsectionnumber} - \end{pgfpicture}\endL% - \kern1.25ex}% - \inserttocsection\par -} -[action] -{\setbeamerfont{section number projected}{size=\scriptsize}} - -\defbeamertemplate{subsection in toc}{ball} -{\leavevmode\if@RTL\rightskip=5ex\else\leftskip=5ex\fi% - \llap{\raise0.1ex\beamer@usesphere{subsection number projected}{bigsphere}\kern1ex}% - \inserttocsubsection\par% -} - -\defbeamertemplate{subsubsection in toc}{ball} -{\leavevmode\normalsize\usebeamerfont{subsection in - toc}\if@RTL\rightskip=7ex\else\leftskip=7ex\fi\usebeamerfont{subsubsection in toc}% - \llap{\beamer@usesphere{subsubsection number projected}{bigsphere}\kern0.75ex}% - \inserttocsubsubsection\par% -} - - -\defbeamertemplatealias{itemize item}{triangle}{default} -\defbeamertemplatealias{itemize subitem}{triangle}{default} -\defbeamertemplatealias{itemize subsubitem}{triangle}{default} - - -\defbeamertemplate{itemize item}{circle}{\small\raise0.5pt\hbox{\textbullet}} -\defbeamertemplate{itemize subitem}{circle}{\footnotesize\raise0.5pt\hbox{\textbullet}} -\defbeamertemplate{itemize subsubitem}{circle}{\footnotesize\raise0.5pt\hbox{\textbullet}} - - -\defbeamertemplate{itemize item}{square}{\hbox{\vrule width 1ex height 1ex}} -\defbeamertemplate{itemize subitem}{square}{\small\hbox{\vrule width 1ex height 1ex}} -\defbeamertemplate{itemize subsubitem}{square}{\small\hbox{\vrule width 1ex height 1ex}} - - -\defbeamertemplate{itemize item}{ball}{\raise0.2pt\beamer@usesphere{item projected}{bigsphere}} -\defbeamertemplate{itemize subitem}{ball}{\raise0.2pt\beamer@usesphere{subitem projected}{smallsphere}} -\defbeamertemplate{itemize subsubitem}{ball}{\raise0.2pt\beamer@usesphere{subsubitem projected}{smallsphere}} - - -\defbeamertemplate{enumerate item}{ball} -{\beginL - \begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex} - \usebeamercolor[fg]{item projected} - {\pgftransformscale{1.75}\pgftext{\normalsize\pgfuseshading{bigsphere}}} - {\pgftransformshift{\pgfpoint{0pt}{0.5pt}} - \pgftext{\usebeamerfont*{item projected}\insertenumlabel}} - \end{pgfpicture}% -\endL} - -\defbeamertemplate{enumerate subitem}{ball} -{\beginL - \begin{pgfpicture}{-1ex}{-0.55ex}{1ex}{1ex} - \usebeamercolor[fg]{subitem projected} - {\pgftransformscale{1.4}\pgftext{\normalsize\pgfuseshading{bigsphere}}} - \pgftext{% - \usebeamerfont*{subitem projected}% - \insertsubenumlabel} - \end{pgfpicture}% -\endL} - -\defbeamertemplate{enumerate subsubitem}{ball} -{\beginL - \begin{pgfpicture}{-1ex}{-0.55ex}{1ex}{1ex} - \usebeamercolor[fg]{subsubitem projected} - {\pgftransformscale{1.4}\pgftext{\normalsize\pgfuseshading{bigsphere}}} - \pgftext{% - \usebeamerfont*{subitem projected}% - \insertsubsubenumlabel} - \end{pgfpicture}% -\endL} - -\defbeamertemplate{enumerate mini template}{ball} -{\beginL - \begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex} - \usebeamercolor[fg]{\beameritemnestingprefix item projected} - {\pgftransformscale{1.75}\pgftext{\normalsize\pgfuseshading{bigsphere}}} - {\pgftransformshift{\pgfpoint{0pt}{0.5pt}}% - \usebeamerfont*{\beameritemnestingprefix item projected}% - \pgftext{\insertenumlabel}} - \end{pgfpicture} -\endL} - - -\defbeamertemplate{enumerate item}{square} -{ - \hbox{% - \usebeamerfont*{item projected}% - \usebeamercolor[bg]{item projected}% - \vrule width2.25ex height1.85ex depth.4ex% - \hskip-2.25ex% - \hbox to2.25ex{% - \hfil% - \color{fg}\insertenumlabel% - \hfil}% - }% -} -[action] -{\setbeamerfont{item projected}{size=\scriptsize}} - -\defbeamertemplate{enumerate subitem}{square} -{ - \hbox{% - \usebeamerfont*{subitem projected}% - \usebeamercolor[bg]{subitem projected}% - \vrule width2.25ex height1.85ex depth.4ex% - \hskip-2.25ex% - \hbox to2.25ex{% - \hfil% - \color{fg}\insertsubenumlabel% - \hfil}% - }% -} - -\defbeamertemplate{enumerate subsubitem}{square} -{ - \hbox{% - \usebeamerfont*{subitem projected}% - \usebeamercolor[bg]{subsubitem projected}% - \vrule width2.25ex height1.85ex depth.4ex% - \hskip-2.25ex% - \hbox to2.25ex{% - \hfil% - \color{fg}\insertsubsubenumlabel% - \hfil}% - }% -} - -\defbeamertemplate{enumerate mini template}{square} -{ - \hbox{% - \usebeamerfont*{\beameritemnestingprefix item projected}% - \usebeamercolor[bg]{\beameritemnestingprefix item projected}% - \vrule width2.25ex height1.85ex depth.4ex% - \hskip-2.25ex% - \hbox to2.25ex{% - \hfil% - \color{fg}\insertenumlabel% - \hfil}% - }% -} - - -\defbeamertemplate{enumerate item}{circle} -{\beginL - \usebeamerfont*{item projected}% - \usebeamercolor[bg]{item projected}% - \begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex} - \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} - \pgfusepath{fill} - \pgftext[base]{\color{fg}\insertenumlabel} - \end{pgfpicture}% -\endL} -[action] -{\setbeamerfont{item projected}{size=\scriptsize}} - -\defbeamertemplate{enumerate subitem}{circle} -{\beginL - \usebeamerfont*{subitem projected}% - \usebeamercolor[bg]{subitem projected}% - \begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex} - \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} - \pgfusepath{fill} - \pgftext[base]{\color{fg}\insertsubenumlabel} - \end{pgfpicture}% -\endL} - -\defbeamertemplate{enumerate subsubitem}{circle} -{\beginL - \usebeamerfont*{subsubitem projected}% - \usebeamercolor[bg]{subsubitem projected}% - \begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex} - \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} - \pgfusepath{fill} - \pgftext[base]{\color{fg}\insertsubsubenumlabel} - \end{pgfpicture}% -\endL} - -\defbeamertemplate{enumerate mini template}{circle} -{\beginL - \usebeamerfont*{\beameritemnestingprefix item projected}% - \usebeamercolor[bg]{\beameritemnestingprefix item projected}% - \begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex} - \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} - \pgfusepath{fill} - \pgftext[base]{\color{fg}\insertenumlabel} - \end{pgfpicture}% -\endL} - - -\defbeamertemplatealias{frametitle continuation}{roman}{default} - -\defbeamertemplate{frametitle continuation}{from second}[1][\insertcontinuationtext] -{\expandafter\ifnum\insertcontinuationcount>1\relax#1\fi} - - -\defbeamertemplatealias{bibliography item}{article}{default} - -\defbeamertemplate{bibliography item}{book} -{\lower2pt\hbox{\pgfuseimage{beamericonbook}}} - -\defbeamertemplate{bibliography item}{text} -{\insertbiblabel} - -\defbeamertemplate{bibliography item}{triangle} -{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\if@RTL\blacktriangleleft\else\blacktriangleright\fi$}} - - -\defbeamertemplate{headline}{text line}[1] -{\hskip\Gm@lmargin\hbox to\@tempdima{\textwidth=\@tempdima\hsize=\textwidth\relax#1\hfil}\hskip\Gm@rmargin} - - -\defbeamertemplate{footline}{text line}[1] -{\hskip\Gm@lmargin\hbox to\@tempdima{\textwidth=\@tempdima\hsize=\textwidth\relax#1\hfil}\hskip\Gm@rmargin} - -\defbeamertemplate{footline}{page number} -{% - \hfill% - \usebeamercolor[fg]{page number in head/foot}% - \usebeamerfont{page number in head/foot}% - \insertpagenumber\,/\,\insertpresentationendpage\kern1em\vskip2pt% -} - -\defbeamertemplate{footline}{frame number} -{ - \hfill% - \usebeamercolor[fg]{page number in head/foot}% - \usebeamerfont{page number in head/foot}% - \insertframenumber\,/\,\inserttotalframenumber\kern1em\vskip2pt% -} - - -\defbeamertemplate{mini frame}{box} -{% - \begin{pgfpicture}{0pt}{0pt}{.1cm}{.1cm} - \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\the\beamer@boxsize}{\the\beamer@boxsize}} - \pgfusepath{fill,stroke} - \end{pgfpicture}% -} -[action] -{ - \setbeamersize{mini frame size=.1cm,mini frame offset=.05cm} -} - -\defbeamertemplate{mini frame in current subsection}{box} -{% - \begin{pgfpicture}{0pt}{0pt}{.1cm}{.1cm} - \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\the\beamer@boxsize}{\the\beamer@boxsize}} - \pgfusepath{stroke} - \end{pgfpicture}% -} - -\defbeamertemplate{mini frame}{tick} -{% - \hskip-0.4pt\vrule height\beamer@boxsize width1.2pt% -} -[action] -{ - \setbeamersize{mini frame size=.1cm,mini frame offset=.05cm} -} - -\defbeamertemplate{mini frame in current subsection}{tick} -{% - \vrule height\beamer@boxsize width0.4pt% -} - - -\defbeamertemplate{caption}{numbered} -{% - \raggedright - {% - \usebeamercolor[fg]{caption name}% - \usebeamerfont*{caption name}% - \insertcaptionname~\insertcaptionnumber:% - } - \insertcaption\par -} - -\defbeamertemplate{caption}{caption name own line} -{% - \begin{minipage}{\textwidth} - \raggedright - {% - \usebeamercolor[fg]{caption name}% - \usebeamerfont*{caption name}% - \insertcaptionname% - }\\ - \insertcaption - \end{minipage} -} - - -\newdimen\beamer@blockheadheight% - -\defbeamertemplate{navigation symbols}{only frame symbol} -{\insertframenavigationsymbol} - -\defbeamertemplate{navigation symbols}{vertical} -{% - \vbox{% - \hbox{\insertslidenavigationsymbol} - \hbox{\insertframenavigationsymbol} - \hbox{\insertsubsectionnavigationsymbol} - \hbox{\insertsectionnavigationsymbol} - \hbox{\insertdocnavigationsymbol} - \hbox{\insertbackfindforwardnavigationsymbol}}% -} - -\defbeamertemplatealias{navigation symbols}{horizontal}{default} - - -\defbeamertemplateparent{blocks}[rounded]{block begin,block end,% - block alerted begin,block alerted end,% - block example begin,block example end}[1][] -{[#1]} - -\defbeamertemplate{block begin}{rounded}[1][shadow=false] -{ - \par\vskip\medskipamount% - \begin{beamerboxesrounded}[upper=block title,lower=block body,#1]% - {\raggedright\usebeamerfont*{block title}\insertblocktitle}% - \raggedright% - \usebeamerfont{block body}% -} -\defbeamertemplate{block end}{rounded}[1][] -{\end{beamerboxesrounded}\vskip\smallskipamount} - -\defbeamertemplate{block alerted begin}{rounded}[1][shadow=false] -{ - \par\vskip\medskipamount% - \begin{beamerboxesrounded}[upper=block title alerted,lower=block body alerted,#1]% - {\raggedright\usebeamerfont*{block title alerted}\insertblocktitle}% - \raggedright% - \usebeamerfont{block body alerted}% -}% -\defbeamertemplate{block alerted end}{rounded}[1][] -{\end{beamerboxesrounded}\vskip\smallskipamount} - -\defbeamertemplate{block example begin}{rounded}[1][shadow=false] -{ - \par\vskip\medskipamount% - \begin{beamerboxesrounded}[upper=block title example,lower=block body example,#1] - {\raggedright\usebeamerfont*{block title example}\insertblocktitle}% - \raggedright% - \usebeamerfont{block body alerted}% -}% -\defbeamertemplate{block example end}{rounded}[1][] -{\end{beamerboxesrounded}\vskip\smallskipamount} - - -\defbeamertemplate{note page}{plain} -{\insertnote} - -\defbeamertemplate{note page}{compressed} -{% - {% - \tiny - \let\\=\relax% - \insertvrule{0.125\paperheight}{white!90!black}% - \vskip-0.125\paperheight - \nointerlineskip - \vbox{\hfill\insertslideintonotes{0.125}\hskip-\Gm@rmargin\hskip0pt% - \vskip-0.125\paperheight\nointerlineskip}% - \nointerlineskip - \vbox to .125\paperheight{ - \setbox\beamer@tempbox=\hbox{\hbox{\insertsection}}% - \ht\beamer@tempbox=1em - \box\beamer@tempbox - \nointerlineskip - \setbox\beamer@tempbox=\hbox{\hbox{\quad\insertsubsection}}% - \ht\beamer@tempbox=1em - \box\beamer@tempbox - \nointerlineskip - \setbox\beamer@tempbox=\hbox{\hbox{\quad\quad\insertshortframetitle}}% - \ht\beamer@tempbox=1em - \box\beamer@tempbox - \vfil - }\vskip0.5em - } - \nointerlineskip - \insertnote -} - - -\defbeamertemplate{theorem begin}{ams style} -{% - \begin{\inserttheoremblockenv} - {% - \inserttheoremheadfont - \inserttheoremname - \inserttheoremnumber - \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi% - \inserttheorempunctuation - }% -} - -\defbeamertemplate{theorem end}{ams style} -{\end{\inserttheoremblockenv}} - -\defbeamertemplate{theorem begin}{numbered} -{% - \begin{\inserttheoremblockenv} - {% - \inserttheoremname - \inserttheoremnumber - \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi% - }% -} - -\defbeamertemplate{theorem end}{numbered} -{\end{\inserttheoremblockenv}} - -\defbeamertemplate{theorem begin}{normal font} -{ - \normalfont - \begin{\inserttheoremblockenv} - {% - \inserttheoremname - \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi% - }% -} - -\defbeamertemplate{theorem end}{normal font} -{\end{\inserttheoremblockenv}} - -\mode -<all> - -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `bidibeamerbaseauxtemplates.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidibeamerbasetemplates.sty b/Master/texmf-dist/tex/xelatex/bidi/bidibeamerbasetemplates.sty deleted file mode 100644 index 457ab099d4b..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/bidibeamerbasetemplates.sty +++ /dev/null @@ -1,139 +0,0 @@ -%% -%% This is file `bidibeamerbasetemplates.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidibeamerbasetemplates.sty') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% - - -\def\usebeamertemplate{\@ifstar{\beamer@usebeamertemplates}{\beamer@usebeamertemplatedo}} -\def\beamer@usebeamertemplates{\@ifstar{\beamer@usebeamertemplatess}{\beamer@usebeamertemplatedos}} -\def\beamer@usebeamertemplatess{\@ifstar{\beamer@usebeamertemplatedosss}{\beamer@usebeamertemplatedoss}} -\def\beamer@usebeamertemplatedo#1{\csname beamer@@tmpl@#1\endcsname} -\def\beamer@usebeamertemplatedos#1{{{\usebeamerfont{#1}\usebeamercolor[fg]{#1}\csname beamer@@tmpl@#1\endcsname}}} -\def\beamer@usebeamertemplatedoss#1{{{\usebeamerfont*{#1}\usebeamercolor[fg]{#1}\csname beamer@@tmpl@#1\endcsname}}} -\def\beamer@usebeamertemplatedosss#1{{{\usebeamerfont*{#1}\usebeamercolor*[fg]{#1}\csname beamer@@tmpl@#1\endcsname}}} - -\long\def\beamer@@empty{} -\def\expandbeamertemplate#1{\csname beamer@@tmpl@#1\endcsname} -\def\ifbeamertemplateempty#1#2#3{% - \def\beamer@ifdo{#3}% - \expandafter\ifx\csname beamer@@tmpl@#1\endcsname\relax\def\beamer@ifdo{#2}\fi% - \expandafter\ifx\csname beamer@@tmpl@#1\endcsname\beamer@@empty\def\beamer@ifdo{#2}\fi% - \beamer@ifdo} - -\mode<article> -{ - % the following do the same in article mode: - \let\beamer@usebeamertemplatedosss=\beamer@usebeamertemplatedo - \let\beamer@usebeamertemplatedoss=\beamer@usebeamertemplatedo - \let\beamer@usebeamertemplatedos=\beamer@usebeamertemplatedo -} - -\newif\ifbeamer@sbt -\newtoks\beamer@sbttoks - -\newcommand<>\defbeamertemplate{ - \beamer@ifempty{#1} - {\def\beamer@@oar{<presentation>}} - {\def\beamer@@oar{#1}}\beamer@defbeamertemplate} -\def\beamer@defbeamertemplate{\@ifstar{\beamer@sbttrue\beamer@sbtoo}{\beamer@sbtfalse\beamer@sbtoo}} -\def\beamer@sbtoo#1#2{\@ifnextchar[{\beamer@sbto{#1}{#2}}{\beamer@sbto{#1}{#2}[0]}} -\def\beamer@sbto#1#2[#3]{\@ifnextchar[{\beamer@@sbto{#1}{#2}[#3]}{\def\beamer@sbtotemp{}\beamer@@@sbto{#1}{#2}[#3]}} -\long\def\beamer@@sbto#1#2[#3][#4]{\long\def\beamer@sbtotemp{[#4]}\beamer@@@sbto{#1}{#2}[#3]} -\long\def\beamer@@@sbto#1#2[#3]#4{% - \beamer@sbttoks={\beamer@@@@sbto{#1}{#2}[#3]{#4}}% - \@ifnextchar[{\the\beamer@sbttoks}{\the\beamer@sbttoks[action]{}}% -} -\long\def\beamer@@@@sbto#1#2[#3]#4[#5]#6{% - \edef\beamer@@sbtoarg{\expandafter\noexpand\csname beamer@@tmpop@#1@#2\endcsname[#3]}% - \expandafter\expandafter\expandafter\newcommand\expandafter\beamer@@sbtoarg\beamer@sbtotemp{% - \expandafter\long\expandafter\def\csname beamer@@tmpl@#1\endcsname{#4}#6}% - \let\beamer@@next=\beamer@resetsbtoarg% - \expandafter\mode\beamer@@oar{\let\beamer@@next=\relax}% - \beamer@@next% - \ifbeamer@sbt\setbeamertemplate{#1}[#2]\relax\relax\relax\relax\relax\relax\relax\relax\relax\fi% -} -\def\beamer@resetsbtoarg{% - \expandafter\expandafter\expandafter\renewcommand\expandafter\beamer@@sbtoarg\beamer@sbtotemp{} -} - -\def\defbeamertemplatealias#1#2#3{% - \edef\beamer@@temp{\def\expandafter\noexpand\csname beamer@@tmpop@#1@#2\endcsname{\expandafter\noexpand\csname beamer@@tmpop@#1@#3\endcsname}}% - \beamer@@temp} - -\def\defbeamertemplateparent#1{\@ifnextchar[{\beamer@sbtoparo{#1}}{\beamer@sbtoparo{#1}[*]}} -\def\beamer@sbtoparo#1[#2]#3{\@ifnextchar[{\beamer@sbtopar{#1}[#2]{#3}}{\beamer@sbtopar{#1}[#2]{#3}[0]}} -\def\beamer@sbtopar#1[#2]#3[#4]{\@ifnextchar[ - {\beamer@@sbtopar{#1}[#2]{#3}[#4]} - {\def\beamer@sbtotemp{}\beamer@@@sbtopar{#1}[#2]{#3}[#4]}} -\long\def\beamer@@sbtopar#1[#2]#3[#4][#5]{\long\def\beamer@sbtotemp{[#5]}\beamer@@@sbtopar{#1}[#2]{#3}[#4]} -\long\def\beamer@@@sbtopar#1[#2]#3[#4]#5{% - \expandafter\def\csname beamer@@tmpgrp@#1\endcsname{#3}% - \edef\beamer@@sbtoarg{\noexpand\newcommand\expandafter\noexpand\csname beamer@@tmpop@#1@#2\endcsname[#4]}% - \expandafter\beamer@@sbtoarg\beamer@sbtotemp{% - \def\beamer@sbtlist{#3}% - \@for\beamer@templ:=\beamer@sbtlist\do - {\expandafter\expandafter\expandafter\setbeamertemplate - \expandafter\expandafter\expandafter{\expandafter\beamer@templ\expandafter}\expandafter[\beamer@@sbt@option]#5}}} - -\def\setbeamertemplate#1{% - \@ifnextchar[{\beamer@sbtchoose{#1}}{\beamer@sbtexec{#1}}} -\long\def\beamer@sbtexec#1#2{% - \expandafter\long\expandafter\def\csname beamer@@tmpl@#1\endcsname{#2}% - \expandafter\ifx\csname beamer@@tmpgrp@#1\endcsname\relax% - \else% - \expandafter\expandafter\expandafter\def - \expandafter\expandafter\expandafter\beamer@sbt@group - \expandafter\expandafter\expandafter{\csname beamer@@tmpgrp@#1\endcsname}% - \@for\beamer@templ:=\beamer@sbt@group\do{\expandafter\setbeamertemplate\expandafter{\beamer@templ}{#2}}% - \fi% -} -\long\def\beamer@sbtchoose#1[#2]{\def\beamer@@sbt@option{#2}% - \expandafter\ifx\csname beamer@@tmpop@#1@#2\endcsname\relax% - \expandafter\let\expandafter\beamer@@next\csname beamer@@tmpop@#1@*\endcsname% - \else% - \expandafter\let\expandafter\beamer@@next\csname beamer@@tmpop@#1@#2\endcsname% - \fi% - \beamer@@next% -} - -\newcommand\addtobeamertemplate[3]{% - \long\def\beamer@temp{#2}% - \expandafter\def\expandafter\beamer@@temp\expandafter{\expandafter\long\expandafter\def\csname beamer@@tmpl@#1\endcsname}% - \expandafter\expandafter\expandafter\long% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\beamer@@addtemplate% - \expandafter\expandafter\expandafter{\csname beamer@@tmpl@#1\endcsname}% - \expandafter\expandafter\expandafter\beamer@@temp% - \expandafter\expandafter\expandafter{\expandafter\beamer@temp\beamer@@addtemplate#3}% -} - -\RequirePackage{bidibeamerbaseauxtemplates} - -\mode -<all> - -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `bidibeamerbasetemplates.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty b/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty index 9a328e1bb99..7a8dd0b3768 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty +++ b/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty @@ -1,21 +1,16 @@ %% %% This is file `bidicode.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidicode.sty') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bidicode} -\RequirePackage{pstricks} -\RequirePackage{fvrb-ex} +\RequirePackage{xcolor} \RequirePackage{showexpl} \definecolor{Orange}{rgb}{1,.4,.2} \definecolor{myblue}{rgb}{0.02,0.04,0.48} @@ -31,36 +26,78 @@ \lstset{% language=[LaTeX]TEX,% float=hbp,% - basicstyle=\ttfamily\small, % + basicstyle=\ttfamily, % identifierstyle=\color{black}, % - keywordstyle=\color{myred}, % + keywordstyle=\color{mygreen}, % stringstyle=\color{blue}, % commentstyle=\color{blue}, % columns=flexible, % - tabsize=4, % - frame=single, % extendedchars=true, % showspaces=false, % showstringspaces=false, % - numbers=left, - numbersep=12pt, - numberstyle=\tiny, % breaklines=true, % breakautoindent=true, - captionpos=b, - xleftmargin=1em, - breaklines=true, - backgroundcolor=\color{mybackground}, - breakautoindent=true, - rframe={}, - explpreset={numbers=left,numberstyle=\tiny,numbersep=12pt, - xleftmargin=1em,columns=flexible,language=[LaTeX]TEX}, + captionpos=t, + explpreset={columns=flexible,language=[LaTeX]TEX}, morekeywords={setLTR,setLR,setRTL,setRL,LRE,LR,RLE,RL,lr} } -\lstdefinestyle{syntax}{backgroundcolor=\color{blue!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt, - frame=single} -\lstdefinestyle{code}{backgroundcolor=\color{red!20},numbers=left,xleftmargin=0pt,xrightmargin=0pt, - frame=single} +\lstdefinestyle{syntax}{backgroundcolor=\color{blue!20}} +\lstdefinestyle{code}{backgroundcolor=\color{red!20}} +\lst@UserCommand\lstlistlistingname{List of Examples} % \lstlistoflistings +\lst@UserCommand\lstlistingname{Example} + +\def\lst@Init#1{% + \begingroup\if@RTL\@RTLfalse\fi + \ifx\lst@float\relax\else + \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}% + \expandafter\@tempa + \fi + \ifx\lst@multicols\@empty\else + \edef\lst@next{\noexpand\multicols{\lst@multicols}} + \expandafter\lst@next + \fi + \ifhmode\ifinner \lst@boxtrue \fi\fi + \lst@ifbox + \lsthk@BoxUnsafe + \hbox to\z@\bgroup + $\if t\lst@boxpos \vtop + \else \if b\lst@boxpos \vbox + \else \vcenter \fi\fi + \bgroup \par\noindent + \else + \lst@ifdisplaystyle + \lst@EveryDisplay + \par\penalty-50\relax + \vspace\lst@aboveskip + \fi + \fi + \normalbaselines + \abovecaptionskip\lst@abovecaption\relax + \belowcaptionskip\lst@belowcaption\relax + \lst@MakeCaption t% + \lsthk@PreInit \lsthk@Init + \lst@ifdisplaystyle + \global\let\lst@ltxlabel\@empty + \if@inlabel + \lst@ifresetmargins + \leavevmode + \else + \xdef\lst@ltxlabel{\the\everypar}% + \lst@AddTo\lst@ltxlabel{% + \global\let\lst@ltxlabel\@empty + \everypar{\lsthk@EveryLine\lsthk@EveryPar}}% + \fi + \fi + \everypar\expandafter{\lst@ltxlabel + \lsthk@EveryLine\lsthk@EveryPar}% + \else + \everypar{}\let\lst@NewLine\@empty + \fi + \lsthk@InitVars \lsthk@InitVarsBOL + \lst@Let{13}\lst@MProcessListing + \let\lst@Backslash#1% + \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}% + \lst@InitFinalize} \newcommand\Larg [1]{{\normalfont\itshape#1\/}} \newcommand\Larga[1]{$\langle$\Larg{#1}$\rangle$} @@ -70,9 +107,9 @@ \newcommand\LBEG[1]{{\normalfont\ttfamily\bs{}begin\lcb#1\rcb}} \newcommand\LEND[1]{{\normalfont\ttfamily\bs{}end\lcb#1\rcb}} -\DeclareRobustCommand\bs{{\normalfont\ttfamily\textbackslash}} -\DeclareRobustCommand\lcb{{\normalfont\ttfamily\textbraceleft}} -\DeclareRobustCommand\rcb{{\normalfont\ttfamily\textbraceright}} +\DeclareRobustCommand\bs{{\normalfont\ttfamily\symbol{92}}} +\DeclareRobustCommand\lcb{{\normalfont\ttfamily\char`\{}} +\DeclareRobustCommand\rcb{{\normalfont\ttfamily\char`\}}} \DeclareRobustCommand\lsb{{\normalfont\ttfamily[}} \DeclareRobustCommand\rsb{{\normalfont\ttfamily]}} \DeclareRobustCommand\lrb{{\normalfont\ttfamily(}} @@ -80,7 +117,7 @@ \def\Lcs#1{\nxLcs{#1}} \def\LcsStar#1{\nxLcs{#1}\OptArg*{*}} -\def\nxLcs#1{\texttt{\textbackslash#1}} +\def\nxLcs#1{\texttt{\symbol{92}#1}} \def\Coordx#1{$x_{#1}$} \def\Coordy#1{$y_{#1}$} @@ -102,7 +139,7 @@ \newsavebox{\boxdef} \newenvironment{BDef} {\begin{lrbox}\boxdef - \def\arraystretch{1.0} + \def\arraystretch{1.0}\if@RTL\@RTLfalse\fi \begin{tabular}{@{}l@{}l@{}l@{}} } {\end{tabular}\end{lrbox} @@ -113,7 +150,7 @@ \newenvironment{BDef*} {\begin{lrbox}\boxdef - \def\arraystretch{1.0} + \def\arraystretch{1.0}\if@RTL\@RTLfalse\fi \begin{tabular}{@{}l@{}l@{}l@{}} } {\end{tabular}\end{lrbox} @@ -124,7 +161,7 @@ \@beginparpenalty-\@lowpenalty \topsep\BDefaboveskip \fboxsep3pt - \flushleft} + \flushleft\if@RTL\@RTLfalse\fi} {\@endparpenalty\@M \@topsepadd\BDefbelowskip \endflushleft} @@ -133,7 +170,7 @@ \@beginparpenalty\@M \topsep\BDefinlineskip \fboxsep3pt - \flushleft} + \flushleft\if@RTL\@RTLfalse\fi} {\@endparpenalty5000 \endflushleft} @@ -144,13 +181,12 @@ \setlength\BDefbelowskip{6pt} \setlength\BDefinlineskip{6pt} -\def\OptArgs{\psframebox[framesep=2pt,fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[Options]}}\kern1pt} +\def\OptArgs{\colorbox{black!20}{\texttt{[Options]}}\kern1pt} \def\OptArg{\@ifnextchar*\OptArg@i{\OptArg@ii*}} -\def\OptArg@i*#1{\psframebox[framesep=2pt,fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{#1}}\kern1pt} -\def\OptArg@ii*#1{\psframebox[framesep=2pt,fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[#1]}}\kern1pt} - +\def\OptArg@i*#1{\colorbox{black!20}{\texttt{#1}}\kern1pt} +\def\OptArg@ii*#1{\colorbox{black!20}{\texttt{[#1]}}\kern1pt} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty b/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty new file mode 100644 index 00000000000..8479487dc37 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty @@ -0,0 +1,172 @@ +%% +%% This is file `bidiftnxtra.sty', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bidiftnxtra} +\newtoks\bidi@p@ftn +\let\FN@sf@@footnote\footnote +\let\FN@sf@@LTRfootnote\LTRfootnote +\let\FN@sf@@RTLfootnote\RTLfootnote +\def\footnote{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@footnote + \else + \expandafter\FN@sf@gobble@opt + \fi +} +\def\LTRfootnote{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@LTRfootnote + \else + \expandafter\FN@sf@gobble@opt + \fi +} +\def\RTLfootnote{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@RTLfootnote + \else + \expandafter\FN@sf@gobble@opt + \fi +} +\edef\FN@sf@gobble@opt{\noexpand\protect + \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname} +\expandafter\def\csname FN@sf@gobble@opt \endcsname{% + \@ifnextchar[%] + \FN@sf@gobble@twobracket + \@gobble +} +\def\FN@sf@gobble@twobracket[#1]#2{} +\let\FN@sf@@footnotemark\footnotemark +\def\footnotemark{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@footnotemark + \else + \expandafter\FN@sf@gobble@optonly + \fi +} +\edef\FN@sf@gobble@optonly{\noexpand\protect + \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname} +\expandafter\def\csname FN@sf@gobble@optonly \endcsname{% + \@ifnextchar[%] + \FN@sf@gobble@bracket + {}% +} +\def\FN@sf@gobble@bracket[#1]{} +\def\@tabular{\if@RTL\global\@RTLtabtrue\fi + \leavevmode \hbox \bgroup + \let\@footnotetext\bidi@p@ftntext + \let\@LTRfootnotetext\bidi@p@LTRftntext + \let\@RTLfootnotetext\bidi@p@RTLftntext + \if@RTLtab\beginR \fi + $\let\@acol\@tabacol + \let\@classz\@tabclassz + \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray} +\def\endtabular{\crcr\egroup\if@RTLtab\egroup\endR\egroup\fi + \egroup $\if@RTLtab\endR\fi\egroup + \the\bidi@p@ftn + \global\bidi@p@ftn{}% + \global\@RTLtabfalse} +\long\def\bidi@p@ftntext#1{% + \edef\@tempy{\the\bidi@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\bidi@p@ftn\expandafter{\@tempy{#1}}}% +\long\def\bidi@p@LTRftntext#1{% + \edef\@tempyi{\the\bidi@p@ftn\noexpand\LTRfootnotetext[\the\c@footnote]}% + \global\bidi@p@ftn\expandafter{\@tempyi{#1}}}% +\long\def\bidi@p@RTLftntext#1{% + \edef\@tempyii{\the\bidi@p@ftn\noexpand\RTLfootnotetext[\the\c@footnote]}% + \global\bidi@p@ftn\expandafter{\@tempyii{#1}}}% +\def\@xfloat #1[#2]{% + \@nodocument + \def \@captype {#1}% + \def \@fps {#2}% + \@onelevel@sanitize \@fps + \def \reserved@b {!}% + \ifx \reserved@b \@fps + \@fpsadddefault + \else + \ifx \@fps \@empty + \@fpsadddefault + \fi + \fi + \ifhmode + \@bsphack + \@floatpenalty -\@Mii + \else + \@floatpenalty-\@Miii + \fi + \ifinner + \@parmoderr\@floatpenalty\z@ + \else + \@next\@currbox\@freelist + {% + \@tempcnta \sixt@@n + \expandafter \@tfor \expandafter \reserved@a + \expandafter :\expandafter =\@fps + \do + {% + \if \reserved@a h% + \ifodd \@tempcnta + \else + \advance \@tempcnta \@ne + \fi + \fi + \if \reserved@a t% + \@setfpsbit \tw@ + \fi + \if \reserved@a b% + \@setfpsbit 4% + \fi + \if \reserved@a p% + \@setfpsbit 8% + \fi + \if \reserved@a !% + \ifnum \@tempcnta>15 + \advance\@tempcnta -\sixt@@n\relax + \fi + \fi + }% + \@tempcntb \csname ftype@\@captype \endcsname + \multiply \@tempcntb \@xxxii + \advance \@tempcnta \@tempcntb + \global \count\@currbox \@tempcnta + }% + \@fltovf + \fi + \global \setbox\@currbox + \color@vbox + \normalcolor + \vbox \bgroup + \let\@footnotetext\bidi@p@ftntext + \let\@LTRfootnotetext\bidi@p@LTRftntext + \let\@RTLfootnotetext\bidi@p@RTLftntext + \hsize\columnwidth + \@parboxrestore + \@floatboxreset +} +\def \@endfloatbox{% + \par\vskip\z@skip %% \par\vskip\z@ added 15 Dec 87 + \@minipagefalse + \outer@nobreak + \egroup %% end of vbox + \the\bidi@p@ftn + \global\bidi@p@ftn{}% + \color@endbox +} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `bidiftnxtra.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls b/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls deleted file mode 100644 index d751d42dc3b..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls +++ /dev/null @@ -1,275 +0,0 @@ -%% -%% This is file `bidimoderncv.cls', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidimoderncv.cls') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{bidimoderncv} -\newif\if@DEBUG\@DEBUGfalse -\DeclareOption{a4paper}{ - \setlength\paperheight{297mm} - \setlength\paperwidth{210mm}} -\DeclareOption{a5paper}{ - \setlength\paperheight{210mm} - \setlength\paperwidth{148mm}} -\DeclareOption{b5paper}{ - \setlength\paperheight{250mm} - \setlength\paperwidth{176mm}} -\DeclareOption{letterpaper}{ - \setlength\paperheight{11in} - \setlength\paperwidth{8.5in}} -\DeclareOption{legalpaper}{ - \setlength\paperheight{14in} - \setlength\paperwidth{8.5in}} -\DeclareOption{executivepaper}{ - \setlength\paperheight{10.5in} - \setlength\paperwidth{7.25in}} -\DeclareOption{landscape}{ - \setlength\@tempdima{\paperheight} - \setlength\paperheight{\paperwidth} - \setlength\paperwidth{\@tempdima}} -\newcommand\@ptsize{} -\DeclareOption{10pt}{\renewcommand\@ptsize{0}} -\DeclareOption{11pt}{\renewcommand\@ptsize{1}} -\DeclareOption{12pt}{\renewcommand\@ptsize{2}} -\DeclareOption{draft}{\setlength\overfullrule{5pt}} -\DeclareOption{final}{\setlength\overfullrule{0pt}} -\newif\if@colour\@colourtrue -\DeclareOption{nocolour}{\@colourfalse} -\ExecuteOptions{a4paper,11pt,colour,final} -\ProcessOptions\relax -\input{size1\@ptsize.clo} -\RequirePackage{graphicx} -\RequirePackage{pstricks} -\RequirePackage{ifthen} -\RequirePackage{marvosym} -\addtolength{\oddsidemargin}{-54pt} -\addtolength{\textwidth}{109pt} -\addtolength{\topmargin}{-70pt} -\addtolength{\textheight}{122pt} -\addtolength{\marginparsep}{-5pt} -\addtolength{\marginparwidth}{-10pt} -\RequirePackage{url} -\RequirePackage{hyperref} -\hypersetup{% - breaklinks, - baseurl = http://,% - pdfborder = 0 0 0,% - pdfpagemode = UseNone,% - pdfstartpage = 1} -\AtEndOfClass{% - \AtBeginDocument{% - \hypersetup{% - pdfauthor = \@firstname~\@familyname,% - pdftitle = \@title,% - pdfsubject = \@firstname~\@familyname,% - pdfkeywords = \@resumename~\@firstname~\@familyname}}} -\urlstyle{tt} -\RequirePackage{fancyhdr} -\fancypagestyle{plain}{% - \renewcommand{\headrulewidth}{0pt} - \renewcommand{\footrulewidth}{0pt} - \fancyhf{}} -\pagestyle{plain} -\setlength\lineskip{1\p@} -\setlength\normallineskip{1\p@} -\renewcommand\baselinestretch{} -\setlength{\parindent}{0pt} -\setlength{\parskip}{0pt} -\setlength\columnsep{10\p@} -\setlength\columnseprule{0\p@} -\pagestyle{empty} -\pagenumbering{arabic} -\raggedbottom -\onecolumn -\providecommand*{\listitemsymbol}{\textbullet} -\providecommand*{\addresssymbol}{} -\providecommand*{\mobilesymbol}{\Mobilefone} -\providecommand*{\phonesymbol}{\Telefon} -\providecommand*{\faxsymbol}{\FAX} -\providecommand*{\emailsymbol}{\Letter} -\def\firstnamecolour#1{\gdef\@firstnamecolour{\addfontfeature{Color=#1}}} -\def\familynamecolour#1{\gdef\@familynamecolour{\addfontfeature{Color=#1}}} -\def\titlecolour#1{\gdef\@titlecolour{\addfontfeature{Color=#1}}} -\def\addresscolour#1{\gdef\@addresscolour{\addfontfeature{Color=#1}}} -\def\quotecolour#1{\gdef\@quotecolour{\addfontfeature{Color=#1}}} -\def\sectiontitlecolour#1{\gdef\@sectiontitlecolour{\addfontfeature{Color=#1}}} -\def\subsectioncolour#1{\gdef\@subsectioncolour{\addfontfeature{Color=#1}}} -\def\hintcolour#1{\gdef\@hintcolour{\addfontfeature{Color=#1}}} -\providecommand*{\firstnamefont}{} -\providecommand*{\familynamefont}{} -\providecommand*{\titlefont}{} -\providecommand*{\addressfont}{} -\providecommand*{\quotefont}{} -\providecommand*{\sectionfont}{} -\providecommand*{\subsectionfont}{} -\providecommand*{\hintfont}{\small} -\providecommand*{\firstnamestyle}[1]{{\firstnamefont\@firstnamecolour#1}} -\providecommand*{\familynamestyle}[1]{{\familynamefont\@familynamecolour#1}} -\providecommand*{\titlestyle}[1]{{\titlefont\@titlecolour#1}} -\providecommand*{\addresstyle}[1]{{\addressfont\@addresscolour#1}} -\providecommand*{\quotestyle}[1]{{\quotefont\@quotecolour#1}} -\providecommand*{\sectionstyle}[1]{{\sectionfont\@sectiontitlecolour#1}} -\providecommand*{\subsectionstyle}[1]{{\subsectionfont\@subsectioncolour#1}} -\providecommand*{\hintstyle}[1]{{\hintfont\@hintcolour#1}} -\newcommand*{\cvtheme}[2][]{ - \def\@cvtheme{#2} - \def\@cvthemeoptions{#1}} -\cvtheme{bidi-casual} -\AtBeginDocument{\RequirePackage[\@cvthemeoptions]{cvtheme\@cvtheme}} -\newcommand*{\resumename}[1]{\def\@resumename{#1}} -\newcommand*{\firstname}[1]{\def\@firstname{#1}} -\newcommand*{\familyname}[1]{\def\@familyname{#1}} -\renewcommand*{\title}[1]{\def\@title{#1}} -\newcommand*{\address}[1]{\def\@address{#1}} -\newcommand*{\mobile}[1]{\def\@mobile{#1}} -\newcommand*{\phone}[1]{\def\@phone{#1}} -\renewcommand*{\fax}[1]{\def\@fax{#1}} -\newcommand*{\email}[1]{\def\@email{#1}} -\newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}} -\def\@photowidth{0pt} -\newcommand*{\photo}[2][64pt]{\def\@photowidth{#1}\def\@photo{#2}} -\newcommand*{\quote}[1]{\def\@quote{#1}} -\newlength{\quotewidth} -\newlength{\hintscolumnwidth} -\newlength{\separatorcolumnwidth} -\setlength{\separatorcolumnwidth}{0.025\textwidth} -\newlength{\maincolumnwidth} -\newlength{\doubleitemmaincolumnwidth} -\newlength{\listitemsymbolwidth} -\settowidth{\listitemsymbolwidth}{\listitemsymbol{}~} -\newlength{\listitemmaincolumnwidth} -\newlength{\listdoubleitemmaincolumnwidth} -\newcommand*{\recomputethemelengths}{} -\newcommand*{\recomputelengths}{% -\setlength{\quotewidth}{0.65\textwidth}% -\setlength{\maincolumnwidth}{\textwidth}% -\addtolength{\maincolumnwidth}{-\separatorcolumnwidth}% -\addtolength{\maincolumnwidth}{-\hintscolumnwidth}% -\setlength{\listitemmaincolumnwidth}{\maincolumnwidth}% -\addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}% -\setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}% -\addtolength{\doubleitemmaincolumnwidth}{-\hintscolumnwidth}% -\addtolength{\doubleitemmaincolumnwidth}{-\separatorcolumnwidth}% -\setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}% -\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth}% -\addtolength{\listdoubleitemmaincolumnwidth}{-\listitemsymbolwidth}% -\setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}% -\renewcommand{\headwidth}{\textwidth}% -\recomputethemelengths} -\setlength{\hintscolumnwidth}{0.15\textwidth} -\recomputelengths -\title{} -\renewcommand*{\maketitle}{} -\newcommand*{\section}[1]{% -\vspace*{2.5ex \@plus 1ex \@minus .2ex}% - \phantomsection{}% - \addcontentsline{toc}{part}{#1}% - \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\beginL\psline[linecolor=sectionrectanglecolour,linewidth=4pt](-2.5,0)(0,0)\endL}}% - \hspace{\separatorcolumnwidth}% - \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}\\[1ex]} -\newcommand*{\subsection}[1]{% - \cvline[0.45em]{}{\subsectionstyle{#1}}} -\newcommand*{\cvline}[3][.25em]{% - \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% - \raggedleft\hintfont{#2} &{#3}% - \end{tabular}\\[#1]} -\newcommand*{\cvdoubleitem}[4]{% - \cvline{#1}{\begin{minipage}[t]{\doubleitemmaincolumnwidth}#2\end{minipage}% - \hfill% - \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#3}\end{minipage}\hspace*{\separatorcolumnwidth}\begin{minipage}[t]{\doubleitemmaincolumnwidth}#4\end{minipage}}} -\newcommand*{\cvlistitem}[2][\listitemsymbol{}]{% - \cvline[0pt]{}{#1~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}} -\newcommand*{\cvlistdoubleitem}[3][\listitemsymbol{}]{% - \cvline[0pt]{}{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}% - \hfill% - \ifthenelse{\equal{#3}{}}% - {}% - {#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}} -\newcommand*{\cventry}[6]{% - \cvline{#1}{% - {\bfseries#2}% - \ifx#3\else{, {\slshape#3}}\fi% - \ifx#4\else{, #4}\fi% - \ifx#5\else{, #5}\fi% - .% - \ifx#6\else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi - }}% -\newcommand*{\cvlanguage}[3]{% - \cvline{#1}{\begin{minipage}[t]{.225\maincolumnwidth}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.725\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}} -\newcommand*{\cvcomputer}[4]{% - \cvdoubleitem{#1}{\small#2}{#3}{\small#4}} -\newcommand*{\link}[2][]{% - \ifthenelse{\equal{#1}{}}% - {\beginL\href{#2}{\beginR#2\endR}\endL}% - {\beginL\href{#2}{\beginR#1\endR}\endL}} -\newcommand*{\httplink}[2][]{% - \ifthenelse{\equal{#1}{}}% - {\beginL\href{http://#2}{\beginR#2\endR}\endL}% - {\beginL\href{http://#2}{\beginR#1\endR}\endL}} -\newcommand*{\emaillink}[2][]{% - \ifthenelse{\equal{#1}{}}% - {\beginL\href{mailto:#2}{\beginR#2\endR}\endL}% - {\beginL\href{mailto:#2}{\beginR#1\endR}\endL}} -\newif\if@displaypagenumbers\@displaypagenumberstrue -\newcommand*{\nopagenumbers}{\@displaypagenumbersfalse} -\AtBeginDocument{% - \if@displaypagenumbers% - \@ifundefined{r@lastpage}{}{% - \ifthenelse{\pageref{lastpage} > 1}{% - \fancypagestyle{plain}{% - \fancyfoot[r]{\beginL\addressfont\@quotecolour\footnotesize\thepage\beginL/\endL\pageref{lastpage}\endL}}% - \pagestyle{plain}}{}}% - \AtEndDocument{\label{lastpage}}% - \fi} -\newlength{\bibindent} -\setlength{\bibindent}{1.5em} -\newcommand*{\bibliographyitemlabel}{\includegraphics{bibitem.pdf}} -\newenvironment{thebibliography}[1]% - {% - \section{\refname}% - \small% - \begin{list}{\bibliographyitemlabel}% - {% - \setlength{\topsep}{0pt}% - \setlength{\labelwidth}{\hintscolumnwidth}% - \setlength{\labelsep}{\separatorcolumnwidth}% - \leftmargin\labelwidth% - \advance\leftmargin\labelsep% - \@openbib@code% - \usecounter{enumiv}% - \let\p@enumiv\@empty% - \renewcommand\theenumiv{\@arabic\c@enumiv}}% - \sloppy\clubpenalty4000\widowpenalty4000% - }% - {% - \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}% - \end{list}% - } -\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} -\let\@openbib@code\@empty - -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `bidimoderncv.cls'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty b/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty new file mode 100644 index 00000000000..06f83b9c3f4 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty @@ -0,0 +1,221 @@ +%% +%% This is file `bidipoem.sty', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bidipoem}% +[2010/03/01 Environments for typesetting Persian traditional and modern poems] +\def\poemcolsepskip{.1\versewidth plus .1\versewidth minus .05\versewidth} +\def\poemmarginskip{1em plus 1fil minus 1em} +\def\poemextrabaselineskip{0\baselineskip} +\def\poemskip{\medskip} +\def\poemblocksep{\quad$\Box$} +\newdimen\versewidth +\newtoks\bidipoem@p@ftn +\def\poem@verse#1{% +\ifdim\wd#1>\new@poem@width +\xdef\new@poem@width{\the\wd#1}% +\ifdim\new@poem@width>\poem@width +\xdef\poem@width{\new@poem@width}% +\global\let\poem@needrun\relax +\fi +\fi +\hbox to\poem@width{\unhbox#1}% +} +\def\poem@linebegin{\vadjust{}\hskip\@flushglue\hskip\poemmarginskip\relax} +\def\poem@lineend{\nobreak\hskip\poemmarginskip\hskip\@flushglue\vadjust{}} +\def\poem@lineversesep{% +\nobreak +\hskip\z@ plus 1filll% +\penalty600% +\hskip\poemcolsepskip +\hskip\z@ plus -2filll% +\vadjust{}% +\nobreak +\hskip\z@ plus 1filll% +} +\def\poem@lineparsebegin{% +\halign\bgroup +\global\setbox\verse@i=\hbox{\ignorespaces##\unskip}&& +\global\setbox\verse@ii=\hbox{\ignorespaces##\unskip} +\cr +} +\def\poem@lineparseend{% +\crcr\egroup +\vskip-\baselineskip +} +\def\oldpoem@cr{% + \cr\poem@line +} +\newbox\verse@i +\newbox\verse@ii +\newif\ifpoem@started + +\def\poem@line{% +\poem@lineparseend +\ifdim\wd\verse@i>\z@\global\poem@startedtrue\fi +\ifdim\wd\verse@ii>\z@\global\poem@startedtrue\fi +\ifpoem@started + \ifdim\wd\verse@ii>\z@\else + \nopagebreak[3] + \fi + \leavevmode + \poem@linebegin + \poem@verse\verse@i + \ifdim\wd\verse@ii>\z@ + \poem@lineversesep + \poem@verse\verse@ii + \fi + \poem@lineend + \nopagebreak + \endgraf + \vskip\poemextrabaselineskip +\fi +\poem@lineparsebegin +} +\def\@traditionalpoem{% +\stepcounter{poem@no} + \ifnum\max@poem@no<\number\c@poem@no% +\xdef\poem@width{\z@}% + \else +\xdef\poem@width{\poem@prop{poem@width}}% +\fi +\xdef\new@poem@width{\z@}% +\global\versewidth=\poem@width +\poemskip\leavevmode\par +\begingroup + \let\@footnotetext\bidipoem@p@ftntext + \let\@LTRfootnotetext\bidipoem@p@LTRftntext + \let\@RTLfootnotetext\bidipoem@p@RTLftntext +\tabskip=\z@ +\parskip=\z@ +\parindent=\z@ +\parfillskip=\z@ +\rightskip=\z@ +\leftskip=\z@ +\widowpenalty=10000% No break between verses of the same line. +\clubpenalty=10000% Same as above. Not really needed. +\def\newblock{\hfil\poemblocksep\hfil\null}% +\def\par{\oldpoem@cr}% Redefine \par for possible \obeylines +\def\\{\global\poem@startedtrue\oldpoem@cr}% +\global\poem@startedfalse +\csname poem@obeylines\endcsname +\let\poem@obeylines\relax +\poem@lineparsebegin +} +\def\@endtraditionalpoem{% +\cr +\ifdim\wd\verse@i>\z@\poem@line\else\ifdim\wd\verse@ii>\z@\poem@line\else +\noalign{% +\skip0=\poemextrabaselineskip +\vskip-\skip0 +\vskip-\baselineskip +}% +\fi\fi +\poem@lineparseend +\endgroup + \the\bidipoem@p@ftn + \global\bidipoem@p@ftn{}% +\par +\vskip\baselineskip +\poemskip +\ifdim\new@poem@width<\poem@width +\global\let\poem@needrun\relax +\fi + \poem@write@aux{poem@width@\romannumeral\c@poem@no}{\new@poem@width}% +\ifx\AtEndDocument\undefined\poem@finish\fi +} +\long\def\bidipoem@p@ftntext#1{% + \edef\@tempx{\the\bidipoem@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\bidipoem@p@ftn\expandafter{\@tempx{#1}}}% +\long\def\bidipoem@p@LTRftntext#1{% + \edef\@tempxi{\the\bidipoem@p@ftn\noexpand\LTRfootnotetext[\the\c@footnote]}% + \global\bidipoem@p@ftn\expandafter{\@tempxi{#1}}}% +\long\def\bidipoem@p@RTLftntext#1{% + \edef\@tempxii{\the\bidipoem@p@ftn\noexpand\RTLfootnotetext[\the\c@footnote]}% + \global\bidipoem@p@ftn\expandafter{\@tempxii{#1}}}% +\newenvironment{traditionalpoem}{\@traditionalpoem}{\@endtraditionalpoem} +\expandafter\def\csname traditionalpoem*\endcsname{\let\poem@obeylines=\obeylines\traditionalpoem} +\expandafter\def\csname endtraditionalpoem*\endcsname{\endtraditionalpoem} +\def\poem@finish{% +\poem@write@aux{max@poem@no}{\number\c@poem@no}% +\ifx\poem@needrun\relax +\PackageWarning{bidipoem}{Unjustified poem. Rerun XeLaTeX to get poem right}% +\global\let\poem@needrun\undefined +\fi +} +\ifx\AtEndDocument\undefined\else\AtEndDocument\poem@finish\fi +\newcounter{poem@no}\setcounter{poem@no}{\z@} +\ifx\max@poem@no\undefined + \def\max@poem@no{0}% +\fi +\newcommand{\poem@prop}[1]{\@nameuse{#1@\romannumeral\c@poem@no}} +\newcommand{\poem@write@aux}[2]{% + \def\@x{\immediate\write\@auxout{\global\noexpand\@namedef{#1}{#2}}}% + \@x +} +\def\@modernpoem{% +\par +\begingroup + \let\@footnotetext\bidipoem@p@ftntext + \let\@LTRfootnotetext\bidipoem@p@LTRftntext + \let\@RTLfootnotetext\bidipoem@p@RTLftntext +\parskip=\z@ +\parindent=\z@ +\def\[{\@settab\@tabplus\ignorespaces}% +\def\]{\@tabminus\ignorespaces}% +\def\newblock{\poemblocksep}% +\let\newpoem@tabcr\@tabcr +\def\par{% Redefine \par for possible \obeylines + \ifpoem@started\else + \ifdim\wd\@curline>\z@\global\poem@startedtrue\else + \@stopfield + \ifdim\wd\@curfield>\z@\global\poem@startedtrue\fi + \@contfield + \fi + \fi + \ifpoem@started\newpoem@tabcr\fi}% +\def\@tabcr{\global\poem@startedtrue\newpoem@tabcr}% +\global\poem@startedfalse +\csname poem@obeylines\endcsname +\let\poem@obeylines\relax +\begin{tabbing}% +} +\def\@endmodernpoem{% +\global\poem@startedfalse +\ifdim\wd\@curline>\z@\global\poem@startedtrue\else + \@stopfield + \ifdim\wd\@curfield>\z@\global\poem@startedtrue\fi + \@contfield +\fi +\ifpoem@started\else\let\@stopline\@stopfield\fi +\end{tabbing}% +\endgroup + \the\bidipoem@p@ftn + \global\bidipoem@p@ftn{}% +\par +} +\newenvironment{modernpoem}{\@modernpoem}{\@endmodernpoem} +\expandafter\def\csname modernpoem*\endcsname{\let\poem@obeylines=\obeylines\modernpoem} +\expandafter\def\csname endmodernpoem*\endcsname{\endmodernpoem} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `bidipoem.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidipresentation.cls b/Master/texmf-dist/tex/xelatex/bidi/bidipresentation.cls index 8d74f9d211c..e412454de34 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/bidipresentation.cls +++ b/Master/texmf-dist/tex/xelatex/bidi/bidipresentation.cls @@ -1,13 +1,9 @@ %% %% This is file `bidipresentation.cls', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bidipresentation.cls') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% @@ -86,7 +82,7 @@ {\endlist} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/book-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/book-bidi.def index 4cc8f7dfefb..7adaa49516b 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/book-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/book-bidi.def @@ -1,17 +1,108 @@ %% %% This is file `book-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `book-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{book-bidi.def}[2010/03/01 v0.2 adaptations for standard book class] + \if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + \null\vfil + \vskip 60\p@ + \begin{center}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{center}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\else +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \end{center}% + \par + \vskip 1.5em} +\fi \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% @@ -41,7 +132,7 @@ \renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph} \def\@makechapterhead#1{% \vspace*{50\p@}% - {\parindent \z@ \raggedleft \normalfont + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter \huge\bfseries \@chapapp\space \thechapter @@ -55,7 +146,7 @@ }} \def\@makeschapterhead#1{% \vspace*{50\p@}% - {\parindent \z@ \raggedleft + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \interlinepenalty\@M \Huge \bfseries #1\par\nobreak @@ -91,15 +182,15 @@ \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\sl\beginR\rightmark\endR\hfil\thepage}% - \def\@oddhead{\sl\thepage\hfil\beginR\leftmark\endR}% + \def\@evenhead{\sl\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi\hfil\thepage}% + \def\@oddhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\leftmark\if@RTLmain\endR\fi}% \let\@mkboth\markboth \def\chaptermark##1{% \markboth {\MakeUppercase{% - \beginR\@chapapp\ \thechapter.\,\,\endR% + \if@RTLmain\beginR\fi\@chapapp\ \thechapter.\,\,\if@RTLmain\endR\fi% \ifnum \c@secnumdepth >\m@ne \if@mainmatter - \beginR##1\endR + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi \fi \fi }}{}}% @@ -109,22 +200,22 @@ } \def\sectionmark##1{% \markright {\MakeUppercase{% -\beginR\thesection\endR\, +\if@RTLmain\beginR\fi\thesection\if@RTLmain\endR\fi\, \ifnum \c@secnumdepth >\z@ - \beginR##1\endR \ % + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi \ % \fi }}}} \else \def\ps@headings{% \let\@oddfoot\@empty - \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}% + \def\@oddhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi}% \let\@mkboth\markboth \def\chaptermark##1{% \markright {\MakeUppercase{% - \beginR\@chapapp\ \thechapter. \endR % + \if@RTLmain\beginR\fi\@chapapp\ \thechapter. \if@RTLmain\endR\fi % \ifnum \c@secnumdepth >\m@ne \if@mainmatter - \beginR##1\endR + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi \fi \fi }}}} @@ -133,7 +224,7 @@ \pagestyle{headings} \def\@idxitem{\par\hangindent -40\p@} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/bookest-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/bookest-bidi.def index 7b993f8a0bd..9969102163e 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/bookest-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/bookest-bidi.def @@ -1,21 +1,18 @@ %% %% This is file `bookest-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `bookest-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{bookest-bidi.def}[2010/03/01 v0.2 adaptations for bookest class] \AtBeginDocument{ \def\@makechapterhead#1{% \vspace*{20\p@} - {\parindent \z@ \raggedleft \normalfont + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter {\colorA\huge\scshape \@chapapp\space \thechapter} @@ -77,7 +74,7 @@ } \NoHyper %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/breqn-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/breqn-bidi.def new file mode 100644 index 00000000000..d5fd237e0c5 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/breqn-bidi.def @@ -0,0 +1,80 @@ +%% +%% This is file `breqn-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{breqn-bidi.def}[2010/03/01 v0.1 adaptations for breqn package] +\def\@dmath[#1]{\if@RTL\@RTLfalse\fi% + \everydisplay\expandafter{\the\everydisplay \display@setup}% + \if@noskipsec \leavevmode \fi + \if@inlabel \leavevmode \global\@inlabelfalse \fi + \if\eq@group\else\eq@prelim\fi + \setkeys{breqn}{#1}% + \the\eqstyle + \eq@setnumber + \begingroup + \eq@setup@a + \eq@startup +} +\def\@dgroup[#1]{\if@RTL\@RTLfalse\fi% + \let\eq@group\@True \global\let\eq@GRP@first@dmath\@True + \global\GRP@queue\@emptytoks \global\setbox\GRP@box\box\voidb@x + \global\let\GRP@label\@empty + \global\grp@wdL\z@\global\grp@wdR\z@\global\grp@wdT\z@ + \global\grp@linewidth\z@\global\grp@wdNum\z@ + \global\let\grp@eqs@numbered\@False + \global\let\grp@aligned\@True + \global\let\grp@shiftnumber\@False + \eq@prelim + \setkeys{breqn}{#1}% + \if\grp@hasNumber \grp@setnumber \fi +} +\def\@dseries[#1]{\if@RTL\@RTLfalse\fi% + \let\display@setup\dseries@display@setup + % Question: should this be the default for dseries??? + \global\eq@wdCond\z@ + \@dmath[layout={M},#1]% + \mathsurround\z@\@@math \penalty\@Mi + \let\endmath\ends@math + \def\premath{% + \ifdim\lastskip<.3em \unskip + \else\ifnum\lastpenalty<\@M \dquad\fi\fi +}% + \def\postmath{\unpenalty\eq@addpunct \penalty\intermath@penalty \dquad \@ignoretrue}% +\ignorespaces +} +\def\eqnumform#1{\if@Latin\else\beginR\@RTLtrue\fi(#1\@@italiccorr)\if@Latin\else\endR\fi} +\renewenvironment{dsuspend}{% + \global\setbox\EQ@box\vbox\bgroup\if@Latin\else\@RTLtrue\fi \@parboxrestore + \parshape 1 \displayindent \displaywidth\relax + \hsize=\columnwidth \noindent\ignorespaces +}{% + \par\egroup + \global\setbox\GRP@box\vbox{% + \hbox{\copy\EQ@box\vtop{\unvbox\EQ@box}}% + \unvbox\GRP@box + }% + \global\GRP@queue\@xp{\the\GRP@queue + \@elt{\let\eq@isIntertext\@True}% + }% +} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `breqn-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/color-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/color-bidi.def new file mode 100644 index 00000000000..bf1612373c0 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/color-bidi.def @@ -0,0 +1,66 @@ +%% +%% This is file `color-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{color-bidi.def}[2010/03/01 v0.1 adaptations for color package] +\long\def\color@b@x#1#2#3{% + \leavevmode\if@RTL\beginL\fi + \setbox\z@\hbox{\kern\fboxsep{\set@color\if@RTL\beginR\fi#3\if@RTL\endR\fi}\kern\fboxsep}% + \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@ + \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ + {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}% + \box\z@}}\if@RTL\endL\fi} +\DeclareRobustCommand\color{% + \ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\@ifnextchar[\@undeclaredcolor\@declaredcolor} +\def\@declaredcolor#1{% + \@ifundefined{\string\color @#1}% + {\c@lor@error{`#1'}}% + {\expandafter\let\expandafter\current@color + \csname\string\color @#1\endcsname + \set@color}% + \ignorespaces\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi} +\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} +\DeclareRobustCommand\bidicolor{% + \@ifnextchar[\@bidiundeclaredcolor\@bidideclaredcolor} +\def\@bidiundeclaredcolor[#1]#2{% + \@ifundefined{color@#1}% + {\c@lor@error{model `#1'}}% + {\csname color@#1\endcsname\current@color{#2}% + \set@color}% + \ignorespaces} +\def\@bidideclaredcolor#1{% + \@ifundefined{\string\color @#1}% + {\c@lor@error{`#1'}}% + {\expandafter\let\expandafter\current@color + \csname\string\color @#1\endcsname + \set@color}% + \ignorespaces} +\def\color@box#1#2{\color@b@x\relax{\bidicolor#1{#2}}} +\def\color@fbox#1#2#3{% + \color@b@x{\fboxsep\z@\bidicolor#1{#2}\fbox}{\bidicolor#1{#3}}} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `color-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/colortbl-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/colortbl-bidi.def new file mode 100644 index 00000000000..1c60f587434 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/colortbl-bidi.def @@ -0,0 +1,63 @@ +%% +%% This is file `colortbl-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{colortbl-bidi.def}[2010/03/01 v0.1 adaptations for colortbl package] +\def\CT@setup{% + \@tempdimb\col@sep + \@tempdimc\col@sep + \def\CT@color{% + \global\let\CT@do@color\CT@@do@color + \bidicolor}} +\def\@classz{\@classx + \@tempcnta \count@ + \prepnext@tok +\expandafter\CT@extract\the\toks\@tempcnta\columncolor!\@nil + \@addtopreamble{\if@RTL\beginL\fi% + \setbox\z@\hbox\bgroup\bgroup\if@RTL\beginR\fi + \ifcase \@chnum + \hskip\stretch{.5}\kern\z@ + \d@llarbegin + \insert@column + \d@llarend\hskip\stretch{.5}\or + \d@llarbegin \insert@column \d@llarend \hfill \or + \hfill\kern\z@ \d@llarbegin \insert@column \d@llarend \or + $\vcenter + \@startpbox{\@nextchar}\insert@column \@endpbox $\or + \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or + \vbox \@startpbox{\@nextchar}\insert@column \@endpbox + \fi + \if@RTL\endR\fi\egroup\egroup +\begingroup + \CT@setup + \CT@column@color + \CT@row@color + \CT@cell@color + \CT@do@color +\endgroup + \@tempdima\ht\z@ + \advance\@tempdima\minrowclearance + \vrule\@height\@tempdima\@width\z@ + \unhbox\z@\if@RTL\endL\fi}% + \prepnext@tok} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `colortbl-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty b/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty deleted file mode 100644 index f9e1cc3d68b..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty +++ /dev/null @@ -1,118 +0,0 @@ -%% -%% This is file `cvthemebidicasual.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `cvthemebidicasual.sty') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{cvthemebidicasual} -\DeclareOption{blue}{} -\newif\if@colourorange\@colourorangefalse -\DeclareOption{orange}{\@colourorangetrue} -\newif\if@colourgreen\@colourgreenfalse -\DeclareOption{green}{\@colourgreentrue} -\newif\if@colourred\@colourredfalse -\DeclareOption{red}{\@colourredtrue} -\newif\if@colourgrey\@colourgreyfalse -\DeclareOption{grey}{\@colourgreytrue} -\DeclareOption*{ - \PackageWarning{cvthemebidicasual}{Unknown option ‘\CurrentOption’}} -\ExecuteOptions{colour} -\ProcessOptions\relax -\renewcommand*{\listitemsymbol}{\textbullet} -\familynamecolour{808080} -\firstnamecolour{A9A9A9} -\quotecolour{696969} -\addresscolour{696969} -\definecolor{sectionrectanglecolour}{rgb}{0.25,0.50,0.75} -\sectiontitlecolour{1E90FF} -\subsectioncolour{4682B4} -\definecolor{rulecolour}{gray}{0.6} -\definecolor{footersymbolcolour}{rgb}{0.25,0.50,0.75} -\if@colourorange - \definecolor{sectionrectanglecolour}{rgb}{1.00,0.65,0.20} - \sectiontitlecolour{FF8C00} - \subsectioncolour{FF8C00} - \definecolor{footersymbolcolour}{rgb}{0.95,0.55,0.15}\fi -\if@colourgreen - \definecolor{sectionrectanglecolour}{rgb}{0.55,0.85,0.35} - \sectiontitlecolour{008000} - \subsectioncolour{008000} - \definecolor{footersymbolcolour}{rgb}{0.30,0.65,0.15}\fi -\if@colourred - \definecolor{sectionrectanglecolour}{rgb}{1.00,0.30,0.30} - \sectiontitlecolour{FF0000} - \subsectioncolour{FF0000} - \definecolor{footersymbolcolour}{rgb}{0.95,0.20,0.20}\fi -\if@colourgrey - \definecolor{sectionrectanglecolour}{rgb}{0.75,0.75,0.75} - \sectiontitlecolour{808080} - \subsectioncolour{808080} - \definecolor{footersymbolcolour}{rgb}{0.35,0.35,0.35}\fi -\renewcommand*{\ttdefault}{pcr} -\renewcommand*{\firstnamefont}{\fontsize{38}{40}\mdseries\upshape} -\renewcommand*{\familynamefont}{\firstnamefont} -\renewcommand*{\addressfont}{\normalsize\mdseries\slshape} -\renewcommand*{\quotefont}{\large\slshape} -\renewcommand*{\sectionfont}{\Large\mdseries\upshape} -\renewcommand*{\subsectionfont}{\large\mdseries\upshape} -\renewcommand*{\maketitle}{% - {\beginL% - \ifthenelse{\isundefined{\@photo}}% - {}% - {{\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}% - \hfill% - \raggedleft{\beginR\firstnamestyle{\@firstname}~\familynamestyle{\@familyname}\endR}\endL\\[-.35em]}% - {\beginL\psline[linewidth=2pt,linecolor=rulecolour](-11.2,-0.2)(5.6,-0.2)\endL\\[2.5em]}% - \ifthenelse{\isundefined{\@quote}}% - {}% - {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}% - }% -\newif\if@firstfooterelement\@firstfooterelementtrue -\providecommand*{\footersymbol}{} -\renewcommand*{\footersymbol}{% - \if@firstfooterelement% - \else% - { ~~\beginL\psdot[linecolor=footersymbolcolour](0,0.1)\endL~~~}\fi} -\providecommand*{\makefooter}{} -\renewcommand*{\makefooter}{% - \fancypagestyle{plain}{% - \fancyfoot[c]{% - \parbox{0.8\textwidth}{% - \centering% - \addressfont\@addresscolour% - \ifthenelse{\isundefined{\@address}}{}{% - \beginR\addresssymbol~\@address\endR\\% - \@firstfooterelementfalse}% - \beginR\ifthenelse{\isundefined{\@mobile}}{}{\beginR\mobilesymbol~\@mobile\endR\@firstfooterelementfalse}% - \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\beginR\phonesymbol~\@phone\endR\@firstfooterelementfalse}% - \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\beginR\faxsymbol~\@fax\endR\@firstfooterelementfalse}% - \ifthenelse{\isundefined{\@email}}{}{\footersymbol\beginR\emailsymbol~\emaillink{\@email}\endR\@firstfooterelementfalse}% - \ifthenelse{\isundefined{\@extrainfo}}{}{\beginR\footersymbol\@extrainfo\endR\@firstfooterelementfalse}\endR}}% - }% - \pagestyle{plain}} -\AtBeginDocument{\makefooter} - -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `cvthemebidicasual.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty b/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty deleted file mode 100644 index e297fc97e0c..00000000000 --- a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty +++ /dev/null @@ -1,130 +0,0 @@ -%% -%% This is file `cvthemebidiclassic.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `cvthemebidiclassic.sty') -%% -%% __________________________________ -%% Copyright © 2009 Vafa Khalighi -%% -%% License information appended. -%% -%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{cvthemebidiclassic} -\DeclareOption{blue}{} -\newif\if@colourorange\@colourorangefalse -\DeclareOption{orange}{\@colourorangetrue} -\newif\if@colourgreen\@colourgreenfalse -\DeclareOption{green}{\@colourgreentrue} -\newif\if@colourred\@colourredfalse -\DeclareOption{red}{\@colourredtrue} -\newif\if@colourgrey\@colourgreyfalse -\DeclareOption{grey}{\@colourgreytrue} -\DeclareOption*{ - \PackageWarning{cvthemebidiclassic}{Unknown option ‘\CurrentOption’}} -\ExecuteOptions{colour} -\ProcessOptions\relax -\renewcommand*{\listitemsymbol}{\textbullet} -\firstnamecolour{} -\familynamecolour{} -\titlecolour{808080} -\quotecolour{696969} -\addresscolour{696969} -\definecolor{sectionrectanglecolour}{rgb}{0.25,0.50,0.75} -\sectiontitlecolour{1E90FF} -\subsectioncolour{4682B4} -\if@colourorange - \addresscolour{FF8C00} - \definecolor{sectionrectanglecolour}{rgb}{1.00,0.65,0.20} - \sectiontitlecolour{FF8C00} - \subsectioncolour{FF8C00}\fi -\if@colourgreen - \addresscolour{008000} - \definecolor{sectionrectanglecolour}{rgb}{0.55,0.85,0.35} - \sectiontitlecolour{008000} - \subsectioncolour{008000}\fi -\if@colourred - \addresscolour{FF0000} - \definecolor{sectionrectanglecolour}{rgb}{1.00,0.30,0.30} - \sectiontitlecolour{FF0000} - \subsectioncolour{FF0000}\fi -\if@colourgrey - \addresscolour{808080} - \definecolor{sectionrectanglecolour}{rgb}{0.75,0.75,0.75} - \sectiontitlecolour{808080} - \subsectioncolour{808080}\fi -\renewcommand*{\ttdefault}{pcr} -\renewcommand*{\firstnamefont}{\fontsize{34}{36}\mdseries\upshape} -\renewcommand*{\titlefont}{\LARGE\mdseries\slshape} -\renewcommand*{\addressfont}{\normalsize\mdseries\slshape} -\renewcommand*{\familynamefont}{\firstnamefont} -\renewcommand*{\quotefont}{\large\slshape} -\renewcommand*{\sectionfont}{\Large\mdseries\upshape} -\renewcommand*{\subsectionfont}{\large\mdseries\upshape} -\newlength{\maketitlenamemaxwidth} -\setlength{\maketitlenamemaxwidth}{.525\textwidth} -\newlength{\maketitlenamefullwidth} -\settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}} -\newlength{\maketitlenamewidth} -\ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth\setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}\else\setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi -\newlength{\maketitlepicturewidth} -\setlength{\maketitlepicturewidth}{\@photowidth} -\newlength{\maketitledetailswidth} -\renewcommand*{\recomputethemelengths}{% - \setlength{\maketitledetailswidth}{\textwidth}% - \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}% - \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}% - \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}} -\recomputethemelengths -\newif\if@firstdetailselement\@firstdetailselementtrue -\newcommand*{\maketitledetailsnewline}{ - \if@firstdetailselement% - \@firstdetailselementfalse% - \else% - \\[.2em]\fi} -\renewcommand*{\maketitle}{% - % name and title - \begin{minipage}[b]{\maketitlenamewidth}% - \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}% - \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% - \end{minipage}% - % optional data - \begin{minipage}[b]{\maketitledetailswidth}% - \raggedleft\addressfont\@addresscolour% - \ifthenelse{\isundefined{\@address}}{}{% - \maketitledetailsnewline% - \addresssymbol~\\\@address}% - \ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol~\@mobile}% - \ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol~\@phone}% - \ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol~\@fax}% - \ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol~\emaillink{\@email}}% - \ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}% - \end{minipage}% - % optional photo - \ifthenelse{\isundefined{\@photo}}% - {}% - {\hspace*{\separatorcolumnwidth}\framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}}\\[3em]% - % optional quote - \ifthenelse{\isundefined{\@quote}}% - {}% - {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}% - } - -%% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> -%% -%% 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 `cvthemebidiclassic.sty'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-bidi.def index 6238ed1db95..51ec5a6fb31 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-bidi.def @@ -1,21 +1,18 @@ %% %% This is file `draftwatermark-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `draftwatermark-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{draftwatermark-bidi.def}[2010/03/01 v0.2 adaptations for draftwatermark package] \renewcommand\SetWatermarkText[1]{% - \def\sc@wm@text{\if@RTL\beginR\fi#1\if@RTL\endR\fi}} + \def\sc@wm@text{\if@RTLmain\beginR\fi#1\if@RTLmain\endR\fi}} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/extbook-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extbook-bidi.def index daaf4374160..9f25e652eb1 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/extbook-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/extbook-bidi.def @@ -1,17 +1,108 @@ %% %% This is file `extbook-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `extbook-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{extbook-bidi.def}[2010/03/01 v0.1 adaptations for extbook class] + \if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + \null\vfil + \vskip 60\p@ + \begin{center}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{center}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\else +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \end{center}% + \par + \vskip 1.5em} +\fi \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% @@ -40,7 +131,7 @@ \renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph} \def\@makechapterhead#1{% \vspace*{50\p@}% - {\parindent \z@ \raggedleft \normalfont + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter \huge\bfseries \@chapapp\space \thechapter @@ -55,7 +146,7 @@ \def\@makeschapterhead#1{% \vspace*{50\p@}% - {\parindent \z@ \raggedleft + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \interlinepenalty\@M \Huge \bfseries #1\par\nobreak @@ -90,15 +181,15 @@ \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\sl\beginR\rightmark\endR\hfil\thepage}% - \def\@oddhead{\sl\thepage\hfil\beginR\leftmark\endR}% + \def\@evenhead{\sl\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi\hfil\thepage}% + \def\@oddhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\leftmark\if@RTLmain\endR\fi}% \let\@mkboth\markboth \def\chaptermark##1{% \markboth {\MakeUppercase{% - \beginR\@chapapp\ \thechapter.\,\,\endR% + \if@RTLmain\beginR\fi\@chapapp\ \thechapter.\,\,\if@RTLmain\endR\fi% \ifnum \c@secnumdepth >\m@ne \if@mainmatter - \beginR##1\endR + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi \fi \fi }}{}}% @@ -108,22 +199,22 @@ } \def\sectionmark##1{% \markright {\MakeUppercase{% -\beginR\thesection\endR\, +\if@RTLmain\beginR\fi\thesection\if@RTLmain\endR\fi\, \ifnum \c@secnumdepth >\z@ - \beginR##1\endR \ % + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi \ % \fi }}}} \else \def\ps@headings{% \let\@oddfoot\@empty - \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}% + \def\@oddhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi}% \let\@mkboth\markboth \def\chaptermark##1{% \markright {\MakeUppercase{% - \beginR\@chapapp\ \thechapter. \endR % + \if@RTLmain\beginR\fi\@chapapp\ \thechapter. \if@RTLmain\endR\fi % \ifnum \c@secnumdepth >\m@ne \if@mainmatter - \beginR##1\endR + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi \fi \fi }}}} @@ -132,7 +223,7 @@ \pagestyle{headings} \def\@idxitem{\par\hangindent -40\p@} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-bidi.def index 29dcd17192b..a8c0fb77c44 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-bidi.def @@ -1,29 +1,26 @@ %% %% This is file `fancyhdr-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `fancyhdr-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% -\def\@fancyhead#1#2#3#4#5{\beginR#1\endR\hbox to\headwidth{\fancy@reset +\ProvidesFile{fancyhdr-bidi.def}[2010/03/01 v0.2 adaptations for fancyhdr package] +\def\@fancyhead#1#2#3#4#5{\if@RTLmain\beginR\fi#1\if@RTLmain\endR\fi\hbox to\headwidth{\fancy@reset \@fancyvbox\headheight{\hbox - {\rlap{\parbox[b]{\headwidth}{\raggedright\beginR#2\endR}}\hfill - \parbox[b]{\headwidth}{\centering\beginR#3\endR}\hfill - \llap{\parbox[b]{\headwidth}{\raggedleft\beginR#4\endR}}}\headrule}}\beginR#5\endR} -\def\@fancyfoot#1#2#3#4#5{\beginR#1\endR\hbox to\headwidth{\fancy@reset + {\rlap{\parbox[b]{\headwidth}{\if@RTLmain\raggedleft\else\raggedright\fi\if@RTLmain\beginR\fi#2\if@RTLmain\endR\fi}}\hfill + \parbox[b]{\headwidth}{\centering\if@RTLmain\beginR\fi#3\if@RTLmain\endR\fi}\hfill + \llap{\parbox[b]{\headwidth}{\if@RTLmain\raggedright\else\raggedleft\fi\if@RTLmain\beginR\fi#4\if@RTLmain\endR\fi}}}\headrule}}\if@RTLmain\beginR\fi#5\if@RTLmain\endR\fi} +\def\@fancyfoot#1#2#3#4#5{\if@RTLmain\beginR\fi#1\if@RTLmain\endR\fi\hbox to\headwidth{\fancy@reset \@fancyvbox\footskip{\footrule - \hbox{\rlap{\parbox[t]{\headwidth}{\raggedright\beginR#2\endR}}\hfill - \parbox[t]{\headwidth}{\centering\beginR#3\endR}\hfill - \llap{\parbox[t]{\headwidth}{\raggedleft\beginR#4\endR}}}}}\beginR#5\endR} + \hbox{\rlap{\parbox[t]{\headwidth}{\if@RTLmain\raggedleft\else\raggedright\fi\if@RTLmain\beginR\fi#2\if@RTLmain\endR\fi}}\hfill + \parbox[t]{\headwidth}{\centering\if@RTLmain\beginR\fi#3\if@RTLmain\endR\fi}\hfill + \llap{\parbox[t]{\headwidth}{\if@RTLmain\raggedright\else\raggedleft\fi\if@RTLmain\beginR\fi#4\if@RTLmain\endR\fi}}}}}\if@RTLmain\beginR\fi#5\if@RTLmain\endR\fi} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/fleqn-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/fleqn-bidi.def new file mode 100644 index 00000000000..cb0fb2e1765 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/fleqn-bidi.def @@ -0,0 +1,55 @@ +%% +%% This is file `fleqn-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{fleqn-bidi.def}[2010/03/01 v0.1 adaptations for fleqn tag] +\renewcommand\[{\relax + \ifmmode\@badmath + \else + \begin{trivlist}% + \@beginparpenalty\predisplaypenalty + \@endparpenalty\postdisplaypenalty + \item[]\leavevmode + \hb@xt@\linewidth\bgroup \beginL$\m@th\displaystyle %$ + \hskip\mathindent\bgroup + \fi} +\renewcommand\]{\relax + \ifmmode + \egroup $\hfil% $ + \endL\egroup + \end{trivlist}% + \else \@badmath + \fi} +\renewenvironment{equation}% + {\@beginparpenalty\predisplaypenalty + \@endparpenalty\postdisplaypenalty + \refstepcounter{equation}% + \trivlist \item[]\leavevmode + \hb@xt@\linewidth\bgroup\beginL $\m@th% $ + \displaystyle + \hskip\mathindent}% + {$\hfil % $ + \displaywidth\linewidth\hbox{\@eqnnum}% + \endL\egroup + \endtrivlist} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `fleqn-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/flowfram-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/flowfram-bidi.def new file mode 100644 index 00000000000..ba1aca3f617 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/flowfram-bidi.def @@ -0,0 +1,155 @@ +%% +%% This is file `flowfram-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{flowfram-bidi.def}[2010/03/01 v0.1 adaptations for flowfram package] +\def\@outputdblcol{% +\@nxtcol=\c@thisframe +\c@curpg=\c@page +\@g@tnextcol{\@nxtcol}% +\if@ff@nwpg % next flow frame starts on new page + \global\@firstcolumntrue + \@setcolbox\c@thisframe + \if@specialpage + \global\@specialpagefalse + \@nameuse{ps@\@specialstyle}\relax + \fi + \if@twoside + \ifodd\count\z@ + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \else + \let\@thehead\@evenhead + \let\@thefoot\@evenfoot + \fi + \else + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \fi + \@begindvi + \@dodynamicthehead\@dodynamicthefoot + \vbadness=\@M + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% + \@combinedblfloats + \@outputpage +\advance\c@curpg by -\c@page\relax + \whiledo{\c@curpg>0}{\advance\c@curpg by -1\relax + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% +\@outputpage} + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw \if@fcolmade \fi + {\@outputpage \@startdblcolumn }\endgroup + \@resetst@tics + \@resetdyn@mics +\else % still on same page, save contents of box255 + \global\@firstcolumnfalse + \@setcolbox\c@thisframe +\fi +\global\c@thisframe=\@nxtcol +\@setcol{\c@thisframe}\relax +\global\@colht\vsize +} +\def\@outputpage{% +\begingroup + \let\protect\noexpand + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse\@parboxrestore + \shipout\vbox{\set@typeset@protect + \aftergroup + \endgroup + \aftergroup + \set@typeset@protect + \reset@font\normalsize\normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip + \lineskip\z@skip + \lineskiplimit\z@ + \vskip\topmargin\moveright\@themargin + \vbox{% + \vskip\headheight + \vskip\headsep + \box\@outputbox + }}% + \global\let\if@newlist\@@if@newlist + \stepcounter{page}% + \setcounter{displayedframe}{0}% + \let\firstmark\botmark} + + +\newcommand*\bidi@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\bidicolor\ff@txtcol}} + +\newcommand{\bidi@ff@box}[3]{{\@ffbackground{\vbox to#2 +{\hb@xt@ #1{\hss{\bidi@s@tfftextcol #3}\hss}\vss\kern\z@}}}} + + +\renewcommand*{\@docolbox}[1]{% +\edef\ff@frametype{% +\csname @ff@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @ff@col@\romannumeral#1\endcsname}% +\edef\ff@txtcol{\csname @ff@txtcol@\romannumeral#1\endcsname}% +\edef\ff@backcol{\csname @ff@backcol@\romannumeral#1\endcsname}% +\@ff@setoffset{#1}% +\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}{% +\csname\ff@frametype\endcsname}% +}{% +\bidi@ff@box{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}% +}}} +\@ifclassloaded{book}{% +\renewcommand\theequation + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation} +\renewcommand \thefigure + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure} +\renewcommand \thetable + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table} +\renewcommand \thechapter {\@arabic\c@chapter} +\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section} +\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection} +\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph} +\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{} +\@ifclassloaded{report}{% +\renewcommand\theequation + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation} +\renewcommand \thefigure + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure} +\renewcommand \thetable + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table} +\renewcommand \thechapter {\@arabic\c@chapter} +\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section} +\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection} +\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph} +\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `flowfram-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/footnote-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/footnote-bidi.def index 25d2a504f1b..9ce5054aeeb 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/footnote-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/footnote-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `footnote-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `footnote-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{footnote-bidi.def}[2010/03/01 v0.4 footnote macros for bidi package] \if@RTLmain\@RTL@footnotetrue\else\@RTL@footnotefalse\fi \def\bidi@footnote@output{{% \dimen0=\ht\footins @@ -86,15 +83,15 @@ \DeclareRobustCommand\EInLTR{\endinsertLTR} \DeclareRobustCommand\InRTL{\insertRTL} \DeclareRobustCommand\EInRTL{\endinsertRTL} -\def\parse@lsent#1#2\EInLTR#3#4#5\parse@end{\@sentdirfalse +\long\def\parse@lsent#1#2\EInLTR#3#4#5\parse@end{\@sentdirfalse \def\@tempa{\InLTR}\def\@tempb{\EInLTR}\def\@tempc{#1}\def\@tempd{#4}% \ifx\@tempa\@tempc\ifx\@tempb\@tempd\@sentdirtrue\fi\fi} -\def\parse@rsent#1#2\EInRTL#3#4#5\parse@end{\@sentdirfalse +\long\def\parse@rsent#1#2\EInRTL#3#4#5\parse@end{\@sentdirfalse \def\@tempa{\InRTL}\def\@tempb{\EInRTL}\def\@tempc{#1}\def\@tempd{#4}% \ifx\@tempa\@tempc\ifx\@tempb\@tempd\@sentdirtrue\fi\fi} -\def\iflsentence#1{\parse@lsent#1\EInLTR123\parse@end\if@sentdir} -\def\ifrsentence#1{\parse@rsent#1\EInRTL123\parse@end\if@sentdir} -\def\bidi@footnotetext@dir#1{% +\long\def\iflsentence#1{\parse@lsent#1\EInLTR123\parse@end\if@sentdir} +\long\def\ifrsentence#1{\parse@rsent#1\EInRTL123\parse@end\if@sentdir} +\long\def\bidi@footnotetext@dir#1{% \@tempswatrue \ifrsentence{#1}\rtl\@tempswafalse\fi \iflsentence{#1}\ltr\@tempswafalse\fi @@ -122,7 +119,7 @@ \hsize\columnwidth \@parboxrestore \bidi@footnotetext@dir{#1}% \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext - {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\strut}}% + {\rule{\z@}{\footnotesep}\ignorespaces#1\strut}}% \bidi@footnotetext@after \insert\footins{\unvbox\footins}% \endgroup} @@ -150,51 +147,51 @@ \hsize\columnwidth \@parboxrestore \bidi@footnotetext@dir{#1}% \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext - {\rule{\z@}{\footnotesep}\ignorespaces\rmfamily #1\strut}}% + {\rule{\z@}{\footnotesep}\ignorespaces#1\strut}}% \bidi@footnotetext@after \insert\footins{\unvbox\footins}% \endgroup} -\long\def\@mpRTLfootnotetext#1{ - \global\setbox\@mpfootins\vbox{\@RTLtrue +\long\def\@mpRTLfootnotetext#1{% + \global\setbox\@mpfootins\vbox{\@RTLtrue% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel - {\csname p@mpfootnote\endcsname\@thefnmark} + {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup \bidi@footnotetext@dir{#1} - \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi - \@makefntext{ - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox} + \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \color@endgroup}} -\long\def\@mpLTRfootnotetext#1{ - \global\setbox\@mpfootins\vbox{\@RTLfalse +\long\def\@mpLTRfootnotetext#1{% + \global\setbox\@mpfootins\vbox{\@RTLfalse% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel - {\csname p@mpfootnote\endcsname\@thefnmark} + {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup \bidi@footnotetext@dir{#1} - \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi - \@makefntext{ - \rule\z@\footnotesep\ignorespaces\rmfamily#1\@finalstrut\strutbox} + \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \color@endgroup}} -\long\def\@mpfootnotetext#1{ - \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi +\long\def\@mpfootnotetext#1{% + \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel - {\csname p@mpfootnote\endcsname\@thefnmark} + {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup \bidi@footnotetext@dir{#1} - \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi - \@makefntext{ - \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\@finalstrut\strutbox} + \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \color@endgroup}} \def\@iiiminipage#1#2[#3]#4{% \leavevmode @@ -213,8 +210,37 @@ \let\@listdepth\@mplistdepth \@mplistdepth\z@ \@minipagerestore \@setminipage} +\def\LTRthanks#1{\footnotemark + \protected@xdef\@thanks{\@thanks + \protect\LTRfootnotetext[\the\c@footnote]{#1}}% +} +\def\LTRfootnotetext{% + \@ifnextchar [\@xLTRfootnotenext + {\protected@xdef\@thefnmark{\thempfn}% + \@LTRfootnotetext}} +\def\@xLTRfootnotenext[#1]{% + \begingroup + \csname c@\@mpfn\endcsname #1\relax + \unrestored@protected@xdef\@thefnmark{\thempfn}% + \endgroup + \@LTRfootnotetext} +\def\RTLthanks#1{\footnotemark + \protected@xdef\@thanks{\@thanks + \protect\RTLfootnotetext[\the\c@footnote]{#1}}% +} +\let\@thanks\@empty +\def\RTLfootnotetext{% + \@ifnextchar [\@xRTLfootnotenext + {\protected@xdef\@thefnmark{\thempfn}% + \@RTLfootnotetext}} +\def\@xRTLfootnotenext[#1]{% + \begingroup + \csname c@\@mpfn\endcsname #1\relax + \unrestored@protected@xdef\@thefnmark{\thempfn}% + \endgroup + \@RTLfootnotetext} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/graphicx-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/graphicx-bidi.def index c46d3570e88..71b4c27904e 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/graphicx-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/graphicx-bidi.def @@ -1,18 +1,39 @@ %% %% This is file `graphicx-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `graphicx-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% -\def\Gin@ii[#1]#2{% +\ProvidesFile{graphicx-bidi.def}[2010/03/01 v0.3 adaptations for graphicx package] +\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}}% + \Grot@x\z@ + \Grot@y\z@ + \Grot@box\ifmmode\else\if@RTL\endL\fi\fi} +\long\def\Gscale@box#1[#2]#3{\ifmmode\else\if@RTL\beginL\fi\fi% + \leavevmode + \def\Gscale@x{#1}\def\Gscale@y{#2}% + \setbox\z@\hbox{{#3}}% + \setbox\tw@\hbox{\Gscale@start\rlap{\copy\z@}\Gscale@end}% + \ifdim#2\p@<\z@ + \ht\tw@-#2\dp\z@ + \dp\tw@-#2\ht\z@ + \else + \ht\tw@#2\ht\z@ + \dp\tw@#2\dp\z@ + \fi + \ifdim#1\p@<\z@ + \hb@xt@-#1\wd\z@{\kern-#1\wd\z@\box\tw@\hss}% + \else + \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\@tempa{[}\def\@tempb{#2}% \ifx\@tempa\@tempb \def\@tempa{\Gin@iii[#1][}% @@ -20,14 +41,80 @@ \else \begingroup \@tempswafalse - \toks@{\beginL\Ginclude@graphics{#2}\endL}% + \toks@{\Ginclude@graphics{#2}}% \setkeys{Gin}{#1}% \Gin@esetsize \the\toks@ \endgroup - \fi}% + \fi\ifmmode\else\if@RTL\endL\fi\fi} +\def\reflectbox{\bidiGscale@box-1[1]} +\long\def\bidiGscale@box#1[#2]#3{\ifmmode\else\if@RTL\beginL\fi\fi% + \leavevmode + \def\Gscale@x{#1}\def\Gscale@y{#2}% + \setbox\z@\hbox{{\ifmmode\if@RTL\beginR\fi#3\if@RTL\endR\fi\else\if@RTL\beginR\fi#3\if@RTL\endR\fi\fi}}% + \setbox\tw@\hbox{\Gscale@start\rlap{\copy\z@}\Gscale@end}% + \ifdim#2\p@<\z@ + \ht\tw@-#2\dp\z@ + \dp\tw@-#2\ht\z@ + \else + \ht\tw@#2\ht\z@ + \dp\tw@#2\dp\z@ + \fi + \ifdim#1\p@<\z@ + \hb@xt@-#1\wd\z@{\kern-#1\wd\z@\box\tw@\hss}% + \else + \wd\tw@#1\wd\z@ + \box\tw@ + \fi\ifmmode\else\if@RTL\endL\fi\fi} +\def\scalebox#1{% + \@ifnextchar[{\bidiGscale@box{#1}}{\bidiGscale@box{#1}[#1]}} +\def\resizebox{% + \leavevmode + \@ifstar{\bidiGscale@@box\totalheight}{\bidiGscale@@box\height}} +\def\bidiGscale@@box#1#2#3{% + \let\@tempa\Gin@exclamation + \expandafter\def\expandafter\@tempb\expandafter{\string#2}% + \expandafter\def\expandafter\@tempc\expandafter{\string#3}% + \ifx\@tempb\@tempa + \ifx\@tempc\@tempa + \toks@{\mbox}% + \else + \toks@{\bidiGscale@box@dd{#3}#1}% + \fi + \else + \ifx\@tempc\@tempa + \toks@{\bidiGscale@box@dd{#2}\width}% + \else + \toks@{\bidiGscale@box@dddd{#2}\width{#3}#1}% + \fi + \fi + \the\toks@} +\long\def\bidiGscale@box@dd#1#2#3{% + \@begin@tempboxa\hbox{\ifmmode\if@RTL\beginR\fi#3\if@RTL\endR\fi\else\if@RTL\beginR\fi#3\if@RTL\endR\fi\fi}% + \setlength\@tempdima{#1}% + \setlength\@tempdimb{#2}% + \Gscale@div\@tempa\@tempdima\@tempdimb + \Gscale@box\@tempa[\@tempa]{\box\@tempboxa}% + \@end@tempboxa} +\long\def\bidiGscale@box@dddd#1#2#3#4#5{% + \@begin@tempboxa\hbox{\ifmmode\if@RTL\beginR\fi#5\if@RTL\endR\fi\else\if@RTL\beginR\fi#5\if@RTL\endR\fi\fi}% + \setlength\@tempdima{#1}% + \setlength\@tempdimb{#2}% + \Gscale@div\@tempa\@tempdima\@tempdimb + \setlength\@tempdima{#3}% + \setlength\@tempdimb{#4}% + \Gscale@div\@tempb\@tempdima\@tempdimb + \ifGin@iso + \ifdim\@tempa\p@>\@tempb\p@ + \let\@tempa\@tempb + \else + \let\@tempb\@tempa + \fi + \fi + \Gscale@box\@tempa[\@tempb]{\box\@tempboxa}% + \@end@tempboxa} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/hyperref-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/hyperref-bidi.def index 7aaf3e7d94c..a5e3d744ced 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/hyperref-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/hyperref-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `hyperref-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `hyperref-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{hyperref-bidi.def}[2010/03/01 v0.2 adaptations for hyperref package] \AtBeginDocument{% \def\contentsline#1#2#3#4{% \ifx\\#4\\% @@ -228,18 +225,18 @@ \renewcommand\url[1]{\beginL\origin@url{#1}\endL}% \def\hyper@natlinkstart#1{% \Hy@backout{#1}% - \beginL\hyper@linkstart{cite}{cite.#1}% + \beginL\hyper@linkstart{cite}{cite.#1}\if@RTL\beginR\fi% \def\hyper@nat@current{#1}% } \def\hyper@natlinkend{% - \hyper@linkend\endL + \if@RTL\endR\fi\hyper@linkend\endL } \def\hyper@natlinkbreak#1#2{% - \hyper@linkend\endL#1\beginL\hyper@linkstart{cite}{cite.#2}% + \if@RTL\endR\fi\hyper@linkend\endL#1\beginL\hyper@linkstart{cite}{cite.#2}\if@RTL\beginR\fi% }% } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/leqno-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/leqno-bidi.def new file mode 100644 index 00000000000..c7beb947669 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/leqno-bidi.def @@ -0,0 +1,29 @@ +%% +%% This is file `leqno-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{leqno-bidi.def}[2010/03/01 v0.1 adaptations for leqno tag] +\renewcommand\@eqnnum{\hb@xt@.01\p@{}% + \rlap{\normalfont\normalcolor + \hskip -\displaywidth\if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `leqno-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/letter-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/letter-bidi.def new file mode 100644 index 00000000000..8d1a312e2f8 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/letter-bidi.def @@ -0,0 +1,39 @@ +%% +%% This is file `letter-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{letter-bidi.def}[2010/03/01 v0.1 adaptations for standard letter class] +\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress + \thispagestyle{firstpage}% + {\if@RTL\raggedright\else\raggedleft\fi\@date\par}% + \else % home address + \thispagestyle{empty}% + {\if@RTL\raggedright\else\raggedleft\fi\if@RTL\begin{tabular}{r@{}}\else\begin{tabular}{l@{}}\fi\ignorespaces + \fromaddress \\*[2\parskip]% + \@date \end{tabular}\par}% + \fi + \vspace{2\parskip}% + {\if@RTL\raggedleft\else\raggedright\fi \toname \\ \toaddress \par}% + \vspace{2\parskip}% + #1\par\nobreak} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `letter-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/listings-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/listings-bidi.def index 0ce06b2a7e4..1d15dce14b0 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/listings-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/listings-bidi.def @@ -1,27 +1,24 @@ %% %% This is file `listings-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `listings-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{listings-bidi.def}[2010/03/01 v0.2 adaptations for listings package] \long\def\@makecaption#1#2{% \vskip 10pt% \setbox\@tempboxa\hbox{#1: #2}% - \ifdim \wd\@tempboxa >\hsize \beginR#1: #2\par% + \ifdim \wd\@tempboxa >\hsize \if@RTLmain\beginR\fi#1: #2\par% \else \hbox -to\hsize{\beginR\hfil\box\@tempboxa\hfil% -\endR}% +to\hsize{\if@RTLmain\beginR\fi\hfil\box\@tempboxa\hfil% +\if@RTLmain\endR\fi}% \fi} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/loadingorder-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/loadingorder-bidi.def new file mode 100644 index 00000000000..dcfde485603 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/loadingorder-bidi.def @@ -0,0 +1,172 @@ +%% +%% This is file `loadingorder-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{loadingorder-bidi.def}[2010/03/01 v0.1 making sure that bidi is the last package loaded] +\newcommand\bidi@isloaded[2][]{ + \expandafter\ifx\csname if@bidi@#2loaded@\endcsname\relax + \expandafter\newif\csname if@bidi@#2loaded@\endcsname + \fi + \@ifpackageloaded{#2} + {\csname @bidi@#2loaded@true\endcsname #1} + {\csname @bidi@#2loaded@false\endcsname}} +\bidi@isloaded{amsmath} +\bidi@isloaded{amsthm} +\bidi@isloaded{breqn} +\bidi@isloaded{color} +\bidi@isloaded{xcolor} +\bidi@isloaded{colortbl} +\bidi@isloaded{flowfram} +\bidi@isloaded{xltxtra} +\bidi@isloaded{xunicode} +\bidi@isloaded{wrapfig} +\bidi@isloaded{graphicx} +\bidi@isloaded{hyperref} +\bidi@isloaded{fancyhdr} +\bidi@isloaded{draftwatermark} +\bidi@isloaded{pdfpages} +\bidi@isloaded{listings} +\bidi@isloaded{pstricks} +\bidi@isloaded{tikz} +\bidi@isloaded{array} +\bidi@isloaded{stabular} +\bidi@isloaded{supertabular} +\bidi@isloaded{xtab} +\bidi@isloaded{longtable} +\bidi@isloaded{arydshln} +\bidi@isloaded{multicol} +\bidi@isloaded{minitoc} +\bidi@isloaded{ragged2e} +\bidi@isloaded{tabls} +\bidi@isloaded{tabulary} +\bidi@isloaded{tocstyle} +\bidi@isloaded{fontspec} +\bidi@isloaded{arabxetex} +\bidi@isloaded{polyglossia} +\bidi@isloaded{fancyvrb} +\AtBeginDocument{ + \if@bidi@amsmathloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsmath after bidi package. Please load package amsmath before bidi package, and then try to run xelatex on your document again}{}]{amsmath} + \fi% + \if@bidi@amsthmloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsthm after bidi package. Please load package amsthm before bidi package, and then try to run xelatex on your document again}{}]{amsthm} + \fi% + \if@bidi@breqnloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package breqn after bidi package. Please load package breqn before bidi package, and then try to run xelatex on your document again}{}]{breqn} + \fi% + \if@bidi@colorloaded@\else + \@ifpackageloaded{hyperref}{}{% + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package color after bidi package. Please load package color before bidi package, and then try to run xelatex on your document again}{}]{color}} + \fi% + \if@bidi@xcolorloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xcolor after bidi package. Please load package xcolor before bidi package, and then try to run xelatex on your document again}{}]{xcolor} + \fi% + \if@bidi@colortblloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package colortbl after bidi package. Please load package colortbl before bidi package, and then try to run xelatex on your document again}{}]{colortbl} + \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% + \if@bidi@xltxtraloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xltxtra after bidi package. Please load package xltxtra before bidi package, and then try to run xelatex on your document again}{}]{xltxtra} + \fi% + \if@bidi@xunicodeloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xunicode after bidi package. Please load package xunicode before bidi package, and then try to run xelatex on your document again}{}]{xunicode} + \fi% + \if@bidi@wrapfigloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package wrapfig after bidi package. Please load package wrapfig before bidi package, and then try to run xelatex on your document again}{}]{wrapfig} + \fi% + \if@bidi@graphicxloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package graphicx after bidi package. Please load package graphicx before bidi package, and then try to run xelatex on your document again}{}]{graphicx} + \fi% + \if@bidi@hyperrefloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package hyperref after bidi package. Please load package hyperref before bidi package, and then try to run xelatex on your document again}{}]{hyperref} + \fi% + \if@bidi@fancyhdrloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancyhdr after bidi package. Please load package fancyhdr before bidi package, and then try to run xelatex on your document again}{}]{fancyhdr} + \fi% + \if@bidi@draftwatermarkloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package draftwatermark after bidi package. Please load package draftwatermark before bidi package, and then try to run xelatex on your document again}{}]{draftwatermark} + \fi% + \if@bidi@pdfpagesloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pdfpages after bidi package. Please load package pdfpages before bidi package, and then try to run xelatex on your document again}{}]{pdfpages} + \fi% + \if@bidi@listingsloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package listings after bidi package. Please load package listings before bidi package, and then try to run xelatex on your document again}{}]{listings} + \fi% + \if@bidi@pstricksloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pstricks after bidi package. Please load package pstricks before bidi package, and then try to run xelatex on your document again}{}]{pstricks} + \fi% + \if@bidi@tikzloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tikz after bidi package. Please load package tikz before bidi package, and then try to run xelatex on your document again}{}]{tikz} + \fi% + \if@bidi@arrayloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package array after bidi package. Please load package array before bidi package, and then try to run xelatex on your document again}{}]{array} + \fi% + \if@bidi@stabularloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package stabular after bidi package. Please load package stabular before bidi package, and then try to run xelatex on your document again}{}]{stabular} + \fi% + \if@bidi@supertabularloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package supertabular after bidi package. Please load package supertabular before bidi package, and then try to run xelatex on your document again}{}]{supertabular} + \fi% + \if@bidi@xtabloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xtab after bidi package. Please load package xtab before bidi package, and then try to run xelatex on your document again}{}]{xtab} + \fi% + \if@bidi@longtableloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package longtable after bidi package. Please load package longtable before bidi package, and then try to run xelatex on your document again}{}]{longtable} + \fi% + \if@bidi@arydshlnloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package arydshln after bidi package. Please load package arydshln before bidi package, and then try to run xelatex on your document again}{}]{arydshln} + \fi% + \if@bidi@multicolloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package multicol after bidi package. Please load package multicol before bidi package, and then try to run xelatex on your document again}{}]{multicol} + \fi% + \if@bidi@minitocloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package minitoc after bidi package. Please load package minitoc before bidi package, and then try to run xelatex on your document again}{}]{minitoc} + \fi% + \csname if@bidi@ragged2eloaded@\endcsname\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ragged2e after bidi package. Please load package ragged2e before bidi package, and then try to run xelatex on your document again}{}]{ragged2e} + \fi% + \if@bidi@tablsloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tabls after bidi package. Please load package tabls before bidi package, and then try to run xelatex on your document again}{}]{tabls} + \fi% + \if@bidi@tabularyloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tabulary after bidi package. Please load package tabulary before bidi package, and then try to run xelatex on your document again}{}]{tabulary} + \fi% + \if@bidi@tocstyleloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tocstyle after bidi package. Please load package tocstyle before bidi package, and then try to run xelatex on your document again}{}]{tocstyle} + \fi% + \if@bidi@fontspecloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fontspec after bidi package. Please load package fontspec before bidi package, and then try to run xelatex on your document again}{}]{fontspec} + \fi% + \if@bidi@arabxetexloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package arabxetex after bidi package. Please load package arabxetex before bidi package, and then try to run xelatex on your document again}{}]{arabxetex} + \fi% + \if@bidi@polyglossialoaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package polyglossia after bidi package. Please load package polyglossia before bidi package, and then try to run xelatex on your document again}{}]{polyglossia} + \fi% + \if@bidi@fancyvrbloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancyvrb after bidi package. Please load package fancyvrb before bidi package, and then try to run xelatex on your document again}{}]{fancyvrb} + \fi% +} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `loadingorder-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/longtable-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/longtable-bidi.def index 9f674499acf..53d583ecda0 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/longtable-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/longtable-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `longtable-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `longtable-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{longtable-bidi.def}[2010/03/01 v0.2 adaptations for longtable package] \def\LT@makecaption#1#2#3{% \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% \sbox\@tempboxa{\if@RTL\beginR\fi#1{#2: }#3\if@RTL\endR\fi}% @@ -22,107 +19,8 @@ \fi \endgraf\vskip\baselineskip}% \hss}}} - -\def\longtable{\if@RTL\global\@RTLtabtrue\fi% - \par - \ifx\multicols\@undefined - \else - \ifnum\col@number>\@ne - \@twocolumntrue - \fi - \fi - \if@twocolumn - \LT@err{longtable not in 1-column mode}\@ehc - \fi - \begingroup \if@RTLtab\beginR \fi - \@ifnextchar[\LT@array{\LT@array[x]}} - -\def\LT@array[#1]#2{% - \refstepcounter{table}\stepcounter{LT@tables}% - \if l#1% - \LTleft\z@ \LTright\fill - \else\if r#1% - \LTleft\fill \LTright\z@ - \else\if c#1% - \LTleft\fill \LTright\fill - \fi\fi\fi - \let\LT@mcol\multicolumn - \let\LT@@tabarray\@tabarray - \let\LT@@hl\hline - \def\@tabarray{% - \let\hline\LT@@hl - \LT@@tabarray}% - \let\\\LT@tabularcr\let\tabularnewline\\% - \def\newpage{\noalign{\break}}% - \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% - \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% - \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption - \@tempdima\ht\strutbox - \let\@endpbox\LT@endpbox - \ifx\extrarowheight\@undefined - \let\@acol\@tabacol - \let\@classz\@tabclassz \let\@classiv\@tabclassiv - \def\@startpbox{\vtop\LT@startpbox}% - \let\@@startpbox\@startpbox - \let\@@endpbox\@endpbox - \let\LT@LL@FM@cr\@tabularcr - \else - \advance\@tempdima\extrarowheight - \col@sep\tabcolsep - \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr - \fi - \setbox\@arstrutbox\hbox{\vrule - \@height \arraystretch \@tempdima - \@depth \arraystretch \dp \strutbox - \@width \z@}% - \let\@sharp##\let\protect\relax - \begingroup - \@mkpream{#2}% - \xdef\LT@bchunk{% - \global\advance\c@LT@chunks\@ne - \global\LT@rows\z@\setbox\z@\vbox\bgroup - \LT@setprevdepth - \tabskip\LTleft \noexpand\halign to\hsize\bgroup - \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% - \endgroup - \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols - \LT@make@row - \m@th\let\par\@empty - \everycr{}\lineskip\z@\baselineskip\z@ - \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi - \LT@bchunk} - -\def\endlongtable{% - \crcr - \noalign{% - \let\LT@entry\LT@entry@chop - \xdef\LT@save@row{\LT@save@row}}% - \LT@echunk - \LT@start - \unvbox\z@ - \LT@get@widths - \if@filesw - {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% - \gdef\expandafter\noexpand - \csname LT@\romannumeral\c@LT@tables\endcsname - {\LT@save@row}}}% - \fi - \ifx\LT@save@row\LT@@save@row - \else - \LT@warn{Column \@width s have changed\MessageBreak - in table \thetable}% - \LT@final@warn - \fi - \endgraf\penalty -\LT@end@pen - \if@RTLtab\egroup\endR\egroup\fi - \if@RTLtab\endR\fi \endgroup - \global\@mparbottom\z@ - \pagegoal\vsize - \endgraf\penalty\z@\addvspace\LTpost - \ifvoid\footins\else\insert\footins{}\fi - \global\@RTLtabfalse} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/memoir-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/memoir-bidi.def index 16575ba59a5..0f92a04494d 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/memoir-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/memoir-bidi.def @@ -1,17 +1,48 @@ %% %% This is file `memoir-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `memoir-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{memoir-bidi.def}[2010/03/01 v0.2 adaptations for memoir class] +\renewcommand{\keepthetitle}{% + \@bsmtitlempty + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\and\relax + \global\let\andnext\relax + \global\let\@thanks\@empty + \global\let\@title\@empty + \global\let\@author\@empty + \global\let\@date\@empty} +\renewcommand{\maketitle}{\par + \begingroup + \@bsmarkseries + \def\@makefnmark{\@textsuperscript{% + \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}% + \long\def\@makefntext##1{\makethanksmark ##1} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \ifdim\pagetotal>\z@ + \newpage + \fi + \global\@topnum\z@ + \@maketitle + \fi + \thispagestyle{title}\@thanks + \endgroup + \@bscontmark % \setcounter{footnote}{0}% + } \renewcommand*{\memRTLleftskip}{\if@RTL\rightskip\else\leftskip\fi} \renewcommand*{\memRTLrightskip}{\if@RTL\leftskip\else\rightskip\fi} \renewcommand*{\memRTLvleftskip}{\if@RTL\vrightskip\else\vleftskip\fi} @@ -33,7 +64,7 @@ \renewcommand{\thefigure}{\thechapter\@SepMark\@arabic\c@figure} \renewcommand{\thetable}{\thechapter\@SepMark\@arabic\c@table} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/minitoc-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/minitoc-bidi.def index f0166ce23bf..4713bc7d33f 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/minitoc-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/minitoc-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `minitoc-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `minitoc-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{minitoc-bidi.def}[2010/03/01 v0.1 adaptations for minitoc package] \def\@undottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth\relax \else \vskip \z@ plus.2\p@ @@ -50,7 +47,7 @@ \par}% \fi} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/multicol-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/multicol-bidi.def new file mode 100644 index 00000000000..2d0545b0b53 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/multicol-bidi.def @@ -0,0 +1,171 @@ +%% +%% This is file `multicol-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{multicol-bidi.def}[2010/03/01 v0.1 adaptations for multicol package] +\def\revprocess@cols#1#2{\count@\doublecol@number\relax +\advance\count@ by -2 + \loop #2% + \ifnum\count@>#1\relax + \advance\count@-\tw@ + \repeat} +\def\page@sofar{% + \process@cols\mult@rightbox + {\ifvoid\count@ + \setbox\count@\hbox to\hsize{}% + \else + \wd\count@\hsize + \fi}% + \count@\col@number \advance\count@\m@ne + \mult@info\z@ + {Column spec: \the\full@width\space = indent + + columns + sep =\MessageBreak + \the\multicol@leftmargin\space + + \the\col@number\space + x \the\hsize\space + + \the\count@\space + x \the\columnsep + }% +\ifvmode\else\errmessage{Multicol Error}\fi + \nointerlineskip + \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@ + \moveright\multicol@leftmargin + \if@RTL\hbox to\full@width{% + \ifdim\dp\mult@rightbox>\dimen\tw@ + \global\dimen\tw@\dp\mult@rightbox \fi + \box\mult@rightbox + \llap{\phantom p}% + \revprocess@cols\mult@gfirstbox{% + \ifdim\dp\count@>\dimen\tw@ + \global\dimen\tw@\dp\count@ \fi + \hss{\columnseprulecolor\vrule + \@width\columnseprule}\hss\box\count@}% +}\else% + \hbox to\full@width{% + \process@cols\mult@gfirstbox{% + \ifdim\dp\count@>\dimen\tw@ + \global\dimen\tw@\dp\count@ \fi + \box\count@ + \hss{\columnseprulecolor\vrule + \@width\columnseprule}\hss}% + \ifdim\dp\mult@rightbox>\dimen\tw@ + \global\dimen\tw@\dp\mult@rightbox \fi + \box\mult@rightbox + \rlap{\phantom p}% + }\fi% + \kern-\dimen\tw@ + \ifdim\dimen\tw@ = \mc@gridwarn + \PackageWarning{multicol}% + {Very deep columns!\MessageBreak + Grid alignment might be broken}% + \fi +} +\def\right@footnote{% + \hbox to \textwidth + {\beginR \vbox{\kern -3\p@ + \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}} +\long\def\@footnotetext#1{% + \begingroup + \setbox\footins + \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\textwidth \@parboxrestore + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\strut}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@RTLfootnotetext#1{% + \begingroup + \setbox\footins + \vbox{\@RTLtrue\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\textwidth \@parboxrestore + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@LTRfootnotetext#1{% + \begingroup + \setbox\footins + \vbox{\@RTLfalse\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\textwidth \@parboxrestore + \bidi@footnotetext@dir{#1}% + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces\rmfamily #1\strut}}% + \bidi@footnotetext@after + \insert\footins{\unvbox\footins}% + \endgroup} +\long\def\@mpRTLfootnotetext#1{% + \global\setbox\@mpfootins\vbox{\@RTLtrue% + \unvbox\@mpfootins + \reset@font\footnotesize + \hsize\textwidth + \@parboxrestore + \protected@edef\@currentlabel + {\csname p@mpfootnote\endcsname\@thefnmark}% + \color@begingroup + \bidi@footnotetext@dir{#1} + \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} +\long\def\@mpLTRfootnotetext#1{% + \global\setbox\@mpfootins\vbox{\@RTLfalse% + \unvbox\@mpfootins + \reset@font\footnotesize + \hsize\textwidth + \@parboxrestore + \protected@edef\@currentlabel + {\csname p@mpfootnote\endcsname\@thefnmark}% + \color@begingroup + \bidi@footnotetext@dir{#1} + \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi + \@makefntext{% + \rule\z@\footnotesep\ignorespaces\rmfamily#1\@finalstrut\strutbox}% + \color@endgroup}} +\long\def\@mpfootnotetext#1{% + \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi% + \unvbox\@mpfootins + \reset@font\footnotesize + \hsize\textwidth + \@parboxrestore + \protected@edef\@currentlabel + {\csname p@mpfootnote\endcsname\@thefnmark}% + \color@begingroup + \bidi@footnotetext@dir{#1} + \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi + \@makefntext{% + \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\@finalstrut\strutbox}% + \color@endgroup}} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `multicol-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/pdfpages-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pdfpages-bidi.def index ff5a928b915..ed17f193b6a 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/pdfpages-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/pdfpages-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `pdfpages-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `pdfpages-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{pdfpages-bidi.def}[2010/03/01 v0.1 adaptations for pdfpages package] \renewcommand*{\includepdf}[2][]{% \begingroup \@RTLfalse @@ -60,7 +57,7 @@ \AM@ClearShipoutPicture } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/pstricks-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pstricks-bidi.def index 1b74ae9d0ca..96e9fce73dd 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/pstricks-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/pstricks-bidi.def @@ -1,20 +1,17 @@ %% %% This is file `pstricks-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `pstricks-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{pstricks-bidi.def}[2010/03/01 v0.1 adaptations for pstricks package] \def\pspicture{\begingroup\@RTLfalse\pst@ifstar\pst@picture}% %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/ragged2e-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/ragged2e-bidi.def index 48feca2db03..5784b0222d1 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/ragged2e-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/ragged2e-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `ragged2e-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `ragged2e-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{ragged2e-bidi.def}[2010/03/01 v0.2 adaptations for ragged2e package] \renewcommand{\Centering}{% \ifx\\\@raggedtwoe@savedcr \let\\\@centercr @@ -98,7 +95,7 @@ \def\RaggedLeft{\if@RTL\origin@RaggedRight\else\origin@RaggedLeft\fi} \def\RaggedRight{\if@RTL\origin@RaggedLeft\else\origin@RaggedRight\fi} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/rapport3-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/rapport3-bidi.def index cde23698756..24281980dfc 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/rapport3-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/rapport3-bidi.def @@ -1,17 +1,151 @@ %% %% This is file `rapport3-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `rapport3-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{rapport3-bidi.def}[2010/03/01 v0.1 adaptations for rapport3 class] +\if@titlepage +\renewcommand*\TitleFont{\rmfamily} +\renewcommand*\maketitle{% + \begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \if@compatibility\setcounter{page}{0}\fi + \null\vfil + \vskip 60\p@ + \begin{center}% + \TitleFont + {\LARGE \def\\{\penalty -\@M} + \if@allcaps + \expandafter\uc@nothanks\@title\thanks\relax + \else + \@title + \fi\par}% + \vskip 3em% + {\large + \lineskip .75em \parindent\z@ + \begin{tabular}[t]{c}% + \if@allcaps + \expandafter\uc@authornothanks\@author\and\relax + \else + \@author + \fi + \end{tabular}\par}% + \vskip 1.5em% + {\large + \if@allcaps + \uppercase\expandafter{\@date}% + \else + \@date + \fi\par}% + \end{center}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@title\@empty + \global\let\@date\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\def\uc@nothanks#1\thanks{\uppercase{#1}\futurelet\@tempa\uc@tx} +\def\uc@authornothanks#1\and{\uc@nothanks#1\thanks\relax + \futurelet\@tempa\uc@ax} +\def\uc@ax{% + \ifx\@tempa\relax + \else + \\ \andname \\ \expandafter\uc@authornothanks + \fi} +\def\uc@tx{\ifx\@tempa\relax + \else \expandafter\uc@ty \fi} +\def\uc@ty#1{\thanks{#1}\uc@nothanks} +\else +\renewcommand*\maketitle{\par + \begingroup + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{% + \@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext{\@xmakefntext{% + \@textsuperscript{\normalfont\@thefnmark}}}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@title\@empty + \global\let\@date\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +\def\@maketitle{% + \newpage + \null + \vskip 2em% +\if@titlecentered + \begin{center}% + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + {\LARGE \TitleFont \@title \par}% + \vskip 1.5em% + {\large \TitleFont + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \TitleFont \@date}% + \end{center}% + \else + {\LARGE \TitleFont \head@style \@title \par} \vskip 1.5em + {\large \TitleFont \lineskip .5em \tabcolsep\z@ + \def\and{%%% \begin{tabular} has already started + \end{tabular}\hskip 1em plus .17fil + \begin{tabular}[t]{l}}%% \end{tabular} will come + \begin{tabular}[t]{l}\@author\end{tabular}\par} + \vskip 1em {\large \TitleFont \@date} + \fi + \par + \vskip 1.5em} +\fi \renewcommand*\@regtocline[3]{% \ifnum #1>\c@tocdepth \else @@ -103,7 +237,7 @@ \renewcommand*\theequation{% \ifnum \c@chapter>\z@ \thechapter\@SepMark\fi\@arabic\c@equation} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/refrep-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/refrep-bidi.def index 609a6a46819..8446921e028 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/refrep-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/refrep-bidi.def @@ -1,17 +1,121 @@ %% %% This is file `refrep-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `refrep-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{refrep-bidi.def}[2010/03/01 v0.1 adaptations for refrep class] +\if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark% + {\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em + \parshape \@ne 1em \@tempdima}% + \par\parindent 1em \noindent + \hb@xt@\z@{\hss\@textsuperscript{\normalfont\@thefnmark}\,}##1} + \null\vfil + \vskip 60\p@ + \begin{center}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{center}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +\else + \renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark% + {\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em + \parshape \@ne 1em \@tempdima}% + \par\parindent 1em \noindent + \hb@xt@\z@{\hss\@textsuperscript{\normalfont\@thefnmark}\,}##1} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{empty}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} + \def\@maketitle{% + \newpage + \null + \longthickrule\vskip1.5em% + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + {\secshape \parskip\z@ \parindent\z@ + \Large\bfseries \@title \par}% + \vskip1.5em\longthickrule\vskip1.5em% + {\normalsize + \lineskip .5em% + \begin{flushright}% + {\slshape\@author\par} + \vskip 1em% + {\@date}% + \end{flushright}\par}% + \vskip 1.5em} +\fi \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% @@ -38,7 +142,7 @@ \renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/report-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/report-bidi.def index f833c54b770..9f02d7c0b05 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/report-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/report-bidi.def @@ -1,17 +1,108 @@ %% %% This is file `report-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `report-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{report-bidi.def}[2010/03/01 v0.2 adaptations for standard report class] + \if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + \null\vfil + \vskip 60\p@ + \begin{center}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{center}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\else +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\LTRthanks\relax + \global\let\RTLthanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + \let \LTRfootnote \LTRthanks + \let \RTLfootnote \RTLthanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \end{center}% + \par + \vskip 1.5em} +\fi \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% @@ -41,7 +132,7 @@ \renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph} \def\@makechapterhead#1{% \vspace*{50\p@}% - {\parindent \z@ \raggedleft \normalfont + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \ifnum \c@secnumdepth >\m@ne \huge\bfseries \@chapapp\space \thechapter \par\nobreak @@ -53,7 +144,7 @@ }} \def\@makeschapterhead#1{% \vspace*{50\p@}% - {\parindent \z@ \raggedleft + {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont \interlinepenalty\@M \Huge \bfseries #1\par\nobreak @@ -81,44 +172,44 @@ \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}% - \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}% + \def\@evenhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\leftmark\if@RTLmain\endR\fi}% + \def\@oddhead{\sl\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi\hfil\thepage}% \let\@mkboth\markboth \def\chaptermark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne - \beginR\@chapapp\ \thechapter. \ \endR% + \if@RTLmain\beginR\fi\@chapapp\ \thechapter. \ \if@RTLmain\endR\fi% \fi - \beginR##1\endR}}{}}% + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi}}{}}% \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ - \beginR\thesection. \ \endR% + \if@RTLmain\beginR\fi\thesection. \ \if@RTLmain\endR\fi% \fi - \beginR##1\endR}}}} + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi}}}} \else \def\ps@headings{% \let\@oddfoot\@empty - \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}% + \def\@oddhead{\sl\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi\hfil\thepage}% \let\@mkboth\markboth \def\chaptermark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne - \beginR\@chapapp\ \thechapter. \ \endR% + \if@RTLmain\beginR\fi\@chapapp\ \thechapter. \ \if@RTLmain\endR\fi% \fi - \beginR##1\endR}}}} + \if@RTLmain\beginR\fi##1\if@RTLmain\endR\fi}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}% - \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}% + \def\@evenhead{\sl\thepage\hfil\if@RTLmain\beginR\fi\leftmark\if@RTLmain\endR\fi}% + \def\@oddhead{\sl\if@RTLmain\beginR\fi\rightmark\if@RTLmain\endR\fi\hfil\thepage}% \let\@mkboth\@gobbletwo \let\chaptermark\@gobble \let\sectionmark\@gobble } \pagestyle{plain} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrartcl-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrartcl-bidi.def index 92e79307189..63091c1a5ce 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/scrartcl-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/scrartcl-bidi.def @@ -1,17 +1,179 @@ %% %% This is file `scrartcl-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `scrartcl-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{scrartcl-bidi.def}[2010/03/01 v0.1 adaptations for scrartcl class] +\renewcommand*\maketitle[1][1]{% + \if@titlepage + \begin{titlepage} + \setcounter{page}{% + #1% + }% + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}% + \ifx\@extratitle\@empty \else + \noindent\@extratitle\next@tpage\cleardoubleemptypage + \thispagestyle{empty}% + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ifx\@titlehead\@empty \else + \begin{minipage}[t]{\textwidth}% + \@titlehead + \end{minipage}\par + \fi + \null\vfill + \begin{center} + \ifx\@subject\@empty \else + {\subject@font \@subject \par}% + \vskip 3em + \fi + {\titlefont\huge \@title\par}% + \vskip 1em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \vskip 2em + {\Large \lineskip 0.75em + \begin{tabular}[t]{c} + \@author + \end{tabular}\par + }% + \vskip 1.5em + {\Large \@date \par}% + \vskip \z@ \@plus3fill + {\Large \@publishers \par}% + \vskip 3em + \end{center}\par + \@thanks + \vfill\null + \if@twoside\next@tpage + \begin{minipage}[t]{\textwidth} + \@uppertitleback + \end{minipage}\par + \vfill + \begin{minipage}[b]{\textwidth} + \@lowertitleback + \end{minipage} + \fi + \ifx\@dedication\@empty \else + \next@tpage\null\vfill + {\centering \Large \@dedication \par}% + \vskip \z@ \@plus3fill + \if@twoside \next@tpage\cleardoubleemptypage \fi + \fi + \end{titlepage} + \else + \par + \@tempcnta=% + #1% + \relax\ifnum\@tempcnta=1\else + \ClassWarning{\KOMAClassName}{% + Optional argument of \string\maketitle\space ignored + at\MessageBreak + notitlepage-mode% + }% + \fi + \begingroup + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ + \@maketitle + \fi + \thispagestyle{\titlepagestyle}\@thanks + \endgroup + \fi + \setcounter{footnote}{0}% + \let\thanks\relax + \let\LTRthanks\relax + \let\RTLthanks\relax + \let\maketitle\relax + \let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@subtitle\@empty + \global\let\@extratitle\@empty + \global\let\@titlehead\@empty + \global\let\@subject\@empty + \global\let\@publishers\@empty + \global\let\@uppertitleback\@empty + \global\let\@lowertitleback\@empty + \global\let\@dedication\@empty + \global\let\author\relax + \global\let\title\relax + \global\let\extratitle\relax + \global\let\titlehead\relax + \global\let\subject\relax + \global\let\publishers\relax + \global\let\uppertitleback\relax + \global\let\lowertitleback\relax + \global\let\dedication\relax + \global\let\date\relax + \global\let\and\relax +}% +\renewcommand*{\@maketitle}{% + \clearpage + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \ifx\@extratitle\@empty \else + \noindent\@extratitle \next@tpage \if@twoside \null\next@tpage \fi + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ifx\@titlehead\@empty \else + \begin{minipage}[t]{\textwidth} + \@titlehead + \end{minipage}\par + \fi + \null + \vskip 2em% + \begin{center}% + \ifx\@subject\@empty \else + {\subject@font \@subject \par} + \vskip 1.5em + \fi + {\titlefont\huge \@title \par}% + \vskip .5em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \vskip 1em + {\Large + \lineskip .5em% + \begin{tabular}[t]{c} + \@author + \end{tabular}\par + }% + \vskip 1em% + {\Large \@date \par}% + \vskip \z@ \@plus 1em + {\Large \@publishers \par} + \ifx\@dedication\@empty \else + \vskip 2em + {\Large \@dedication \par} + \fi + \end{center}% + \par + \vskip 2em +}% \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >\m@ne\relax \addpenalty{\@secpenalty}% @@ -86,7 +248,7 @@ \theparagraph\@SepMark\@arabic\c@subparagraph } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrbook-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrbook-bidi.def index 740469b9f3c..037d59efc81 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/scrbook-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/scrbook-bidi.def @@ -1,17 +1,179 @@ %% %% This is file `scrbook-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `scrbook-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{scrbook-bidi.def}[2010/03/01 v0.1 adaptations for scrbook class] +\renewcommand*\maketitle[1][1]{% + \if@titlepage + \begin{titlepage} + \setcounter{page}{% + #1% + }% + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}% + \ifx\@extratitle\@empty \else + \noindent\@extratitle\next@tpage\cleardoubleemptypage + \thispagestyle{empty}% + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ifx\@titlehead\@empty \else + \begin{minipage}[t]{\textwidth}% + \@titlehead + \end{minipage}\par + \fi + \null\vfill + \begin{center} + \ifx\@subject\@empty \else + {\subject@font \@subject \par}% + \vskip 3em + \fi + {\titlefont\huge \@title\par}% + \vskip 1em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \vskip 2em + {\Large \lineskip 0.75em + \begin{tabular}[t]{c} + \@author + \end{tabular}\par + }% + \vskip 1.5em + {\Large \@date \par}% + \vskip \z@ \@plus3fill + {\Large \@publishers \par}% + \vskip 3em + \end{center}\par + \@thanks + \vfill\null + \if@twoside\next@tpage + \begin{minipage}[t]{\textwidth} + \@uppertitleback + \end{minipage}\par + \vfill + \begin{minipage}[b]{\textwidth} + \@lowertitleback + \end{minipage} + \fi + \ifx\@dedication\@empty \else + \next@tpage\null\vfill + {\centering \Large \@dedication \par}% + \vskip \z@ \@plus3fill + \if@twoside \next@tpage\cleardoubleemptypage \fi + \fi + \end{titlepage} + \else + \par + \@tempcnta=% + #1% + \relax\ifnum\@tempcnta=1\else + \ClassWarning{\KOMAClassName}{% + Optional argument of \string\maketitle\space ignored + at\MessageBreak + notitlepage-mode% + }% + \fi + \begingroup + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ + \@maketitle + \fi + \thispagestyle{\titlepagestyle}\@thanks + \endgroup + \fi + \setcounter{footnote}{0}% + \let\thanks\relax + \let\LTRthanks\relax + \let\RTLthanks\relax + \let\maketitle\relax + \let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@subtitle\@empty + \global\let\@extratitle\@empty + \global\let\@titlehead\@empty + \global\let\@subject\@empty + \global\let\@publishers\@empty + \global\let\@uppertitleback\@empty + \global\let\@lowertitleback\@empty + \global\let\@dedication\@empty + \global\let\author\relax + \global\let\title\relax + \global\let\extratitle\relax + \global\let\titlehead\relax + \global\let\subject\relax + \global\let\publishers\relax + \global\let\uppertitleback\relax + \global\let\lowertitleback\relax + \global\let\dedication\relax + \global\let\date\relax + \global\let\and\relax +}% +\renewcommand*{\@maketitle}{% + \clearpage + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \ifx\@extratitle\@empty \else + \noindent\@extratitle \next@tpage \if@twoside \null\next@tpage \fi + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ifx\@titlehead\@empty \else + \begin{minipage}[t]{\textwidth} + \@titlehead + \end{minipage}\par + \fi + \null + \vskip 2em% + \begin{center}% + \ifx\@subject\@empty \else + {\subject@font \@subject \par} + \vskip 1.5em + \fi + {\titlefont\huge \@title \par}% + \vskip .5em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \vskip 1em + {\Large + \lineskip .5em% + \begin{tabular}[t]{c} + \@author + \end{tabular}\par + }% + \vskip 1em% + {\Large \@date \par}% + \vskip \z@ \@plus 1em + {\Large \@publishers \par} + \ifx\@dedication\@empty \else + \vskip 2em + {\Large \@dedication \par} + \fi + \end{center}% + \par + \vskip 2em +}% \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% @@ -142,7 +304,7 @@ \@arabic\c@equation } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrreprt-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrreprt-bidi.def index 338d43229d2..8893e6eee9a 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/scrreprt-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/scrreprt-bidi.def @@ -1,17 +1,179 @@ %% %% This is file `scrreprt-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `scrreprt-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{scrreprt-bidi.def}[2010/03/01 v0.1 adaptations for scrreprt class] +\renewcommand*\maketitle[1][1]{% + \if@titlepage + \begin{titlepage} + \setcounter{page}{% + #1% + }% + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}% + \ifx\@extratitle\@empty \else + \noindent\@extratitle\next@tpage\cleardoubleemptypage + \thispagestyle{empty}% + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ifx\@titlehead\@empty \else + \begin{minipage}[t]{\textwidth}% + \@titlehead + \end{minipage}\par + \fi + \null\vfill + \begin{center} + \ifx\@subject\@empty \else + {\subject@font \@subject \par}% + \vskip 3em + \fi + {\titlefont\huge \@title\par}% + \vskip 1em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \vskip 2em + {\Large \lineskip 0.75em + \begin{tabular}[t]{c} + \@author + \end{tabular}\par + }% + \vskip 1.5em + {\Large \@date \par}% + \vskip \z@ \@plus3fill + {\Large \@publishers \par}% + \vskip 3em + \end{center}\par + \@thanks + \vfill\null + \if@twoside\next@tpage + \begin{minipage}[t]{\textwidth} + \@uppertitleback + \end{minipage}\par + \vfill + \begin{minipage}[b]{\textwidth} + \@lowertitleback + \end{minipage} + \fi + \ifx\@dedication\@empty \else + \next@tpage\null\vfill + {\centering \Large \@dedication \par}% + \vskip \z@ \@plus3fill + \if@twoside \next@tpage\cleardoubleemptypage \fi + \fi + \end{titlepage} + \else + \par + \@tempcnta=% + #1% + \relax\ifnum\@tempcnta=1\else + \ClassWarning{\KOMAClassName}{% + Optional argument of \string\maketitle\space ignored + at\MessageBreak + notitlepage-mode% + }% + \fi + \begingroup + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ + \@maketitle + \fi + \thispagestyle{\titlepagestyle}\@thanks + \endgroup + \fi + \setcounter{footnote}{0}% + \let\thanks\relax + \let\LTRthanks\relax + \let\RTLthanks\relax + \let\maketitle\relax + \let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@subtitle\@empty + \global\let\@extratitle\@empty + \global\let\@titlehead\@empty + \global\let\@subject\@empty + \global\let\@publishers\@empty + \global\let\@uppertitleback\@empty + \global\let\@lowertitleback\@empty + \global\let\@dedication\@empty + \global\let\author\relax + \global\let\title\relax + \global\let\extratitle\relax + \global\let\titlehead\relax + \global\let\subject\relax + \global\let\publishers\relax + \global\let\uppertitleback\relax + \global\let\lowertitleback\relax + \global\let\dedication\relax + \global\let\date\relax + \global\let\and\relax +}% +\renewcommand*{\@maketitle}{% + \clearpage + \let\footnote\thanks + \let\LTRfootnote\LTRthanks + \let\RTLfootnote\RTLthanks + \ifx\@extratitle\@empty \else + \noindent\@extratitle \next@tpage \if@twoside \null\next@tpage \fi + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ifx\@titlehead\@empty \else + \begin{minipage}[t]{\textwidth} + \@titlehead + \end{minipage}\par + \fi + \null + \vskip 2em% + \begin{center}% + \ifx\@subject\@empty \else + {\subject@font \@subject \par} + \vskip 1.5em + \fi + {\titlefont\huge \@title \par}% + \vskip .5em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \vskip 1em + {\Large + \lineskip .5em% + \begin{tabular}[t]{c} + \@author + \end{tabular}\par + }% + \vskip 1em% + {\Large \@date \par}% + \vskip \z@ \@plus 1em + {\Large \@publishers \par} + \ifx\@dedication\@empty \else + \vskip 2em + {\Large \@dedication \par} + \fi + \end{center}% + \par + \vskip 2em +}% \renewcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% @@ -99,7 +261,7 @@ \@arabic\c@equation } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/stabular-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/stabular-bidi.def index 2a3dcf43115..58b3c837a9a 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/stabular-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/stabular-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `stabular-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `stabular-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{stabular-bidi.def}[2010/03/01 v0.1 adaptations for stabular package] \def\@stabular{\if@RTL\global\@RTLtabtrue\fi \leavevmode \bgroup \if@RTLtab\beginR \fi \let\@acol\@tabacol @@ -39,7 +36,7 @@ \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi \@preamble} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/tabls-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tabls-bidi.def index 63a4bf2d15f..caa17c1eed9 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tabls-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tabls-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `tabls-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `tabls-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{tabls-bidi.def}[2010/03/01 v0.1 adaptations for tabls package] \def\endtabular{\endarray $\if@RTLtab\endR\fi\egroup \global\@RTLtabfalse} @@ -47,7 +44,7 @@ \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi \@preamble} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/tabulary-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tabulary-bidi.def index d29dbb9b343..266127839e9 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tabulary-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tabulary-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `tabulary-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `tabulary-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{tabulary-bidi.def}[2010/03/01 v0.1 adaptations for tabulary package] \def\@testpach{\@chclass \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else \ifnum \@lastchclass=7 5 \else @@ -42,7 +39,7 @@ \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi\fi \fi \fi\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/tikz-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tikz-bidi.def index 47cf45e4839..b384fdc082f 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tikz-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tikz-bidi.def @@ -1,23 +1,20 @@ %% %% This is file `tikz-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `tikz-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{tikz-bidi.def}[2010/03/01 v0.1 adaptations for tikz package] \let\origin@tikzpicture=\tikzpicture \let\origin@endtikzpicture=\endtikzpicture \def\tikzpicture{\LTR\origin@tikzpicture} \def\endtikzpicture{\origin@endtikzpicture\endLTR} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocbibind-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocbibind-bidi.def index 3ba4475c941..81826afc359 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tocbibind-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tocbibind-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `tocbibind-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `tocbibind-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{tocbibind-bidi.def}[2010/03/01 v0.1 adaptations for tocbibind package] \if@dotocbib \@ifpackageloaded{natbib}{}{% natbib not loaded \renewcommand{\bibsection}{\t@cb@bchapsec} @@ -42,7 +39,7 @@ \fi %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocloft-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocloft-bidi.def index 4d9801e230c..7bd3ce6a3d6 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tocloft-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tocloft-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `tocloft-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `tocloft-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{tocloft-bidi.def}[2010/03/01 v0.1 adaptations for tocloft package] \if@cfthaspart \renewcommand*{\l@part}[2]{ \@cftdopartfalse @@ -319,7 +316,7 @@ \if@RTL\leftskip\else\rightskip\fi \@tocrmarg\relax \textit{#1}\protect\par}}} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocstyle-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocstyle-bidi.def index b83aaa7c0eb..8cfd05bf693 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tocstyle-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tocstyle-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `tocstyle-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `tocstyle-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{tocstyle-bidi.def}[2010/03/01 v0.1 adaptations for tocstyle package] \renewcommand*{\tocstyle@dottedtocline}[5]{% \let\numberline\tocstyle@numberline \ifnum #1>\c@tocdepth \else @@ -258,7 +255,7 @@ \@tempa } %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/wrapfig-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/wrapfig-bidi.def index 8ee58c0a467..37513381c86 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/wrapfig-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/wrapfig-bidi.def @@ -1,17 +1,14 @@ %% %% This is file `wrapfig-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `wrapfig-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{wrapfig-bidi.def}[2010/03/01 v0.2 adaptations for wrapfig package] \let\WF@@everypar\n@everypar \def\WF@putfigmaybe{% \ifinner @@ -19,7 +16,7 @@ \let\pagetotal\maxdimen % kludge flag for "not top of page" \else % outer page \@tempdima\pagedepth % save page depth - {\advance\parskip\if@RTL\@tempdimb\else\@tempdima\fi\vskip-\parskip}% back up to baseline + {\advance\parskip\if@RTL\baselineskip\else\@tempdima\fi\vskip-\parskip}% back up to baseline \penalty\interlinepenalty % update pg. parameters \@tempdimb\pagegoal \advance\@tempdimb-\pagetotal % room left on page \ifdim\@tempdimb<\z@ % \WF@info{Page overfull already;}% @@ -88,7 +85,7 @@ \aftergroup\WF@startwrapping % after the \endgroup which immediately follows \fi} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/xelatex/bidi/xcolor-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/xcolor-bidi.def new file mode 100644 index 00000000000..b769811fcd0 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/xcolor-bidi.def @@ -0,0 +1,127 @@ +%% +%% This is file `xcolor-bidi.def', + +%% +%% __________________________________ +%% Copyright © 2009-2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{xcolor-bidi.def}[2010/03/01 v0.1 adaptations for xcolor package] +\long\def\color@b@x#1#2#3% + {\leavevmode\if@RTL\beginL\fi + \setbox\z@\hbox{\kern\fboxsep{\set@color\if@RTL\beginR\fi#3\if@RTL\endR\fi}\kern\fboxsep}% + \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@ + \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ + {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}\if@RTL\endL\fi} +\DeclareRobustCommand\color + {\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\@ifnextchar[\@undeclaredcolor\@declaredcolor} +\def\@undeclaredcolor[#1]#2% + {\begingroup + \let\@@cls\@empty + \XC@getmodclr12{#1}{#2}{}% + {\ifblendcolors + \ifx\colorblend\@empty\else + \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse + \XC@coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr + \fi + \fi + \ifconvertcolorsU + \edef\@@tmp{\XC@tgt@mod{\@@mod}}% + \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp + \fi + \ifmaskcolors + \convertcolorspec\@@mod\@@clr\XC@mmod\@@clr + \let\@@mod\XC@mmod + \XC@inflate\@@mod\XC@mclr\@@clr\@@tmp + \expandafter\XC@mul\@@tmp,\@@clr + \fi + \edef\@@tmp{\noexpand\XC@undeclaredcolor{\@@mod}{\@@clr}}% + \expandafter\endgroup\@@tmp}} +\def\@declaredcolor#1% + {\XC@edef\XC@@tmp{#1}\XC@@tstfalse + \ifcase\XC@type\XC@@tmp\relax \XC@@tsttrue\or \relax\else + \ifblendcolors\XC@@tsttrue\fi \ifmaskcolors\XC@@tsttrue\fi + \ifconvertcolorsU\XC@@tsttrue\fi + \fi + \ifXC@@tst + \expandafter\XC@declaredcolor\else + \expandafter\XC@declaredc@lor\fi} +\def\XC@undeclaredcolor#1#2% + {\@ifundefinedmodel{#1}% + {\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} +\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} +\DeclareRobustCommand\bidicolor + {\@ifnextchar[\@bidiundeclaredcolor\@bidideclaredcolor} +\def\@bidiundeclaredcolor[#1]#2% + {\begingroup + \let\@@cls\@empty + \XC@getmodclr12{#1}{#2}{}% + {\ifblendcolors + \ifx\colorblend\@empty\else + \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse + \XC@coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr + \fi + \fi + \ifconvertcolorsU + \edef\@@tmp{\XC@tgt@mod{\@@mod}}% + \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp + \fi + \ifmaskcolors + \convertcolorspec\@@mod\@@clr\XC@mmod\@@clr + \let\@@mod\XC@mmod + \XC@inflate\@@mod\XC@mclr\@@clr\@@tmp + \expandafter\XC@mul\@@tmp,\@@clr + \fi + \edef\@@tmp{\noexpand\XC@bidiundeclaredcolor{\@@mod}{\@@clr}}% + \expandafter\endgroup\@@tmp}} +\def\XC@bidiundeclaredcolor#1#2% + {\@ifundefinedmodel{#1}% + {\c@lor@error{model `#1'}}% + {\@nameuse{color@#1}\current@color{#2}% + \edef\XC@current@color{\noexpand\xcolor@{}{\current@color}{#1}{#2}}% + \XC@display}} +\def\@bidideclaredcolor#1% + {\XC@edef\XC@@tmp{#1}\XC@@tstfalse + \ifcase\XC@type\XC@@tmp\relax \XC@@tsttrue\or \relax\else + \ifblendcolors\XC@@tsttrue\fi \ifmaskcolors\XC@@tsttrue\fi + \ifconvertcolorsU\XC@@tsttrue\fi + \fi + \ifXC@@tst + \expandafter\XC@bidideclaredcolor\else + \expandafter\XC@bidideclaredc@lor\fi} +\def\XC@bidideclaredcolor + {\XC@split\XC@@tmp + \edef\@@tmp{\noexpand\@bidiundeclaredcolor[\@@mod]{\@@clr}}% + \expandafter\endgroup\@@tmp} +\def\XC@bidideclaredc@lor + {\XC@let@Nc\XC@current@color{\string\color@\XC@@tmp}% + \edef\current@color{\XC@current@color}% + \XC@display} +\def\color@box#1#2{\color@b@x\relax{\bidicolor#1{#2}}} +\def\color@fbox#1#2#3#{\protect\color@fb@x{#1}{#2}{#3}} +\def\color@fb@x#1#2#3#4% + {\color@b@x{\fboxsep\z@\bidicolor#1{#2}\XC@fbox}% + {\@ifxempty{#3}{\bidicolor#1}{\bidicolor#3}{#4}}} +%% +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% 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 `xcolor-bidi.def'. diff --git a/Master/texmf-dist/tex/xelatex/bidi/xltxtra-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/xltxtra-bidi.def index 0f7ac55e696..208a8211f52 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/xltxtra-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/xltxtra-bidi.def @@ -1,23 +1,20 @@ %% %% This is file `xltxtra-bidi.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% bidi.dtx (with options: `xltxtra-bidi.def') + %% %% __________________________________ -%% Copyright © 2009 Vafa Khalighi +%% Copyright © 2009-2010 Vafa Khalighi %% %% License information appended. %% %% +\ProvidesFile{xltxtra-bidi.def}[2010/03/01 v0.1 adaptations for xltxtra package] \let\@@XeTeX\XeTeX \def\XeTeX{\@ensure@LTR{\@@XeTeX}} \let\@@XeLaTeX\XeLaTeX \def\XeLaTeX{\@ensure@LTR{\@@XeLaTeX}} %% -%% Copyright © 2009 by Vafa Khalighi <vafa@users.berlios.de> +%% Copyright © 2009-2010 by Vafa Khalighi <vafa@users.berlios.de> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of |