diff options
author | Karl Berry <karl@freefriends.org> | 2011-11-28 23:44:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-11-28 23:44:47 +0000 |
commit | eab43500db8fdd78f70d0eaff72729a7cdaeea92 (patch) | |
tree | 20cab65274bfe78b9c235541bfbb7e43037e9d10 /Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def | |
parent | 943060c95de767f07c7b00d0637d3fc96a08486f (diff) |
bidi (28nov11)
git-svn-id: svn://tug.org/texlive/trunk@24680 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def | 128 |
1 files changed, 43 insertions, 85 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def index ab9b5daf6a2..c55abc9b373 100644 --- a/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{multicol-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for multicol package for XeTeX engine] +\ProvidesFile{multicol-xetex-bidi.def}[2011/11/18 v0.2 bidi adaptations for multicol package for XeTeX engine] \def\revprocess@cols#1#2{\count@\doublecol@number\relax \advance\count@ by -2 \loop #2% @@ -70,94 +70,52 @@ Grid alignment might be broken}% \fi } +\def\multicols#1{\col@number#1\relax + \ifnum\col@number<\tw@ + \PackageWarning{multicol}% + {Using `\number\col@number' + columns doesn't seem a good idea.^^J + I therefore use two columns instead}% + \col@number\tw@ \fi + \ifnum\col@number>10 + \PackageError{multicol}% + {Too many columns}% + {Current implementation doesn't + support more than 10 columns.% + \MessageBreak + I therefore use 10 columns instead}% + \col@number10 \fi + \ifx\@footnotetext\mult@footnotetext\else + \let\orig@footnotetext\@footnotetext + \let\@footnotetext\mult@footnotetext + \fi + \ifx\@LTRfootnotetext\mult@LTRfootnotetext\else + \let\orig@LTRfootnotetext\@LTRfootnotetext + \let\@LTRfootnotetext\mult@LTRfootnotetext + \fi + \ifx\@RTLfootnotetext\mult@RTLfootnotetext\else + \let\orig@RTLfootnotetext\@RTLfootnotetext + \let\@RTLfootnotetext\mult@RTLfootnotetext + \fi + \@ifnextchar[\mult@cols{\mult@cols[]}} +\long\def\mult@footnotetext#1{\begingroup + \hsize\textwidth + \columnwidth\textwidth + \orig@footnotetext{#1}\endgroup} +\long\def\mult@LTRfootnotetext#1{\begingroup + \hsize\textwidth + \columnwidth\textwidth + \orig@LTRfootnotetext{#1}\endgroup} +\long\def\mult@RTLfootnotetext#1{\begingroup + \hsize\textwidth + \columnwidth\textwidth + \orig@RTLfootnotetext{#1}\endgroup} \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}} +\def\textwidth@footnote{\kern-3\p@ + \hrule \@width \textwidth \kern 2.6\p@} %% %% Copyright © 2009–2012 Vafa Khalighi <vafaklg@gmail.com> %% |