diff options
author | Karl Berry <karl@freefriends.org> | 2011-08-13 22:20:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-08-13 22:20:31 +0000 |
commit | 878253a4b3b9dc4e9da23f4aaffb88d5d3cf6dff (patch) | |
tree | f4e789c6ededae6b17abfd6fe380078b2304cfaa /Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def | |
parent | ea057cd7f2919f3cf5652e61cbb7d58abbf59ef5 (diff) |
bidi (13aug11)
git-svn-id: svn://tug.org/texlive/trunk@23543 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def | 80 |
1 files changed, 79 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def index 8650bce313d..6ec3afaf909 100644 --- a/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def @@ -12,7 +12,7 @@ %% License information appended. %% %% -\ProvidesFile{scrartcl-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for scrartcl class for XeTeX engine] +\ProvidesFile{scrartcl-xetex-bidi.def}[2011/08/13 v0.4 bidi adaptations for scrartcl class for XeTeX engine] \renewcommand*\maketitle[1][1]{% \if@titlepage \begin{titlepage} @@ -335,6 +335,84 @@ \renewcommand\marginline[1]{% \marginpar[\if@RTL\raggedright\else\raggedleft\fi{#1}]{\if@RTL\raggedleft\else\raggedright\fi #1}% } +\renewcommand{\@@makecaption}[3]{% + \cap@margin + \ifonelinecaptions + \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}% + \let\scr@tmp@footnotetext=\@footnotetext + \let\@footnotetext=\@gobble + \sbox\@tempboxa{% + {\capfont{\strut\ignorespaces + #1{{\caplabelfont{#2\captionformat}}}% + #3\unskip\strut}}% + }% + \let\@footnotetext=\scr@tmp@footnotetext + \let\scr@tmp@footnotetext=\undefined + \setcounter{footnote}{\@tempcntb}% + \setcounter{mpfootnote}{\@tempcnta}% + \else + \sbox\@tempboxa{\hspace*{2\cap@width}}% + \fi + \begingroup% + \setlength{\@tempdima}{\cap@width}% + \ifdim \wd\@tempboxa >\@tempdima + \hb@xt@\hsize{% + \setbox\@tempboxa\vbox{\hsize=\cap@width + \ifdofullc@p + {\capfont{\@hangfrom{\scr@smashdp{\strut\ignorespaces + #1{{\caplabelfont{#2\captionformat}}}}}% + {#3\unskip\strut\par}}}% + \else% + \ifdim\cap@indent<\z@ + {\capfont{\strut\ignorespaces + #1{{\caplabelfont{#2\captionformat\par}}}% + \noindent\hspace*{-\cap@indent}#3\unskip\strut\par}}% + \else% + \if@capbreak + {\capfont{\strut\ignorespaces + #1{{\caplabelfont{#2\captionformat\par}}}% + \noindent\@hangfrom{\hspace*{\cap@indent}}{#3\par}}}% + \else + {\capfont{\@hangfrom{\scr@smashdp\strut\hspace*{\cap@indent}}% + {\hspace{-\cap@indent}\scr@smashdp{\ignorespaces#1% + {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}% + \fi + \fi + \fi + }% + \setlength{\@tempdima}{\ht\@tempboxa}% + \addtolength{\@tempdima}{\dp\@tempboxa}% + \addtolength{\@tempdima}{-\ht\strutbox}% + \ht\@tempboxa\ht\strutbox + \dp\@tempboxa\@tempdima + \strut\cap@left + \box\@tempboxa + \cap@right\strut + }% + \else + \global \@minipagefalse + \sbox\@tempboxa{% + {\capfont{\scr@smashdp{\strut\ignorespaces + #1{{\caplabelfont{#2\captionformat}}}}% + #3}}% + }% + {\capfont{\hb@xt@\hsize{\strut\cap@left\if@RTL\beginR\fi\box\@tempboxa\if@RTL\endR\fi\cap@right\strut}}}% + \fi + \endgroup +} +\renewcommand{\@makecaption}[2]{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi +} %% %% Copyright © 2009–2011 Vafa Khalighi <vafa018@gmail.com> %% |