summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bidi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-31 21:48:03 +0000
committerKarl Berry <karl@freefriends.org>2012-10-31 21:48:03 +0000
commit94d42d7395b8167256c615f1045aef29418dd937 (patch)
treec40cb68a63c866d335f444feb10e14e03d824c36 /Master/texmf-dist/source/latex/bidi
parentc7b0de93190a3c0d8e3ee9d88e79da7d21a27e31 (diff)
new pgf/tikz package bidi (31oct12)
git-svn-id: svn://tug.org/texlive/trunk@28144 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/bidi')
-rw-r--r--Master/texmf-dist/source/latex/bidi/bidi.dtx1314
-rw-r--r--Master/texmf-dist/source/latex/bidi/bidi.ins6
2 files changed, 884 insertions, 436 deletions
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx
index 630f4181a1c..d73a8acff92 100644
--- a/Master/texmf-dist/source/latex/bidi/bidi.dtx
+++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx
@@ -5,22 +5,33 @@
%<*readme>
___________________
The bidi package
-v11.161
+v12 (Final Version)
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX.
-__________________________________________________
-How to file bug reports and follow development of bidi package
-The bidi package is developed on <https://github.com/vafa/bidi>.
+In this version, a new experimental package, namely,
+bidi-longtable.sty is provided for typesetting bidirectional
+longtables with longtable package. bidi-longtable.sty should
+be loaded after bidi package.This is the final version of bidi
+package and no more updates of bidi package will appear.
+I am working on a commercial package (namely Simurgh,
+for typesetting high quality Persian/English documents with
+LuaTeX, which does not have bugs and limitations of bidi
+package) and therefore do not wish to continue the
+development of bidi package. Hence you may like to consider
+bidi as obsolete and may wish to purchase a copy of Simurgh
+package. If you are interested to purchase a copy of Simurgh
+package, then send me an email. Please do not email me with
+questions/queries about bugs/limitations/usage of bidi package;
+I am not interested in those emails and your email will be deleted
+immediately without replying back.
-Users are encouraged to offer suggestions and file bug reports on
-the github issue tracker: <https://github.com/vafa/bidi/issues>.
___________________
Vafa Khalighi
-vafakhlg@gmail.com
+vafak12@gmail.com
Copyright © 2007–2012
It may be distributed and/or modified under the LaTeX Project Public License,
@@ -48,7 +59,7 @@ by Vafa Khalighi.
\endpreamble
\postamble
-Copyright © 2009–2012 Vafa Khalighi <vafakhlg@gmail.com>
+Copyright © 2009–2012 Vafa Khalighi <vafak12@gmail.com>
It may be distributed and/or modified under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -76,6 +87,7 @@ by Vafa Khalighi.
\generate{\file{bidi2in1.sty}{\from{\jobname.dtx}{bidi2in1.sty}}}
\generate{\file{bidicode.sty}{\from{\jobname.dtx}{bidicode.sty}}}
\generate{\file{bidiftnxtra.sty}{\from{\jobname.dtx}{bidiftnxtra.sty}}}
+\generate{\file{bidi-longtable.sty}{\from{\jobname.dtx}{bidi-longtable.sty}}}
\generate{\file{bidimoderncv.cls}{\from{\jobname.dtx}{bidimoderncv.cls}}}
\generate{\file{biditools.sty}{\from{\jobname.dtx}{biditools.sty}}}
\generate{\file{bidituftefloat.sty}{\from{\jobname.dtx}{bidituftefloat.sty}}}
@@ -110,6 +122,7 @@ by Vafa Khalighi.
\generate{\file{extrafootnotefeatures.def}{\from{\jobname.dtx}{extrafootnotefeatures.def}}}
\generate{\file{extreport-xetex-bidi.def}{\from{\jobname.dtx}{extreport-xetex-bidi.def}}}
\generate{\file{fancyhdr-xetex-bidi.def}{\from{\jobname.dtx}{fancyhdr-xetex-bidi.def}}}
+\generate{\file{fix2col-xetex-bidi.def}{\from{\jobname.dtx}{fix2col-xetex-bidi.def}}}
\generate{\file{fleqn-xetex-bidi.def}{\from{\jobname.dtx}{fleqn-xetex-bidi.def}}}
\generate{\file{float-xetex-bidi.def}{\from{\jobname.dtx}{float-xetex-bidi.def}}}
\generate{\file{flowfram-xetex-bidi.def}{\from{\jobname.dtx}{flowfram-xetex-bidi.def}}}
@@ -196,20 +209,17 @@ by Vafa Khalighi.
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{calc,framed}
+\usepackage{calc,framed,amssymb}
\usepackage{pifont}
\usepackage{bbding}
\usepackage{bidicode}
\usepackage{graphicx}
\usepackage{fontspec}
-\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}
-\setsansfont[Mapping=tex-text,Numbers=OldStyle]{Myriad Pro}
-\setmonofont{Andale Mono}
\definecolor{bidiblue}{rgb}{0.1,0.2,0.8}
\definecolor{TFFrameColor}{rgb}{0.1,0.2,0.8}
\definecolor{TFTitleColor}{rgb}{1,1,1}
\usepackage[numbered]{hypdoc}
-\hypersetup{pdftitle={The \textsf{bidi} Package (Support for bidirectional typesetting in plain \TeX{} and \LaTeXe)},pdfauthor={Vafa Khalighi <vafakhlg@gmail.com>},linkcolor=bidiblue,urlcolor=bidiblue,citecolor=bidiblue}
+\hypersetup{pdftitle={The \textsf{bidi} Package (Support for bidirectional typesetting in plain \TeX{} and \LaTeXe)},pdfauthor={Vafa Khalighi <vafak12@gmail.com>},linkcolor=bidiblue,urlcolor=bidiblue,citecolor=bidiblue}
\setlength\columnseprule{.4pt}
\newcommand\XeTeX{Xe\TeX}
\newcommand\XeLaTeX{Xe\LaTeX}
@@ -250,15 +260,28 @@ by Vafa Khalighi.
% \makeatletter
% \title{The \textsf{bidi} Package\\[10pt]
% \includegraphics[width=0.5\textwidth]{bidi-logo}\\[10pt]
-% Support for bidirectional typesetting in plain \TeX{} and \LaTeXe\\
-%\url{https://github.com/vafa/bidi}}
+% Support for bidirectional typesetting in plain \TeX{} and \LaTeXe}
% \author{Vafa Khalighi\\
-% \url{vafakhlg@gmail.com}}
-% \date{\today\qquad Version 11.161}
+% \url{vafak12@gmail.com}}
+% \date{\today\qquad Version 12 (Final Version)}
%\maketitle
-%\begin{titled-frame}{How to file bug reports and follow development of \textsf{bidi} package}
-%The \textsf{bidi} package is developed on \url{https://github.com/vafa/bidi}. Users are encouraged to offer suggestions and file bug reports on the github issue tracker:
-%\url{https://github.com/vafa/bidi/issues}.
+%\begin{titled-frame}{Important Note}
+%In this version, a new \emph{experimental} package, namely,
+%\textsf{bidi-longtable.sty} is provided for typesetting bidirectional
+%longtables with \textsf{longtable} package. \textsf{bidi-longtable.sty} should
+%be loaded after \textsf{bidi} package.This is the final version of \textsf{bidi}
+%package and no more updates of \textsf{bidi} package will appear.
+%I am working on a commercial package (namely \textsf{Simurgh},
+%for typesetting high quality Persian/English documents with
+%LuaTeX, which does not have bugs and limitations of \textsf{bidi}
+%package) and therefore do not wish to continue the
+%development of \textsf{bidi} package. Hence you may like to consider
+%\textsf{bidi} as obsolete and may wish to purchase a copy of \textsf{Simurgh}
+%package. If you are interested to purchase a copy of \textsf{Simurgh}
+%package, then send me an email. Please do not email me with
+%questions/queries about bugs/limitations/usage of \textsf{bidi} package;
+%I am not interested in those emails and your email will be deleted
+%immediately without replying back.
%\end{titled-frame}
%\newpage
% \tableofcontents
@@ -274,7 +297,7 @@ by Vafa Khalighi.
%in plain TeX and LaTeX. The package includes adaptations for use
%with many other commonly-used packages.
%Copyright (c) 2009-2012 Vafa Khalighi
-%v11.161, 2012/07/25
+%v12 (Final Version), 2012/12/12
%License: LaTeX Project Public License, version 1.3c or higher (your choice)
%Location on CTAN: /macros/latex/contrib/bidi
%\end{lstlisting}
@@ -367,8 +390,12 @@ by Vafa Khalighi.
%\item \Lcs{paragraphfootnotes} typesets footnotes in paragraph format.
%\item \Lcs{setLTRparagraphfootnotes} makes footnotes run from left to right. This comand is active by default.
%\item \Lcs{setRTLparagraphfootnotes} makes footnotes run from right to left.
-%\item When using \texttt{extrafootnotefeatures}, \Lcs{textwidthfootnoterule} is active.
%\end{itemize}
+% Please note that when using \texttt{extrafootnotefeatures} option, the footnote rule will be as wide as the text width and \Lcs{autofootnoterule}, \Lcs{rightfootnoterule}, \Lcs{leftfootnoterule}, and \Lcs{textwidthfootnoterule} commands have no effects.
+%
+%
+%
+% Please also note that if you redefine \Lcs{baselinestretch} command or change the value of \Lcs{baselineskip} primitive before \Lcs{paragraphfootnotes} command, then you may get Arithmetic Overflow error. You should change these after using \Lcs{paragraphfootnotes} command.
%\subsection{Paragraph Switching Commands\label{PSC}}
%\begin{BDef}
%\Lcs{setLTR}\quad\Lcs{setLR}\quad\Lcs{unsetRL}\quad\Lcs{unsetRTL}\\
@@ -473,13 +500,16 @@ by Vafa Khalighi.
%The behavior of footnote rules can also be controlled.
%\begin{BDef}
%\Lcs{autofootnoterule}\quad\Lcs{rightfootnoterule}\quad\Lcs{leftfootnoterule}\\
-%\Lcs{LRfootnoterule}\quad\Lcs{textwidthfootnoterule}
+%\Lcs{LRfootnoterule}\quad\Lcs{textwidthfootnoterule}\quad\Lcs{SplitFootnoteRule}\\
+%\Lcs{debugfootnotedirection}
%\end{BDef}
%\begin{itemize}
%\item \Lcs{autofootnoterule} will draw the footnote rule right or left aligned based on the direction of the first footnote following the rule (i.e., put in the current page).
%\item \Lcs{rightfootnoterule} will put footnote rule on the right-hand side.
%\item \Lcs{leftfootnoterule} or \Lcs{LRfootnoterule} will put footnote rule on the left-hand side.
%\item \Lcs{textwidthfootnoterule} will draw the footnote rule with a width equal to \Lcs{textwidth}.
+%\item \Lcs{SplitFootnoteRule} puts a full-width rule above the split-off part of a split footnote.
+%\item \Lcs{debugfootnotedirection} writes the direction of the first footnote on each page, in the log file.
%\end{itemize}
%\subsection{Two Column Typesetting\label{twocolumn}}
%\begin{BDef}
@@ -680,7 +710,7 @@ by Vafa Khalighi.
%\subsection{Equation Numbers}
%For \texttt{reqno}, equation numbers are on the right hand side and for \texttt{leqno}, equation numbers are on the left hand side, independent on the current mode.
%\section{Support For Various Packages and Classes}
-%The \textsf{bidi} package supports \textsf{amsmath}, \textsf{amsthm}, \textsf{array}, \textsf{arydshln}, \textsf{breqn}, \textsf{caption}, \textsf{color}, \textsf{colortbl}, \textsf{crop}, \textsf{cutwin}, \textsf{dblfnote} \textsf{draftwatermark}, \textsf{empheq}, \textsf{fancyhdr}, \textsf{float}, \textsf{flowfram}, \textsf{framed}, \textsf{graphicx}, \textsf{hvfloat}, \textsf{hyperref}, \textsf{lettrine}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{multienum}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{picinpar}, \textsf{ragged2e}, \textsf{sidecap}, \textsf{stabular}, \textsf{subfig}, \textsf{subfigure}, \textsf{supertabular}, \textsf{xtab}, \textsf{tabls}, \textsf{tabulary}, \textsf{PGF \&\ TIKZ}, \textsf{tocbibind}, \textsf{tocloft}, \textsf{tocstyle}, \textsf{wrapfig}, \textsf{xcolor}, \textsf{xltxtra} packages, \textsf{amsart}, \textsf{amsbook}, \textsf{artikel1}, \textsf{artikel2}, \textsf{artikel3}, \textsf{extarticle}, \textsf{flashcards}, \textsf{standrad article}, \textsf{boek}, \textsf{boek3}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{extletter}, \textsf{scrlettr},\textsf{standard letter}, \textsf{memoir}, \textsf{extreport}, \textsf{rapport1}, \textsf{rapport3}, \textsf{refrep}, \textsf{standard report}, \textsf{scartcl}, \textsf{scrbook}, \textsf{scrreprt} classes and any other packages and classes that relies on these packages and classes. This means, you can use all these packages and classes in addition to other packages and classes that rely on these packages and classes and use their functionality fully for your bidirectional documents.
+%The \textsf{bidi} package supports \textsf{amsmath}, \textsf{amsthm}, \textsf{array}, \textsf{arydshln}, \textsf{breqn}, \textsf{caption}, \textsf{color}, \textsf{colortbl}, \textsf{crop}, \textsf{cutwin}, \textsf{dblfnote} \textsf{draftwatermark}, \textsf{empheq}, \textsf{fancyhdr}, \textsf{fix2col}, \textsf{float}, \textsf{flowfram}, \textsf{framed}, \textsf{graphicx}, \textsf{hvfloat}, \textsf{hyperref}, \textsf{lettrine}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{multienum}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{picinpar}, \textsf{ragged2e}, \textsf{sidecap}, \textsf{stabular}, \textsf{subfig}, \textsf{subfigure}, \textsf{supertabular}, \textsf{xtab}, \textsf{tabls}, \textsf{tabulary}, \textsf{PGF \&\ TIKZ}, \textsf{tocbibind}, \textsf{tocloft}, \textsf{tocstyle}, \textsf{wrapfig}, \textsf{xcolor}, \textsf{xltxtra} packages, \textsf{amsart}, \textsf{amsbook}, \textsf{artikel1}, \textsf{artikel2}, \textsf{artikel3}, \textsf{extarticle}, \textsf{flashcards}, \textsf{standrad article}, \textsf{boek}, \textsf{boek3}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{extletter}, \textsf{scrlettr},\textsf{standard letter}, \textsf{memoir}, \textsf{extreport}, \textsf{rapport1}, \textsf{rapport3}, \textsf{refrep}, \textsf{standard report}, \textsf{scartcl}, \textsf{scrbook}, \textsf{scrreprt} classes and any other packages and classes that relies on these packages and classes. This means, you can use all these packages and classes in addition to other packages and classes that rely on these packages and classes and use their functionality fully for your bidirectional documents.
%
%We now give some details that you should know about the supported packages or classes.
%\subsection{Color}
@@ -699,7 +729,7 @@ by Vafa Khalighi.
%\item \Lcs{LTRdfnmakecol} makes footnotes double-columned LTR.
%\item If the main direction of the document is RTL, \Lcs{RTLdfnmakecol} is active and if the main direction of the document is LTR, \Lcs{LTRdfnmakecol} is active.
%\end{itemize}
-%
+% Please note that when using \textsf{dblfnote} package, the footnote rule will be as wide as the footnote column and \Lcs{autofootnoterule}, \Lcs{rightfootnoterule}, \Lcs{leftfootnoterule}, and \Lcs{textwidthfootnoterule} commonds have no effects.
%\subsection{Hyperref}
%The \textsf{hyperref} package works fine with bidirectional documents if and only if, your link will not span more than a line. If your link spans more than a line, then your whole document, or page or paragraph may be linked.
%
@@ -1068,7 +1098,7 @@ by Vafa Khalighi.
%
%
% \begin{macrocode}
-\ProvidesFile{amsart-xetex-bidi.def}[2011/08/26 v0.6 bidi adaptations for amsart class for XeTeX engine]
+\ProvidesFile{amsart-xetex-bidi.def}[2012/12/12 v0.7 bidi adaptations for amsart class for XeTeX engine]
\def\@tocline#1#2#3#4#5#6#7{\relax
\ifnum #1>\c@tocdepth % then omit
\else
@@ -1093,54 +1123,60 @@ by Vafa Khalighi.
\def\part{\@startsection{part}{0}%
\z@{\linespacing\@plus\linespacing}{.5\linespacing}%
{\normalfont\bfseries\if@RTL\raggedleft\else\raggedright\fi}}
-\def\right@footnote{%
+\def\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern-.4\p@
\hrule\@width 5pc\kern11\p@\kern-\footnotesep}\hfil\endR}}
-\def\left@footnote{\kern-.4\p@
+\def\left@footnoterule{\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
+ \insert\footins{%
+ \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \normalfont\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}
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
\long\def\@RTLfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLtrue\reset@font\footnotesize
+ \insert\footins{%
+ \@RTLtrue%
+ \normalfont\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}
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+
+
\long\def\@LTRfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLfalse\reset@font\footnotesize
+ \insert\footins{%
+ \@RTLfalse%
+ \normalfont\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}
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+
+\footdir@temp\footdir@ORG@bidi@amsart@footnotetext\@footnotetext{\if@RTL@footnote R\else L\fi}%
+\footdir@temp\footdir@ORG@bidi@amsart@RTLfootnotetext\@RTLfootnotetext{R}%
+\footdir@temp\footdir@ORG@bidi@amsart@LTRfootnotetext\@LTRfootnotetext{L}%
+
\renewenvironment{thebibliography}[1]{%
\@bibtitlestyle
\normalfont\bibliofont\labelsep .5em\relax
@@ -1164,6 +1200,9 @@ by Vafa Khalighi.
\if@RTL\raggedleft\else\raggedright\fi
\hyphenpenalty\@M
\footnotesize}
+\def\@idxitem{\par\hangindent \if@RTL-\fi2em}
+\def\subitem{\par\hangindent \if@RTL-\fi2em\hspace*{1em}}
+\def\subsubitem{\par\hangindent \if@RTL-\fi3em\hspace*{2em}}
\def\maketitle{\par
\@topnum\z@ % this prevents figures from falling at the top of page 1
\@setcopyright
@@ -1193,7 +1232,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{amsbook-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{amsbook-xetex-bidi.def}[2010/07/25 v0.7 bidi adaptations for amsbook class for XeTeX engine]
+\ProvidesFile{amsbook-xetex-bidi.def}[2012/12/12 v0.8 bidi adaptations for amsbook class for XeTeX engine]
\def\@tocline#1#2#3#4#5#6#7{\relax
\ifnum #1>\c@tocdepth % then omit
\else
@@ -1224,54 +1263,62 @@ by Vafa Khalighi.
\if@RTL\raggedleft\else\raggedright\fi
\hyphenpenalty\@M
\footnotesize}
-\def\right@footnote{%
+\def\@idxitem{\par\hangindent \if@RTL-\fi2em}
+\def\subitem{\par\hangindent \if@RTL-\fi2em\hspace*{1em}}
+\def\subsubitem{\par\hangindent \if@RTL-\fi3em\hspace*{2em}}
+\def\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern-.4\p@
\hrule\@width 5pc\kern11\p@\kern-\footnotesep}\hfil\endR}}
-\def\left@footnote{\kern-.4\p@
+\def\left@footnoterule{\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
+ \insert\footins{%
+ \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \normalfont\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}
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
\long\def\@RTLfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLtrue\reset@font\footnotesize
+ \insert\footins{%
+ \@RTLtrue%
+ \normalfont\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}
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+
\long\def\@LTRfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLfalse\reset@font\footnotesize
+ \insert\footins{%
+ \@RTLfalse%
+ \normalfont\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}
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+
+
+\footdir@temp\footdir@ORG@bidi@amsbook@footnotetext\@footnotetext{\if@RTL@footnote R\else L\fi}%
+\footdir@temp\footdir@ORG@bidi@amsbook@RTLfootnotetext\@RTLfootnotetext{R}%
+\footdir@temp\footdir@ORG@bidi@amsbook@LTRfootnotetext\@LTRfootnotetext{L}%
+
\renewenvironment{thebibliography}[1]{%
\@bibtitlestyle
\normalfont\bibliofont\labelsep .5em\relax
@@ -1420,9 +1467,9 @@ by Vafa Khalighi.
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\let \LTRfootnote \LTRthanks
\let \RTLfootnote \RTLthanks
@@ -1544,11 +1591,11 @@ by Vafa Khalighi.
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\endgroup
\fi}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -1735,13 +1782,13 @@ by Vafa Khalighi.
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\kern.5\baselineskip
\hrule\@width\unitindent
\kern.4\baselineskip
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -1754,9 +1801,9 @@ by Vafa Khalighi.
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\long\def\@makefntext##1{\parindent\z@
\def\labelitemi{\textendash}\@revlabeltrue
@@ -1981,12 +2028,12 @@ by Vafa Khalighi.
\renewcommand*\thesubsubsection{\thesubsection\@SepMark\@arabic\c@subsubsection}
\renewcommand*\theparagraph{\thesubsubsection\@SepMark\@arabic\c@paragraph}
\renewcommand*\thesubparagraph{\theparagraph\@SepMark\@arabic\c@subparagraph}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\hrule\@width 3\unitindent
\kern 2.6\p@
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -2015,9 +2062,9 @@ by Vafa Khalighi.
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\long\def\@makefntext##1{\parindent\z@
\def\labelitemi{\textendash}\@revlabeltrue
@@ -2234,13 +2281,13 @@ by Vafa Khalighi.
\fi}
{\if@twocolumn\else\par\egroup\fi}
\fi
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\kern.5\baselineskip
\hrule\@width\unitindent
\kern.4\baselineskip
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -2274,9 +2321,9 @@ by Vafa Khalighi.
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\long\def\@makefntext##1{\parindent\z@
\def\labelitemi{\textendash}\@revlabeltrue
@@ -2550,8 +2597,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2012/07/25}
-\def\bidiversion{v11.161}
+\def\bididate{2012/12/12}
+\def\bidiversion{v12 (Final Version)}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -2568,6 +2615,9 @@ Location on CTAN: /macros/latex/contrib/bidi}
\everyjob{\bidi@everyjob\typeout{\bidiinfo}}
\RequirePackage{iftex}
\RequirePackage{biditools}
+\RequirePackage{zref-abspage}
+\RequirePackage{auxhook}
+\RequirePackage{ltxcmds}
\eqnewif{\if@RTLmain}{\if@rlmain}
\eqnewif{\if@RTL}{\if@rl}
\newif\if@RTLmaths
@@ -2616,7 +2666,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
%\fi
% \subsection{\textsf{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2012/07/25}
+\def\bididate{2012/12/12}
\def\bidiversion{v0.1}
\catcode`@=11
\let \protect \relax
@@ -2925,24 +2975,65 @@ Location on CTAN: /macros/latex/contrib/bidi}
\let\@footnotetext\bidi@p@ftntext
\let\@LTRfootnotetext\bidi@p@LTRftntext
\let\@RTLfootnotetext\bidi@p@RTLftntext
+ \let\@xfootnotenext\bidi@p@xftntext
+ \let\@xfootnote\bidi@p@xfootnote
+ \let\@xLTRfootnotenext\bidi@p@xLTRftntext
+ \let\@xLTRfootnote\bidi@p@xLTRfootnote
+ \let\@xRTLfootnotenext\bidi@p@xRTLftntext
+ \let\@xRTLfootnote\bidi@p@xRTLfootnote
\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{}%
+ \ifx\@captype\@undefined
+ \global\bidi@p@ftn\expandafter{\expandafter}\the\bidi@p@ftn\fi%
\global\@RTLtabfalse}
\long\def\bidi@p@ftntext#1{%
- \edef\@tempy{\the\bidi@p@ftn\noexpand\footnotetext[\the\c@footnote]}%
+ \edef\@tempy{\the\bidi@p@ftn\noexpand\footnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidi@p@ftn\expandafter{\@tempy{#1}}}%
\long\def\bidi@p@LTRftntext#1{%
- \edef\@tempyi{\the\bidi@p@ftn\noexpand\LTRfootnotetext[\the\c@footnote]}%
+ \edef\@tempyi{\the\bidi@p@ftn\noexpand\LTRfootnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidi@p@ftn\expandafter{\@tempyi{#1}}}%
\long\def\bidi@p@RTLftntext#1{%
- \edef\@tempyii{\the\bidi@p@ftn\noexpand\RTLfootnotetext[\the\c@footnote]}%
+ \edef\@tempyii{\the\bidi@p@ftn\noexpand\RTLfootnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidi@p@ftn\expandafter{\@tempyii{#1}}}%
+
+
+\long\def\bidi@p@xftntext[#1]#2{%
+ \global\bidi@p@ftn\expandafter{\the\bidi@p@ftn\footnotetext[#1]{#2}}}
+
+\long\def\bidi@p@xLTRftntext[#1]#2{%
+ \global\bidi@p@ftn\expandafter{\the\bidi@p@ftn\LTRfootnotetext[#1]{#2}}}
+
+\long\def\bidi@p@xRTLftntext[#1]#2{%
+ \global\bidi@p@ftn\expandafter{\the\bidi@p@ftn\RTLfootnotetext[#1]{#2}}}
+
+
+\def\bidi@p@xfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidi@p@xftntext[#1]}
+
+
+\def\bidi@p@xLTRfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidi@p@xLTRftntext[#1]}
+
+
+\def\bidi@p@xRTLfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidi@p@xRTLftntext[#1]}
+
\def\@xfloat #1[#2]{%
\@nodocument
\def \@captype {#1}%
@@ -3007,6 +3098,12 @@ Location on CTAN: /macros/latex/contrib/bidi}
\let\@footnotetext\bidi@p@ftntext
\let\@LTRfootnotetext\bidi@p@LTRftntext
\let\@RTLfootnotetext\bidi@p@RTLftntext
+ \let\@xfootnotenext\bidi@p@xftntext
+ \let\@xfootnote\bidi@p@xfootnote
+ \let\@xLTRfootnotenext\bidi@p@xLTRftntext
+ \let\@xLTRfootnote\bidi@p@xLTRfootnote
+ \let\@xRTLfootnotenext\bidi@p@xRTLftntext
+ \let\@xRTLfootnote\bidi@p@xRTLfootnote
\hsize\columnwidth
\@parboxrestore
\@floatboxreset
@@ -3016,13 +3113,88 @@ Location on CTAN: /macros/latex/contrib/bidi}
\@minipagefalse
\outer@nobreak
\egroup %% end of vbox
- \the\bidi@p@ftn
- \global\bidi@p@ftn{}%
+ \global\bidi@p@ftn\expandafter{\expandafter}\the\bidi@p@ftn
\color@endbox
}
% \end{macrocode}
% \iffalse
%</bidiftnxtra.sty>
+%<*bidi-longtable.sty>
+%\fi
+% \subsection{\textsf{bidi-longtable.sty}}
+% \begin{macrocode}
+\ProvidesPackage{bidi-longtable}[2012/12/12 v0.1 typesetting bidi longtables in XeTeX engine (experimental)]
+\def\longtable{\if@RTL\@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
+ \@ifnextchar[\LT@array{\LT@array[x]}}
+\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
+ \endgroup
+ \global\@mparbottom\z@
+ \pagegoal\vsize
+ \endgraf\penalty\z@\addvspace\LTpost
+ \ifvoid\footins\else\insert\footins{}\fi\@RTLtabfalse}
+\def\LT@output{%
+ \ifnum\outputpenalty <-\@Mi
+ \ifnum\outputpenalty > -\LT@end@pen
+ \LT@err{floats and marginpars not allowed in a longtable}\@ehc
+ \else
+ \setbox\z@\vbox{\unvbox\@cclv}%
+ \ifdim \ht\LT@lastfoot>\ht\LT@foot
+ \dimen@\pagegoal
+ \advance\dimen@-\ht\LT@lastfoot
+ \ifdim\dimen@<\ht\z@
+ \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}%
+ \@makecol
+ \@outputpage
+ \setbox\z@\vbox{\box\LT@head}%
+ \fi
+ \fi
+ \global\@colroom\@colht
+ \global\vsize\@colht
+ \vbox
+ {\hbox{\if@RTLtab\beginR\fi\vbox{\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}\if@RTLtab\endR\fi}}%
+ \fi
+ \else
+ \setbox\@cclv\vbox{\hbox{\if@RTLtab\beginR\fi\vbox{\unvbox\@cclv\copy\LT@foot\vss}\if@RTLtab\endR\fi}}%
+ \@makecol
+ \@outputpage
+ \global\vsize\@colroom
+ \copy\LT@head\nobreak
+ \fi}
+% \end{macrocode}
+% \iffalse
+%</bidi-longtable.sty>
%<*bidimoderncv.cls>
%\fi
% \subsection{\textsf{bidimoderncv.cls}}
@@ -5166,9 +5338,10 @@ bidi implementation of tufte general structure]
\end{multicols}%
\end{fullwidth}%
}
-\renewcommand\@idxitem{\par\hangindent 2em}
-\renewcommand\subitem{\par\hangindent 3em\hspace*{1em}}
-\renewcommand\subsubitem{\par\hangindent 4em\hspace*{2em}}
+\AtBeginDocument{%
+\renewcommand\@idxitem{\par\hangindent \if@RTL-\fi2em}%
+\renewcommand\subitem{\par\hangindent \if@RTL-\fi3em\hspace*{1em}}%
+\renewcommand\subsubitem{\par\hangindent \if@RTL-\fi4em\hspace*{2em}}}
\renewcommand\indexspace{\par\addvspace{1.0\baselineskip plus 0.5ex minus 0.2ex}\relax}%
\newcommand{\lettergroup}[1]{}% swallow the letter heading in the index
% \end{macrocode}
@@ -5473,12 +5646,17 @@ bidi implementation of tufte title]
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bidipoem}%
-[2010/07/25 Environments for typesetting Persian traditional and modern poems]
+[2012/12/12 v0.4 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$}
+\newcommand{\bidipoem@openbox}{\leavevmode
+ \hbox to.77778em{%
+ \hfil\vrule
+ \vbox to.675em{\hrule width.6em\vfil\hrule}%
+ \vrule\hfil}}
+\def\poemblocksep{\quad\hbox{\bidipoem@openbox}}
\newdimen\versewidth
\newtoks\bidipoem@p@ftn
\def\poem@verse#1{%
@@ -5490,6 +5668,7 @@ bidi implementation of tufte title]
\fi
\fi
\hbox to\poem@width{\unhbox#1}%
+\global\bidipoem@p@ftn\expandafter{\expandafter}\the\bidipoem@p@ftn%
}
\def\poem@linebegin{\vadjust{}\hskip\@flushglue\hskip\poemmarginskip\relax}
\def\poem@lineend{\nobreak\hskip\poemmarginskip\hskip\@flushglue\vadjust{}}
@@ -5505,8 +5684,28 @@ bidi implementation of tufte title]
}
\def\poem@lineparsebegin{%
\halign\bgroup
-\global\setbox\verse@i=\hbox{\ignorespaces##\unskip}&&
-\global\setbox\verse@ii=\hbox{\ignorespaces##\unskip}
+\global\setbox\verse@i=\hbox{%
+\let\@footnotetext\bidipoem@p@ftntext%
+\let\@LTRfootnotetext\bidipoem@p@LTRftntext%
+\let\@RTLfootnotetext\bidipoem@p@RTLftntext%
+\let\@xfootnotenext\bidipoem@p@xftntext%
+\let\@xfootnote\bidipoem@p@xfootnote%
+\let\@xLTRfootnotenext\bidipoem@p@xLTRftntext%
+\let\@xLTRfootnote\bidipoem@p@xLTRfootnote%
+\let\@xRTLfootnotenext\bidipoem@p@xRTLftntext%
+\let\@xRTLfootnote\bidipoem@p@xRTLfootnote%
+\ignorespaces##\unskip}&&
+\global\setbox\verse@ii=\hbox{%
+\let\@footnotetext\bidipoem@p@ftntext%
+\let\@LTRfootnotetext\bidipoem@p@LTRftntext%
+\let\@RTLfootnotetext\bidipoem@p@RTLftntext%
+\let\@xfootnotenext\bidipoem@p@xftntext%
+\let\@xfootnote\bidipoem@p@xfootnote%
+\let\@xLTRfootnotenext\bidipoem@p@xLTRftntext%
+\let\@xLTRfootnote\bidipoem@p@xLTRfootnote%
+\let\@xRTLfootnotenext\bidipoem@p@xRTLftntext%
+\let\@xRTLfootnote\bidipoem@p@xRTLfootnote%
+\ignorespaces##\unskip}
\cr
}
\def\poem@lineparseend{%
@@ -5553,9 +5752,6 @@ bidi implementation of tufte title]
\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@
@@ -5583,8 +5779,6 @@ bidi implementation of tufte title]
\fi\fi
\poem@lineparseend
\endgroup
- \the\bidipoem@p@ftn
- \global\bidipoem@p@ftn{}%
\par
\vskip\baselineskip
\poemskip
@@ -5594,15 +5788,50 @@ bidi implementation of tufte title]
\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]}%
+ \edef\@tempx{\the\bidipoem@p@ftn\noexpand\footnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidipoem@p@ftn\expandafter{\@tempx{#1}}}%
\long\def\bidipoem@p@LTRftntext#1{%
- \edef\@tempxi{\the\bidipoem@p@ftn\noexpand\LTRfootnotetext[\the\c@footnote]}%
+ \edef\@tempxi{\the\bidipoem@p@ftn\noexpand\LTRfootnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidipoem@p@ftn\expandafter{\@tempxi{#1}}}%
\long\def\bidipoem@p@RTLftntext#1{%
- \edef\@tempxii{\the\bidipoem@p@ftn\noexpand\RTLfootnotetext[\the\c@footnote]}%
+ \edef\@tempxii{\the\bidipoem@p@ftn\noexpand\RTLfootnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidipoem@p@ftn\expandafter{\@tempxii{#1}}}%
+
+\long\def\bidipoem@p@xftntext[#1]#2{%
+ \global\bidipoem@p@ftn\expandafter{\the\bidipoem@p@ftn\footnotetext[#1]{#2}}}
+
+\long\def\bidipoem@p@xLTRftntext[#1]#2{%
+ \global\bidipoem@p@ftn\expandafter{\the\bidipoem@p@ftn\LTRfootnotetext[#1]{#2}}}
+
+\long\def\bidipoem@p@xRTLftntext[#1]#2{%
+ \global\bidipoem@p@ftn\expandafter{\the\bidipoem@p@ftn\RTLfootnotetext[#1]{#2}}}
+
+\def\bidipoem@p@xfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidipoem@p@xftntext[#1]}
+
+\def\bidipoem@p@xLTRfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidipoem@p@xLTRftntext[#1]}
+
+\def\bidipoem@p@xRTLfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidipoem@p@xRTLftntext[#1]}
+
+
+
\newenvironment{traditionalpoem}{\@traditionalpoem}{\@endtraditionalpoem}
\expandafter\def\csname traditionalpoem*\endcsname{\let\poem@obeylines=\obeylines\traditionalpoem}
\expandafter\def\csname endtraditionalpoem*\endcsname{\endtraditionalpoem}
@@ -5626,9 +5855,6 @@ bidi implementation of tufte title]
\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}%
@@ -5660,13 +5886,37 @@ bidi implementation of tufte title]
\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}
+\gdef\@startfield{%
+\global\setbox\@curfield\hbox\bgroup%
+\let\@footnotetext\bidipoem@p@ftntext%
+\let\@LTRfootnotetext\bidipoem@p@LTRftntext%
+\let\@RTLfootnotetext\bidipoem@p@RTLftntext%
+\let\@xfootnotenext\bidipoem@p@xftntext%
+\let\@xfootnote\bidipoem@p@xfootnote%
+\let\@xLTRfootnotenext\bidipoem@p@xLTRftntext%
+\let\@xLTRfootnote\bidipoem@p@xLTRfootnote%
+\let\@xRTLfootnotenext\bidipoem@p@xRTLftntext%
+\let\@xRTLfootnote\bidipoem@p@xRTLfootnote%
+\color@begingroup}
+\gdef\@stopfield{%
+ \color@endgroup\egroup\global\bidipoem@p@ftn\expandafter{\expandafter}\the\bidipoem@p@ftn}
+\gdef\@contfield{%
+\global\setbox\@curfield\hbox\bgroup%
+\let\@footnotetext\bidipoem@p@ftntext%
+\let\@LTRfootnotetext\bidipoem@p@LTRftntext%
+\let\@RTLfootnotetext\bidipoem@p@RTLftntext%
+\let\@xfootnotenext\bidipoem@p@xftntext%
+\let\@xfootnote\bidipoem@p@xfootnote%
+\let\@xLTRfootnotenext\bidipoem@p@xLTRftntext%
+\let\@xLTRfootnote\bidipoem@p@xLTRfootnote%
+\let\@xRTLfootnotenext\bidipoem@p@xRTLftntext%
+\let\@xRTLfootnote\bidipoem@p@xRTLfootnote%
+\color@begingroup\unhbox\@curfield}
% \end{macrocode}
% \iffalse
%</bidipoem.sty>
@@ -5852,13 +6102,13 @@ bidi implementation of tufte title]
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\kern.5\baselineskip
\hrule\@width\unitindent
\kern.4\baselineskip
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -5880,9 +6130,9 @@ bidi implementation of tufte title]
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\long\def\@makefntext##1{\parindent\z@
\def\labelitemi{\textendash}\@revlabeltrue
@@ -6015,13 +6265,13 @@ bidi implementation of tufte title]
\else
\renewcommand*\l@chapter{\@regtocline{0}}
\fi
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\kern.5\baselineskip
\hrule\@width\unitindent
\kern.4\baselineskip
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -6066,9 +6316,9 @@ bidi implementation of tufte title]
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\long\def\@makefntext##1{\parindent\z@
\def\labelitemi{\textendash}\@revlabeltrue
@@ -6185,9 +6435,9 @@ bidi implementation of tufte title]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\let \LTRfootnote \LTRthanks
\let \RTLfootnote \RTLthanks
@@ -6308,11 +6558,11 @@ bidi implementation of tufte title]
\penalty\@highpenalty
\endgroup
\fi}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -6990,34 +7240,14 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{dblfnote-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{dblfnote-xetex-bidi.def}[2011/09/05 v0.2 bidi adaptations for dblfnote package for XeTeX engine]
-\def\right@footnote{%
- \hbox to \DFNcolumnwidth
- {\beginR \vbox{\kern -3\p@
- \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
-\def\@iiiminipage#1#2[#3]#4{%
- \leavevmode
- \@pboxswfalse
- \if@RTLtab\@bidi@list@minipage@parbox@not@nobtrue\fi
- \if@RTL\if#1t\@bidi@list@minipage@parboxtrue\else\if#1b\@bidi@list@minipage@parboxtrue\fi\fi\fi
- \setlength\@tempdima{#4}%
- \def\@mpargs{{#1}{#2}[#3]{#4}}%
- \setbox\@tempboxa\vbox\bgroup
- \color@begingroup
- \hsize\@tempdima
- \textwidth\hsize \columnwidth\hsize
- \@parboxrestore
- \def\right@footnote{%
- \hbox to \columnwidth
- {\beginR \vbox{\kern -3\p@
- \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
- \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
- \let\@footnotetext\@mpfootnotetext
- \let\@LTRfootnotetext\@mpLTRfootnotetext
- \let\@RTLfootnotetext\@mpRTLfootnotetext
- \let\@listdepth\@mplistdepth \@mplistdepth\z@
- \@minipagerestore
- \@setminipage}
+\ProvidesFile{dblfnote-xetex-bidi.def}[2012/12/12 v0.3 bidi adaptations for dblfnote package for XeTeX engine]
+\let\autofootnoterule\relax
+\let\rightfootnoterule\relax
+\let\leftfootnoterule\relax
+\let\textwidthfootnoterule\relax
+\let\LRfootnoterule\relax
+\def\footnoterule{\kern-3\p@
+ \hrule \@width \DFNcolumnwidth \kern 2.6\p@}%
\AtBeginDocument{\let\dfn@latex@footnotetext\@footnotetext
\let\@footnotetext\dfn@footnotetext}
\long\def\dfn@LTRfootnotetext#1{{\setbox\dfn@boxa\vbox{
@@ -7433,11 +7663,11 @@ bidi implementation of tufte title]
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -7446,9 +7676,9 @@ bidi implementation of tufte title]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\null\vfil
\vskip 60\p@
@@ -7546,9 +7776,9 @@ bidi implementation of tufte title]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\let \LTRfootnote \LTRthanks
\let \RTLfootnote \RTLthanks
@@ -7747,11 +7977,11 @@ bidi implementation of tufte title]
\fromname
\else \fromsig \fi\strut}%
\par}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-\p@
\hrule \@width .4\columnwidth
\kern .6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-\p@
@@ -7764,64 +7994,64 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{extrafootnotefeatures.def}}
% \begin{macrocode}
-\ProvidesFile{extrafootnotefeatures}[2012/01/01 v0.3 bidi extra footnote features for XeTeX engine]
-\g@addto@macro\document{\textwidthfootnoterule}
+\ProvidesFile{extrafootnotefeatures}[2012/12/12 v0.4 bidi extra footnote features for XeTeX engine]
+\let\autofootnoterule\relax
+\let\rightfootnoterule\relax
+\let\leftfootnoterule\relax
+\let\textwidthfootnoterule\relax
+\let\LRfootnoterule\relax
+\def\footnoterule{\kern-3\p@
+ \hrule \@width \columnwidth \kern 2.6\p@}
\bidi@ensure@newcommand{\setRTLparagraphfootnotes}{\@parafootRTLtrue}
\bidi@ensure@newcommand{\setLTRparagraphfootnotes}{\@parafootRTLfalse}
-\long\def\@footnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi
+\renewcommand{\@footnotetext}[1]{%
+ \insert\footins{%
+ \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
\def\baselinestretch{\m@m@footnote@spacing}%
- \reset@font\foottextfont
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
- \@finalstrut\strutbox}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup%
- \m@mmf@prepare}
-\long\def\@RTLfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLtrue%
+ \reset@font
+ \foottextfont
+ \@preamfntext
+ \hsize\columnwidth
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
+ \@finalstrut\strutbox}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\renewcommand{\@RTLfootnotetext}[1]{%
+ \insert\footins{%
+ \@RTLtrue%
\def\baselinestretch{\m@m@footnote@spacing}%
- \reset@font\RTLfoottextfont
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule\z@\footnotesep\ignorespaces{\RTLfoottextfont #1}%
- \@finalstrut\strutbox}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup%
- \m@mmf@prepare}
-\long\def\@LTRfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLfalse%
+ \reset@font
+ \RTLfoottextfont
+ \@preamfntext
+ \hsize\columnwidth
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces{\RTLfoottextfont #1}%
+ \@finalstrut\strutbox}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\renewcommand{\@LTRfootnotetext}[1]{%
+ \insert\footins{%
+ \@RTLfalse%
\def\baselinestretch{\m@m@footnote@spacing}%
- \reset@font\LTRfoottextfont
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule\z@\footnotesep\ignorespaces{\LTRfoottextfont #1}%
- \@finalstrut\strutbox}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup%
- \m@mmf@prepare}
+ \reset@font
+ \LTRfoottextfont
+ \@preamfntext
+ \hsize\columnwidth
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces{\LTRfoottextfont #1}%
+ \@finalstrut\strutbox}%
+ \color@endgroup}%
+ \m@mmf@prepare}
\renewcommand{\@mpfootnotetext}[1]{%
\global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
\unvbox\@mpfootins
@@ -7831,8 +8061,6 @@ bidi implementation of tufte title]
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
\reset@font%
- \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{\foottextfont #1}%
\@finalstrut\strutbox}%
@@ -7846,8 +8074,6 @@ bidi implementation of tufte title]
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
\reset@font%
- \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{\LTRfoottextfont #1}%
\@finalstrut\strutbox}%
@@ -7861,8 +8087,6 @@ bidi implementation of tufte title]
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
\reset@font%
- \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{\RTLfoottextfont #1}%
\@finalstrut\strutbox}%
@@ -9628,11 +9852,11 @@ bidi implementation of tufte title]
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -9658,9 +9882,9 @@ bidi implementation of tufte title]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\null\vfil
\vskip 60\p@
@@ -9776,6 +10000,82 @@ bidi implementation of tufte title]
% \end{macrocode}
% \iffalse
%</fancyhdr-xetex-bidi.def>
+%<*fix2col-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{fix2col-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{fix2col-xetex-bidi.def}[2012/12/12 v0.1 bidi adaptations for fix2col package for XeTeX engine]
+\def\RTL@outputdblcol{%
+ \if@firstcolumn
+ \global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\copy\@outputbox
+ \splitmaxdepth\maxdimen
+ \vbadness\maxdimen
+ \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+ \toks@\expandafter{\topmark}%
+ \xdef\@firstcoltopmark{\the\toks@}%
+ \toks@\expandafter{\splitfirstmark}%
+ \xdef\@firstcolfirstmark{\the\toks@}%
+ \ifx\@firstcolfirstmark\@empty
+ \global\let\@setmarks\relax
+ \else
+ \gdef\@setmarks{%
+ \let\firstmark\@firstcolfirstmark
+ \let\topmark\@firstcoltopmark}%
+ \fi
+\else \global\@firstcolumntrue
+\setbox\@outputbox \vbox {\hbox to\textwidth {%
+\hskip \columnwidth
+\hfil \vrule width\columnseprule \hfil
+\hbox to\columnwidth {\box\@leftcolumn \hss}%
+\hskip -\textwidth
+\hbox to\columnwidth{\box\@outputbox \hss}%
+\hskip \columnsep
+\hskip \columnwidth }}%
+\@combinedblfloats \@setmarks \@outputpage
+\begingroup \@dblfloatplacement \@startdblcolumn
+\@whilesw\if@fcolmade \fi
+{\@outputpage \@startdblcolumn }\endgroup
+\fi}
+\def\LTR@outputdblcol{%
+ \if@firstcolumn
+ \global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\copy\@outputbox
+ \splitmaxdepth\maxdimen
+ \vbadness\maxdimen
+ \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+ \toks@\expandafter{\topmark}%
+ \xdef\@firstcoltopmark{\the\toks@}%
+ \toks@\expandafter{\splitfirstmark}%
+ \xdef\@firstcolfirstmark{\the\toks@}%
+ \ifx\@firstcolfirstmark\@empty
+ \global\let\@setmarks\relax
+ \else
+ \gdef\@setmarks{%
+ \let\firstmark\@firstcolfirstmark
+ \let\topmark\@firstcoltopmark}%
+ \fi
+ \else
+ \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{%
+ \hb@xt@\textwidth{%
+ \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
+ \@combinedblfloats
+ \@setmarks
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}%
+ \endgroup
+ \fi}
+% \end{macrocode}
+% \iffalse
+%</fix2col-xetex-bidi.def>
%<*fleqn-xetex-bidi.def>
%\fi
% \subsection{\textsf{fleqn-xetex-bidi.def}}
@@ -9978,55 +10278,152 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{footnote-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{footnote-xetex-bidi.def}[2010/07/25 v0.5 bidi footnote macros for XeTeX engine]
+\ProvidesFile{footnote-xetex-bidi.def}[2012/12/12 v0.6 bidi footnote macros for XeTeX engine]
\if@RTLmain\@RTL@footnotetrue\else\@RTL@footnotefalse\fi
-\def\bidi@footnote@output{{%
- \dimen0=\ht\footins
- \advance\dimen0 by\dp\footins
- \def\@elt##1##2{%
- \ifx\bidi@footnoterule\relax\global\let\bidi@footnoterule##2\fi
- \advance\dimen0 by -##1\relax
- \ifdim\dimen0<\z@
- {%
- \let\@elt\relax\let\right@footnote\relax\let\left@footnote\relax
- \dimen0=-\dimen0%
- \xdef\new@bidi@footnote@list{\new@bidi@footnote@list\noexpand\@elt{\the\dimen0}{##2}}%
-}%
- \fi
- \ifdim\dimen0>\z@\else
-\let\right@footnote\relax\let\left@footnote\relax
-\def\@elt####1####2{%
- {\let\@elt\relax
- \xdef\new@bidi@footnote@list{\new@bidi@footnote@list\noexpand\@elt{####1}{####2}}}%
-}%
+\newif\ifbidi@autofootnoterule
+\newcounter{footdir@label}
+\renewcommand*{\thefootdir@label}{footdir@\the\value{footdir@label}}
+\newcommand*{\footdir@write}{%
+ \stepcounter{footdir@label}%
+ \zref@labelbyprops{\thefootdir@label}{abspage}%
+}
+\newif\iffootdir@debug
+\newcommand*{\debugfootnotedirection}{\footdir@debugtrue}
+\newtoks\footdir@toks
+\newcommand*{\footdir@debug}[1]{%
+ \iffootdir@debug
+ \typeout{[footdir] #1}%
+ \fi
+}
+\@ifpackagelater{zref-abspage}{2012/10/27}{%
+ \newcommand*{\footdir@LeftRightElse}{%
+ \ltx@ifundefined{footdir@\the\value{zabspage}}{%
+ \footdir@debug{abspage \the\value{zabspage}: else}%
+ \ltx@thirdofthree
+ }{%
+ \if\csname footdir@\the\value{zabspage}\endcsname L%
+ \footdir@debug{abspage \the\value{zabspage}: left}%
+ \expandafter\ltx@firstofthree
+ \else
+ \footdir@debug{abspage \the\value{zabspage}: right}%
+ \expandafter\ltx@secondofthree
\fi
}%
- \def\new@bidi@footnote@list{}%
- \bidi@footnote@list
- \global\let\bidi@footnote@list\new@bidi@footnote@list
- }}
-\def\right@footnote{%
+ }%
+}{%
+ \providecommand*{\c@zabspage}{\c@abspage}%
+ \newcommand*{\footdir@LeftRightElse}{%
+ \footdir@write
+ \zifrefundefined{\thefootdir@label}{%
+ \footdir@debug{abspage ??: else}%
+ \ltx@thirdofthree
+ }{%
+ \edef\footdir@abspage{%
+ \zref@extractdefault{\thefootdir@label}{abspage}{0}%
+ }%
+ \ltx@ifundefined{footdir@\footdir@abspage}{%
+ \footdir@debug{\footdir@abspage: else}%
+ \ltx@thirdofthree
+ }{%
+ \if\csname footdir@\footdir@abspage\endcsname L%
+ \footdir@debug{\footdir@abspage: left}%
+ \expandafter\ltx@firstofthree
+ \else
+ \footdir@debug{\footdir@abspage: right}%
+ \expandafter\ltx@secondofthree
+ \fi
+ }%
+ }%
+ }%
+}
+\newcommand*{\footdir@fntext}[1]{%
+ \zifrefundefined{\thefootdir@label}{%
+ }{%
+ \edef\footdir@name{%
+ footdir@\zref@extractdefault{\thefootdir@label}{abspage}{0}%
+ }%
+ \@ifundefined{\footdir@name}{%
+ \expandafter\gdef\csname\footdir@name\endcsname{#1}%
+ }{}%
+ }%
+}
+
+\newcommand*{\footdir@temp}[3]{%
+ \@ifdefinable{#1}{%
+ \let#1#2%
+ \renewcommand{#2}[1]{%
+ \footdir@write
+ \footdir@fntext{#3}%
+ \stepcounter{footdir@label}%
+ \footdir@fntext{#3}%
+ \footdir@toks{##1}%
+ \footdir@toks\expandafter{%
+ \the\expandafter\footdir@toks
+ \expandafter
+ \zref@labelbyprops\expandafter{\thefootdir@label}{abspage}%
+ }%
+ \expandafter#1\expandafter{\the\footdir@toks}%
+ }%
+ }%
+}
+
+\def\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern -3\p@
\hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
-\def\left@footnote{%
+\def\left@footnoterule{%
\hrule width .4\columnwidth\kern 2.6\p@}
-\def\textwidth@footnote{\kern-3\p@
+\def\textwidth@footnoterule{\kern-3\p@
\hrule \@width \columnwidth \kern 2.6\p@}
-\def\right@footnoterule{\bidi@footnote@output\right@footnote\global\let\bidi@footnoterule\relax}
-\def\left@footnoterule{\bidi@footnote@output\left@footnote\global\let\bidi@footnoterule\relax}
-\def\textwidth@footnoterule{\bidi@footnote@output\textwidth@footnote\global\let\bidi@footnoterule\relax}
-\def\auto@footnoterule{\bidi@footnote@output
- \ifx\bidi@footnoterule\relax\if@RTL\right@footnote\else\left@footnote\fi\else\bidi@footnoterule\fi
- \global\let\bidi@footnoterule\relax}
-\def\leftfootnoterule{\def\footnoterule{\left@footnoterule}}
+\def\leftfootnoterule{%
+\bidi@autofootnoterulefalse%
+\def\footnoterule{\left@footnoterule}}
\let\LRfootnoterule=\leftfootnoterule
-\def\rightfootnoterule{\def\footnoterule{\right@footnoterule}}
-\def\textwidthfootnoterule{\def\footnoterule{\textwidth@footnoterule}}
-\def\autofootnoterule{\def\footnoterule{\auto@footnoterule}}
-\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
-\def\bidi@footnote@list{}
-\let\bidi@footnoterule\relax
+\def\rightfootnoterule{%
+\bidi@autofootnoterulefalse%
+\def\footnoterule{\right@footnoterule}}
+\def\textwidthfootnoterule{%
+\bidi@autofootnoterulefalse%
+\def\footnoterule{\textwidth@footnoterule}}
+
+
+
+\def\auto@footnoterule{%
+\footdir@LeftRightElse%
+\left@footnoterule%
+\right@footnoterule%
+\left@footnoterule%
+}
+
+
+
+\def\autofootnoterule{%
+\bidi@autofootnoteruletrue%
+\def\footnoterule{\auto@footnoterule}%
+}
+
+\newcommand*{\SplitFootnoteRule}{%
+ \gdef\split@prev{0}
+ \let\pagefootnoterule\footnoterule
+ \let\mpfootnoterule\footnoterule
+ \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@}
+ \def\footnoterule{\relax
+ \ifx \@listdepth\@mplistdepth
+ \mpfootnoterule
+ \else
+ \ifnum\split@prev=\z@
+ \pagefootnoterule
+ \else
+ \splitfootnoterule
+ \fi
+ \xdef\split@prev{\the\insertpenalties}%
+ \fi
+ }%
+}
+
+
+
+
\def\RTLfootnote{\@ifnextchar[\@xRTLfootnote{\stepcounter\@mpfn
\protected@xdef\@thefnmark{\thempfn}%
\@footnotemark\@RTLfootnotetext}}
@@ -10045,83 +10442,64 @@ bidi implementation of tufte title]
\unrestored@protected@xdef\@thefnmark{\thempfn}%
\endgroup
\@footnotemark\@LTRfootnotetext}
-\def\insertRTL{\bgroup\beginR\@RTLtrue}
-\def\endinsertRTL{\endR\egroup}
-\def\insertLTR{\bgroup\beginL\@RTLfalse}
-\def\endinsertLTR{\endL\egroup}
-\DeclareRobustCommand\InLTR{\insertLTR}
-\DeclareRobustCommand\EInLTR{\endinsertLTR}
-\DeclareRobustCommand\InRTL{\insertRTL}
-\DeclareRobustCommand\EInRTL{\endinsertRTL}
-\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}
-\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}
-\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
- \if@tempswa\if@RTL\@rtl\else\@ltr\fi\fi
- \xdef\bidi@this@footnote{\if@RTL\noexpand\right@footnote\else\noexpand\left@footnote\fi}%
-}
-\def\bidi@footnotetext@after{%
- {%
- \let\@elt\relax\let\right@footnote\relax\let\left@footnote\relax
- \dimen0=\ht\footins
- \advance\dimen0 by\dp\footins
- \xdef\bidi@footnote@list{\bidi@footnote@list\@elt{\the\dimen0}{\bidi@this@footnote}}%
- }%
-}
+
+
\def\setfootnoteRL{\@RTL@footnotetrue}
\def\unsetfootnoteRL{\@RTL@footnotefalse}
\def\setfootnoteLR{\unsetfootnoteRL}
-\long\def\@footnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@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\@RTLfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLtrue\reset@font\footnotesize
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+
+
+\long\def\@RTLfootnotetext#1{\insert\footins{%
+ \@RTLtrue%
+ \reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@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
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+
+\long\def\@LTRfootnotetext#1{\insert\footins{%
+ \@RTLfalse%
+ \reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@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}
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+
+\footdir@temp\footdir@ORG@bidi@footnotetext\@footnotetext{\if@RTL@footnote R\else L\fi}%
+\footdir@temp\footdir@ORG@bidi@RTLfootnotetext\@RTLfootnotetext{R}%
+\footdir@temp\footdir@ORG@bidi@LTRfootnotetext\@LTRfootnotetext{L}%
+
\long\def\@mpRTLfootnotetext#1{%
+ \ifbidi@autofootnoterule\ifnum\c@mpfootnote=1\rightfootnoterule\fi\fi%
\global\setbox\@mpfootins\vbox{\@RTLtrue%
\unvbox\@mpfootins
\reset@font\footnotesize
@@ -10130,12 +10508,11 @@ bidi implementation of tufte title]
\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{%
+ \ifbidi@autofootnoterule\ifnum\c@mpfootnote=1\leftfootnoterule\fi\fi%
\global\setbox\@mpfootins\vbox{\@RTLfalse%
\unvbox\@mpfootins
\reset@font\footnotesize
@@ -10144,12 +10521,11 @@ bidi implementation of tufte title]
\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\@mpfootnotetext#1{%
+ \ifbidi@autofootnoterule\ifnum\c@mpfootnote=1\if@RTL@footnote\rightfootnoterule\else\leftfootnoterule\fi\fi\fi%
\global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
\unvbox\@mpfootins
\reset@font\footnotesize
@@ -10158,8 +10534,6 @@ bidi implementation of tufte title]
\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}}
@@ -11101,11 +11475,11 @@ bidi implementation of tufte title]
{\if@RTL\raggedleft\else\raggedright\fi \toname \\ \toaddress \par}%
\vspace{2\parskip}%
#1\par\nobreak}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-\p@
\hrule \@width .4\columnwidth
\kern .6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-\p@
@@ -11231,7 +11605,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{loadingorder-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{loadingorder-bidi.def}[2012/01/01 v0.8a making sure that bidi is the last package loaded]
+\ProvidesFile{loadingorder-bidi.def}[2012/12/12 v0.9 making sure that bidi is the last package loaded]
\bidi@isloaded{amsmath}
\bidi@isloaded{amsthm}
\bidi@isloaded{breqn}
@@ -11254,6 +11628,7 @@ bidi implementation of tufte title]
\bidi@isloaded{ntheorem-hyper}
\bidi@isloaded{hyperref}
\bidi@isloaded{fancyhdr}
+\bidi@isloaded{fix2col}
\bidi@isloaded{draftwatermark}
\bidi@isloaded{empheq}
\bidi@isloaded{pdfpages}
@@ -11282,6 +11657,7 @@ bidi implementation of tufte title]
\bidi@isloaded{tabls}
\bidi@isloaded{tabulary}
\bidi@isloaded{tocstyle}
+\bidi@isloaded{tocbibind}
\bidi@isloaded{fontspec}
\bidi@isloaded{arabxetex}
\bidi@isloaded{polyglossia}
@@ -11435,6 +11811,9 @@ bidi implementation of tufte title]
\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@tocbibindloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tocbibind after bidi package. Please load package tocbibind before bidi package, and then try to run xelatex on your document again}{}]{tocbibind}
+ \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%
@@ -11455,7 +11834,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{longtable-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{longtable-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for longtable package for XeTeX engine]
+\ProvidesFile{longtable-xetex-bidi.def}[2012/12/12 v0.2 bidi adaptations for longtable package for XeTeX engine]
\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}%
@@ -11466,6 +11845,20 @@ bidi implementation of tufte title]
\fi
\endgraf\vskip\baselineskip}%
\hss}}}
+\def\LT@startpbox#1{%
+ \bgroup
+ \let\@footnotetext\LT@p@ftntext
+ \let\@LTRfootnotetext\LT@p@LTRftntext
+ \let\@RTLfootnotetext\LT@p@RTLftntext
+ \setlength\hsize{#1}%
+ \@arrayparboxrestore
+ \vrule \@height \ht\@arstrutbox \@width \z@}
+\def\LT@p@LTRftntext#1{%
+ \edef\@tempa{\the\LT@p@ftn\noexpand\LTRfootnotetext[\the\c@footnote]}%
+ \global\LT@p@ftn\expandafter{\@tempa{#1}}}%
+\def\LT@p@RTLftntext#1{%
+ \edef\@tempa{\the\LT@p@ftn\noexpand\RTLfootnotetext[\the\c@footnote]}%
+ \global\LT@p@ftn\expandafter{\@tempa{#1}}}%
% \end{macrocode}
% \iffalse
%</longtable-xetex-bidi.def>
@@ -11789,11 +12182,11 @@ bidi implementation of tufte title]
\hsize\textwidth
\columnwidth\textwidth
\orig@RTLfootnotetext{#1}\endgroup}
-\def\right@footnote{%
+\def\right@footnoterule{%
\hbox to \textwidth
{\beginR \vbox{\kern -3\p@
\hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
-\def\textwidth@footnote{\kern-3\p@
+\def\textwidth@footnoterule{\kern-3\p@
\hrule \@width \textwidth \kern 2.6\p@}
% \end{macrocode}
% \iffalse
@@ -12367,13 +12760,13 @@ bidi implementation of tufte title]
\else
\renewcommand*\l@chapter{\@regtocline{0}}
\fi
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\kern.5\baselineskip
\hrule\@width\unitindent
\kern.4\baselineskip
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -12414,9 +12807,9 @@ bidi implementation of tufte title]
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\long\def\@makefntext##1{\parindent\z@
\def\labelitemi{\textendash}\@revlabeltrue
@@ -12558,9 +12951,9 @@ bidi implementation of tufte title]
\renewcommand*\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\let \LTRfootnote \LTRthanks
\let \RTLfootnote \RTLthanks
@@ -12798,13 +13191,13 @@ bidi implementation of tufte title]
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\kern.5\baselineskip
\hrule\@width\unitindent
\kern.4\baselineskip
}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -12827,9 +13220,9 @@ bidi implementation of tufte title]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let\footnote\thanks
\let\LTRfootnote\LTRthanks
\let\RTLfootnote\RTLthanks
@@ -12965,11 +13358,11 @@ bidi implementation of tufte title]
\renewcommand\secshape{\if@RTL\rightskip\else\leftskip\fi=-\leftmarginwidth%
\if@RTL\leftskip\else\rightskip\fi=\@flushglue%
\hyphenpenalty=2000}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern 2.6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -13032,9 +13425,9 @@ bidi implementation of tufte title]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let \footnote \thanks
\let \LTRfootnote \LTRthanks
\let \RTLfootnote \RTLthanks
@@ -13155,11 +13548,11 @@ bidi implementation of tufte title]
\penalty\@highpenalty
\endgroup
\fi}
-\renewcommand\left@footnote{%
+\renewcommand\left@footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}
-\renewcommand\right@footnote{%
+\renewcommand\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -13268,14 +13661,14 @@ bidi implementation of tufte title]
\def\@@makefnmark{\hbox{\ftnm@font{#4}}}%
}
\deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\normalsize\ftn@rule@test@values
\kern-\dimexpr 2.6\p@+\ftn@rule@height\relax
\ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
{\usekomafont{footnoterule}{%
\hrule \@height\ftn@rule@height \@width\ftn@rule@width}}%
\kern 2.6\p@}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern -3\p@
\normalsize\ftn@rule@test@values
@@ -13291,9 +13684,9 @@ bidi implementation of tufte title]
#1%
}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let\footnote\thanks
\let\LTRfootnote\LTRthanks
\let\RTLfootnote\RTLthanks
@@ -13588,12 +13981,12 @@ bidi implementation of tufte title]
\fi
\bib@endhook
}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
\hrule\@width.4\columnwidth
\kern 2.6\p@}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -13743,14 +14136,14 @@ bidi implementation of tufte title]
\def\@@makefnmark{\hbox{\ftnm@font{#4}}}%
}
\deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\normalsize\ftn@rule@test@values
\kern-\dimexpr 2.6\p@+\ftn@rule@height\relax
\ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
{\usekomafont{footnoterule}{%
\hrule \@height\ftn@rule@height \@width\ftn@rule@width}}%
\kern 2.6\p@}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern -3\p@
\normalsize\ftn@rule@test@values
@@ -13766,9 +14159,9 @@ bidi implementation of tufte title]
#1%
}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let\footnote\thanks
\let\LTRfootnote\LTRthanks
\let\RTLfootnote\RTLthanks
@@ -14119,12 +14512,12 @@ bidi implementation of tufte title]
\fi
\bib@endhook
}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
\hrule\@width.4\columnwidth
\kern 2.6\p@}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -14253,10 +14646,10 @@ bidi implementation of tufte title]
}
\deffootnote[1em]{1.5em}{1em}
{\textsuperscript{\thefootnotemark}}
-\def\left@footnote{\kern-1\p@
+\def\left@footnoterule{\kern-1\p@
\hrule width 0.4\columnwidth
\kern .6\p@}
-\def\right@footnote{%
+\def\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern -3\p@
\kern-1\p@
@@ -14391,14 +14784,14 @@ bidi implementation of tufte title]
\def\@@makefnmark{\hbox{\ftnm@font{#4}}}%
}
\deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\normalsize\ftn@rule@test@values
\kern-\dimexpr 2.6\p@+\ftn@rule@height\relax
\ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
{\usekomafont{footnoterule}{%
\hrule \@height\ftn@rule@height \@width\ftn@rule@width}}%
\kern 2.6\p@}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{\kern -3\p@
\normalsize\ftn@rule@test@values
@@ -14414,9 +14807,9 @@ bidi implementation of tufte title]
#1%
}%
\let\footnotesize\small
- \let\right@footnote\relax
- \let\left@footnote\relax
- \let\textwidth@footnote\relax
+ \let\right@footnoterule\relax
+ \let\left@footnoterule\relax
+ \let\textwidth@footnoterule\relax
\let\footnote\thanks
\let\LTRfootnote\LTRthanks
\let\RTLfootnote\RTLthanks
@@ -14724,12 +15117,12 @@ bidi implementation of tufte title]
\fi
\bib@endhook
}
-\renewcommand*\left@footnote{%
+\renewcommand*\left@footnoterule{%
\kern-3\p@
\ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
\hrule\@width.4\columnwidth
\kern 2.6\p@}
-\renewcommand*\right@footnote{%
+\renewcommand*\right@footnoterule{%
\hbox to \columnwidth
{\beginR \vbox{%
\kern-3\p@
@@ -15061,7 +15454,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{tocbibind-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{tocbibind-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for tocbibind package for XeTeX engine]
+\ProvidesFile{tocbibind-xetex-bidi.def}[2012/12/12 v0.3 bidi adaptations for tocbibind package for XeTeX engine]
\if@dotocbib
\@ifpackageloaded{natbib}{}{% natbib not loaded
\renewcommand{\bibsection}{\t@cb@bchapsec}
@@ -15092,6 +15485,55 @@ bidi implementation of tufte title]
{}
\fi
+\if@inltxdoc\else
+ \renewenvironment{theindex}%
+ {\if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+ \if@bibchapter
+ \if@donumindex
+ \refstepcounter{chapter}
+ \twocolumn[\vspace*{2\topskip}%
+ \@makechapterhead{\indexname}]%
+ \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}\indexname}
+ \chaptermark{\indexname}
+ \else
+ \if@dotocind
+ \twocolumn[\vspace*{2\topskip}%
+ \@makeschapterhead{\indexname}]%
+ \prw@mkboth{\indexname}
+ \addcontentsline{toc}{chapter}{\indexname}
+ \else
+ \twocolumn[\vspace*{2\topskip}%
+ \@makeschapterhead{\indexname}]%
+ \prw@mkboth{\indexname}
+ \fi
+ \fi
+ \else
+ \if@donumindex
+ \twocolumn[\vspace*{-1.5\topskip}%
+ \@nameuse{\@tocextra}{\indexname}]%
+ \csname \@tocextra mark\endcsname{\indexname}
+ \else
+ \if@dotocind
+ \twocolumn[\vspace*{-1.5\topskip}%
+ \toc@headstar{\@tocextra}{\indexname}]%
+ \prw@mkboth{\indexname}
+ \addcontentsline{toc}{\@tocextra}{\indexname}
+ \else
+ \twocolumn[\vspace*{-1.5\topskip}%
+ \toc@headstar{\@tocextra}{\indexname}]%
+ \prw@mkboth{\indexname}
+ \fi
+ \fi
+ \fi
+ \thispagestyle{plain}\parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem}
+ {\if@restonecol\onecolumn\else\clearpage\fi}
+\fi
% \end{macrocode}
% \iffalse
%</tocbibind-xetex-bidi.def>
@@ -15861,7 +16303,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{xetex-bidi.def}[2012/07/25 v1.0.4 bidi adaptations for XeTeX engine]
+\ProvidesFile{xetex-bidi.def}[2012/12/12 v1.0.6 bidi adaptations for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate=1 }
\newcommand{\TeXXeTOff}{\TeXXeTstate=0 }
\TeXXeTOn
@@ -16098,7 +16540,7 @@ bidi implementation of tufte title]
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi\fi
- \ignorespaces}{\endtrivlist}
+ \ignorespaces}{\vskip\z@}
\newenvironment{RTLitems}
{\par\@RTLtrue
\if@bidi@list@minipage@parbox
@@ -16107,7 +16549,7 @@ bidi implementation of tufte title]
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi\fi
- \ignorespaces}{\endtrivlist}
+ \ignorespaces}{\vskip\z@}
\newenvironment{LTRbibitems}
{\par\@RTLfalse
\if@bidi@list@minipage@parbox
@@ -16116,7 +16558,7 @@ bidi implementation of tufte title]
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi\fi
- \ignorespaces}{\endtrivlist}
+ \ignorespaces}{\vskip\z@}
\newenvironment{RTLbibitems}
{\par\@RTLtrue
\if@bidi@list@minipage@parbox
@@ -16125,7 +16567,7 @@ bidi implementation of tufte title]
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi\fi
- \ignorespaces}{\endtrivlist}
+ \ignorespaces}{\vskip\z@}
\def\raggedright{%
\let\\\@centercr
\rightskip\z@skip\rightskip\@flushglue
@@ -16503,6 +16945,9 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\def\leqno{\ifnum\predisplaydirection<\z@ \bidi@saved@eqno \else \bidi@saved@leqno \fi}
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
+\if@bidi@csundef{@idxitem}{}{%
+\renewcommand\@idxitem{\par\hangindent \if@RTL-\fi40\p@}%
+}
\@ifclassloaded{article}{\@ifclassloaded{svmult}{}{\input{article-xetex-bidi.def}}}{}
\@ifclassloaded{extarticle}{\input{extarticle-xetex-bidi.def}}{}
\@ifclassloaded{artikel1}{\input{artikel1-xetex-bidi.def}}{}
@@ -16549,6 +16994,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{hyperref}{\input{hyperref-xetex-bidi.def}}{}
\@ifpackageloaded{ntheorem-hyper}{\input{ntheorem-hyper-xetex-bidi.def}}{}
\@ifpackageloaded{fancyhdr}{\input{fancyhdr-xetex-bidi.def}}{}
+\@ifpackageloaded{fix2col}{\input{fix2col-xetex-bidi.def}}{}
\@ifpackageloaded{draftwatermark}{\input{draftwatermark-xetex-bidi.def}}{}
\@ifpackageloaded{dblfnote}{\input{dblfnote-xetex-bidi.def}}{}
\@ifpackageloaded{empheq}{\input{empheq-xetex-bidi.def}}{}
@@ -18293,7 +18739,7 @@ dynamic frame when using one of the \cmdname{Ncolumntop} type of commands.
\mobile{۰۹۱۸۹۶۹۴۹۶}
\phone{۹۸۹۰۸۳۴۱}
\fax{۹۸۹۰۸۳۴۲}
-\email{vafakhlg@gmail.com}
+\email{vafak12@gmail.com}
\extrainfo{اطلاعات اضافی}
\photo[64pt]{picture}
\quote{نقل قول}
@@ -18366,7 +18812,7 @@ dynamic frame when using one of the \cmdname{Ncolumntop} type of commands.
\mobile{۰۹۱۸۹۶۹۴۹۶}
\phone{۹۸۹۰۸۳۴۱}
\fax{۹۸۹۰۸۳۴۲}
-\email{vafakhlg@gmail.com}
+\email{vafak12@gmail.com}
\extrainfo{اطلاعات اضافی}
\photo[64pt]{picture}
\quote{نقل قول}
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.ins b/Master/texmf-dist/source/latex/bidi/bidi.ins
index e947517b85c..edd45a86bfb 100644
--- a/Master/texmf-dist/source/latex/bidi/bidi.ins
+++ b/Master/texmf-dist/source/latex/bidi/bidi.ins
@@ -24,7 +24,7 @@
\endpreamble
\postamble
-Copyright © 2009–2012 Vafa Khalighi <vafakhlg@gmail.com>
+Copyright © 2009–2012 Vafa Khalighi <vafak12@gmail.com>
It may be distributed and/or modified under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -50,6 +50,7 @@ by Vafa Khalighi.
\generate{\file{bidi2in1.sty}{\from{\jobname.dtx}{bidi2in1.sty}}}
\generate{\file{bidicode.sty}{\from{\jobname.dtx}{bidicode.sty}}}
\generate{\file{bidiftnxtra.sty}{\from{\jobname.dtx}{bidiftnxtra.sty}}}
+\generate{\file{bidi-longtable.sty}{\from{\jobname.dtx}{bidi-longtable.sty}}}
\generate{\file{bidimoderncv.cls}{\from{\jobname.dtx}{bidimoderncv.cls}}}
\generate{\file{biditools.sty}{\from{\jobname.dtx}{biditools.sty}}}
\generate{\file{bidituftefloat.sty}{\from{\jobname.dtx}{bidituftefloat.sty}}}
@@ -84,6 +85,7 @@ by Vafa Khalighi.
\generate{\file{extrafootnotefeatures.def}{\from{\jobname.dtx}{extrafootnotefeatures.def}}}
\generate{\file{extreport-xetex-bidi.def}{\from{\jobname.dtx}{extreport-xetex-bidi.def}}}
\generate{\file{fancyhdr-xetex-bidi.def}{\from{\jobname.dtx}{fancyhdr-xetex-bidi.def}}}
+\generate{\file{fix2col-xetex-bidi.def}{\from{\jobname.dtx}{fix2col-xetex-bidi.def}}}
\generate{\file{fleqn-xetex-bidi.def}{\from{\jobname.dtx}{fleqn-xetex-bidi.def}}}
\generate{\file{float-xetex-bidi.def}{\from{\jobname.dtx}{float-xetex-bidi.def}}}
\generate{\file{flowfram-xetex-bidi.def}{\from{\jobname.dtx}{flowfram-xetex-bidi.def}}}
@@ -139,7 +141,7 @@ by Vafa Khalighi.
\generate{\file{xltxtra-xetex-bidi.def}{\from{\jobname.dtx}{xltxtra-xetex-bidi.def}}}
\endbatchfile
%%
-%% Copyright © 2009–2012 Vafa Khalighi <vafakhlg@gmail.com>
+%% Copyright © 2009–2012 Vafa Khalighi <vafak12@gmail.com>
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of