diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2011-08-02 18:37:42 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2011-08-02 18:37:42 +0000 |
commit | ff94e44b3898f59065c492d5e5e597234f1b49b1 (patch) | |
tree | ca2da7b855c1964f46c29a41ed2e2c50be200d9f /Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def | |
parent | 2880aaf97110f638a133d7ba59e8ecbd15150b2f (diff) |
bidi v1.2.4
git-svn-id: svn://tug.org/texlive/trunk@23326 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def | 74 |
1 files changed, 64 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def b/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def index 69ccd937d76..2de5239b6b3 100644 --- a/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def +++ b/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def @@ -12,7 +12,10 @@ %% License information appended. %% %% -\ProvidesFile{extrafootnotefeatures}[2011/03/01 v0.1 bidi extra footnote features for XeTeX engine] +\ProvidesFile{extrafootnotefeatures}[2011/08/01 v0.2 bidi extra footnote features for XeTeX engine] +\newif\if@parafootRTL +\newcommand{\setRTLparagraphfootnotes}{\@parafootRTLtrue} +\newcommand{\setLTRparagraphfootnotes}{\@parafootRTLfalse} \let\m@mold@footnotetext\@footnotetext \let\m@mold@LTRfootnotetext\@LTRfootnotetext \let\m@mold@RTLfootnotetext\@RTLfootnotetext @@ -99,11 +102,8 @@ \m@mdoextrafeetendmini \@minipagefalse \color@endgroup - \egroup - \if@RTL\endL\fi \egroup - \egroup - \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa\leavevmode}} + \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}} \newcommand{\m@make@footstart}[1]{% \@namedef{@footstart#1}{% \vskip\bigskipamount @@ -1408,7 +1408,9 @@ \newcommand*{\m@minterparanoteglue}[1]{% {\foottextfont\global\m@mipn@skip=#1\relax}} \m@minterparanoteglue{1em plus.4em minus.4em} -\newcommand*{\m@mmakehboxofhboxes}{\setbox0=\hbox{}% +\newcommand*{\m@mmakehboxofhboxes}{% + \if@parafootRTL\@RTLtrue\else\@RTLfalse\fi% + \setbox0=\hbox{}% \loop \unpenalty \setbox2=\lastbox @@ -1421,11 +1423,15 @@ \newcommand{\paragraphfootnotes}{% \@namedef{foottextfontv@r}{\foottextfont}% % [RS] \let\@footnotetext\@parafootnotetext + \let\@LTRfootnotetext\@paraLTRfootnotetext + \let\@RTLfootnotetext\@paraRTLfootnotetext \dimen\footinsv@r=\footinsdim \count\footinsv@r=1000\relax \m@make@para@footgroup{v@r}% \let\@footgroupv@r\@para@footgroupv@r \let\@mpfootnotetext\@mpparafootnotetext + \let\@mpLTRfootnotetext\@mpparaLTRfootnotetext + \let\@mpRTLfootnotetext\@mpparaRTLfootnotetext \m@make@mppara@footgroup{v@r}% \let\mp@footgroupv@r\@mppara@footgroupv@r {\foottextfont @@ -1433,7 +1439,29 @@ \multiply\dimen0 by 1024 \divide\dimen0 by \hsize \multiply\dimen0 by \footfudgefiddle \xdef\footfudgefactor{\expandafter\strip@pt\dimen0 }}} -\newcommand{\@parafootnotetext}[1]{\insert\footinsv@r{ +\newcommand{\@parafootnotetext}[1]{\insert\footinsv@r{\@RTLfalse + \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font\foottextfont + \@preamfntext + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark}% + \setbox0=\vbox{\hsize=\maxdimen + \color@begingroup + \noindent \@parafootfmt{\if@RTL@footnote\beginR\else\beginL\fi#1\if@RTL@footnote\endR\else\endL\fi}% + \color@endgroup}% + \m@mungebox}\m@mmf@prepare} +\newcommand{\@paraLTRfootnotetext}[1]{\insert\footinsv@r{\@RTLfalse + \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font\foottextfont + \@preamfntext + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark}% + \setbox0=\vbox{\hsize=\maxdimen + \color@begingroup + \noindent \@parafootfmt{\beginL#1\endL}% + \color@endgroup}% + \m@mungebox}\m@mmf@prepare} +\newcommand{\@paraRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLfalse \def\baselinestretch{\m@m@footnote@spacing}% \reset@font\foottextfont \@preamfntext @@ -1441,7 +1469,7 @@ \csname p@footnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@parafootfmt{#1}% + \noindent \@parafootfmt{\beginR#1\endR}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} \newcommand{\@parafootfmt}[1]{% @@ -1449,7 +1477,33 @@ \parfillskip=0pt \@plus 1fil {\footfootmark\strut {\foottextfont #1}\penalty-10}} \newcommand{\@mpparafootnotetext}[1]{% - \global\setbox\@mpfootinsv@r\vbox{% + \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse% + \unvbox\@mpfootinsv@r + \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font\foottextfont + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@mpfootnote\endcsname\@thefnmark}% + \setbox0=\vbox{\hsize=\maxdimen + \color@begingroup + \noindent \@parafootfmt{\if@RTL@footnote\beginR\else\beginL\fi#1\if@RTL@footnote\endR\else\endL\fi}% + \color@endgroup}% + \m@mungebox}\m@mmf@prepare} +\newcommand{\@mpparaLTRfootnotetext}[1]{% + \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse% + \unvbox\@mpfootinsv@r + \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font\foottextfont + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@mpfootnote\endcsname\@thefnmark}% + \setbox0=\vbox{\hsize=\maxdimen + \color@begingroup + \noindent \@parafootfmt{\beginL#1\endL}% + \color@endgroup}% + \m@mungebox}\m@mmf@prepare} +\newcommand{\@mpparaRTLfootnotetext}[1]{% + \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse% \unvbox\@mpfootinsv@r \def\baselinestretch{\m@m@footnote@spacing}% \reset@font\foottextfont @@ -1458,7 +1512,7 @@ \csname p@mpfootnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@parafootfmt{#1}% + \noindent \@parafootfmt{\beginR#1\endR}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} \newcommand{\paragraphfootstyle}[1]{% |