summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bidi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-28 23:44:47 +0000
committerKarl Berry <karl@freefriends.org>2011-11-28 23:44:47 +0000
commiteab43500db8fdd78f70d0eaff72729a7cdaeea92 (patch)
tree20cab65274bfe78b9c235541bfbb7e43037e9d10 /Master/texmf-dist/tex/latex/bidi
parent943060c95de767f07c7b00d0637d3fc96a08486f (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')
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidi-logo.pdfbin12525 -> 0 bytes
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidi.sty4
-rw-r--r--Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def18
-rw-r--r--Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def128
-rw-r--r--Master/texmf-dist/tex/latex/bidi/xetex-bidi.def22
6 files changed, 72 insertions, 102 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi-logo.pdf b/Master/texmf-dist/tex/latex/bidi/bidi-logo.pdf
deleted file mode 100644
index 700321cee9a..00000000000
--- a/Master/texmf-dist/tex/latex/bidi/bidi-logo.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty
index 51421af11b6..e442be44b8d 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidi.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2012/01/01}
-\def\bidiversion{v11.147}
+\def\bidiversion{v11.150}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -29,7 +29,6 @@ Location on CTAN: /macros/latex/contrib/bidi}
\typeout{\bidiinfo}
\edef\bidi@everyjob{\the\everyjob}
\everyjob{\bidi@everyjob\typeout{\bidiinfo}}
-\RequirePackage{graphicx}
\RequirePackage{iftex}
\RequirePackage{biditools}
\eqnewif{\if@RTLmain}{\if@rlmain}
@@ -73,7 +72,6 @@ Location on CTAN: /macros/latex/contrib/bidi}
\fi
\input{loadingorder-bidi.def}
\ProcessOptions
-\newcommand{\bidilogo}[1][]{\includegraphics[#1]{bidi-logo}}
%%
%% Copyright © 2009–2012 Vafa Khalighi <vafaklg@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def b/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def
index d8b03a322b5..ada72ce743e 100644
--- a/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def
+++ b/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def
@@ -219,9 +219,15 @@
\newinsert\@mpfootinsv@r
\bidi@ensure@newcommand{\mp@footgroupv@r}{}
\newcount\m@m@k \newdimen\m@m@h
+\@ifpackageloaded{multicol}{%
\bidi@ensure@newcommand*{\m@mrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3
+ \hsize\textwidth
\@@line{\if@RTLcolumnfootnotes\beginR\fi\splittopskip=\m@m@h \vbadness=\@M \hfilneg
\valign{##\vfill\cr\m@mdosplits}\if@RTLcolumnfootnotes\endR\fi}}
+}{%
+\bidi@ensure@newcommand*{\m@mrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3
+ \@@line{\if@RTLcolumnfootnotes\beginR\fi\splittopskip=\m@m@h \vbadness=\@M \hfilneg
+ \valign{##\vfill\cr\m@mdosplits}\if@RTLcolumnfootnotes\endR\fi}}}
\bidi@ensure@newcommand*{\m@mdosplits}{\ifnum\m@m@k>0 \noalign{\hfil}\m@msplitoff
\global\advance\m@m@k-1\cr\m@mdosplits\fi}
\bidi@ensure@newcommand*{\m@msplitoff}{\dimen0=\ht0
@@ -1562,8 +1568,10 @@
\bidi@ensure@newcommand*{\m@minterparanoteglue}[1]{%
{\foottextfont\global\m@mipn@skip=#1\relax}}
\m@minterparanoteglue{1em plus.4em minus.4em}
+\@ifpackageloaded{multicol}{%
\bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{%
\if@parafootRTL\@RTLtrue\else\@RTLfalse\fi%
+ \hsize\textwidth%
\setbox0=\hbox{}%
\loop
\unpenalty
@@ -1571,6 +1579,16 @@
\ifhbox2
\setbox0=\hbox{\box2\unhbox0}
\repeat}
+}{%
+\bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{%
+ \if@parafootRTL\@RTLtrue\else\@RTLfalse\fi%
+ \setbox0=\hbox{}%
+ \loop
+ \unpenalty
+ \setbox2=\lastbox
+ \ifhbox2
+ \setbox0=\hbox{\box2\unhbox0}
+ \repeat}}
\bidi@ensure@newcommand*{\m@mremovehboxes}{\setbox0=\lastbox
\ifhbox0{\m@mremovehboxes}\unhbox0 \fi}
\bidi@ensure@newcommand*{\footfudgefiddle}{64}
diff --git a/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
index 08722ce35ac..5aa0a681878 100644
--- a/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
@@ -46,7 +46,7 @@
\def\left@footnote{%
\hrule width .4\columnwidth\kern 2.6\p@}
\def\textwidth@footnote{\kern-3\p@
- \hrule \@width \textwidth \kern 2.6\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}
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>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
index 01c45a539d6..4294c2eec89 100644
--- a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
@@ -279,20 +279,12 @@
\ignorespaces}{\endtrivlist}
\def\raggedright{%
\let\\\@centercr
- \leftskip\z@skip\rightskip\@flushglue
- \parindent\z@\parfillskip\z@skip}
-\let\@@raggedleft=\raggedleft
-\let\@@raggedright=\raggedright
-\renewcommand\raggedleft{\if@RTL\@@raggedright%
- \else\@@raggedleft\fi}
-\renewcommand\raggedright{\if@RTL\@@raggedleft%
- \else\@@raggedright\fi}
-\def\raggedright{%
- \let\\\@centercr
\rightskip\z@skip\rightskip\@flushglue
\parindent\z@\parfillskip\z@skip}
-\renewcommand\raggedleft{\@@raggedleft}
-\renewcommand\raggedright{\@@raggedright}
+\let\bidi@orig@raggedleft\raggedleft
+\let\bidi@orig@raggedright\raggedright
+\renewcommand\raggedleft{\if@bidi@list@minipage@parbox\bidi@orig@raggedright\else\if@RTLtab\bidi@orig@raggedright\else\bidi@orig@raggedleft\fi\fi}
+\renewcommand\raggedright{\if@bidi@list@minipage@parbox\bidi@orig@raggedleft\else\if@RTLtab\bidi@orig@raggedleft\else\bidi@orig@raggedright\fi\fi}
\newcommand{\bidi@raggedright}{\if@RTL\raggedleft\else\raggedright\fi}
\newcommand{\bidi@raggedleft}{\if@RTL\raggedright\else\raggedleft\fi}
\def\centerline#1{%
@@ -304,6 +296,10 @@
\def\rightline#1{%
\if@RTL\@@line{\hss\beginR#1\endR}
\else\@@line{\hss#1}\fi}
+\let\bidi@orig@leftline\leftline
+\let\bidi@orig@rightline\rightline
+\def\leftline#1{\ifhmode\if@RTL\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@rightline{#1}\else\if@RTLtab\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\fi\fi}
+\def\rightline#1{\ifhmode\if@RTL\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@leftline{#1}\else\if@RTLtab\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\fi\fi}
\def\bidirlap#1{\hb@xt@\z@{\if@RTL\hss\fi#1\if@RTL\else\hss\fi}}
\def\bidillap#1{\hb@xt@\z@{\if@RTL\else\hss\fi#1\if@RTL\hss\fi}}
\def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
@@ -652,7 +648,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\hb@xt@\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}%
\fi
\vskip\belowcaptionskip}
-\everydisplay\expandafter{\the\everydisplay\predisplaydirection=0 }
+\everydisplay\expandafter{\the\everydisplay\if@bidi@list@minipage@parbox\predisplaydirection=1\else\if@RTLtab\predisplaydirection=1\else\predisplaydirection=0\fi\fi }
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
\@ifclassloaded{article}{\@ifclassloaded{svmult}{}{\input{article-xetex-bidi.def}}}{}