diff options
author | Karl Berry <karl@freefriends.org> | 2013-09-17 22:11:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-09-17 22:11:40 +0000 |
commit | 389d70f9a442ed180389f17c2586983b861528e9 (patch) | |
tree | 3f7df46aa197a6317469dc4d65edf623b3482fdd /Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def | |
parent | bdc62c04f9ae222f720432f1651df51fba21f7bb (diff) |
bidi (17sep13)
git-svn-id: svn://tug.org/texlive/trunk@31682 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def new file mode 100644 index 00000000000..da78ec1aebe --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def @@ -0,0 +1,156 @@ +%% +%% This is file `flowfram-xetex-bidi.def'. +%% +%% ______________________________________ +%% Copyright © 2009–2013 Vafa Khalighi +%% +%% License information appended. +%% +%% +\ProvidesFile{flowfram-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for flowfram package for XeTeX engine] +\def\@outputdblcol{% +\@nxtcol=\c@thisframe +\c@curpg=\c@page +\@g@tnextcol{\@nxtcol}% +\if@ff@nwpg % next flow frame starts on new page + \global\@firstcolumntrue + \@setcolbox\c@thisframe + \if@specialpage + \global\@specialpagefalse + \@nameuse{ps@\@specialstyle}\relax + \fi + \if@twoside + \ifodd\count\z@ + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \else + \let\@thehead\@evenhead + \let\@thefoot\@evenfoot + \fi + \else + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \fi + \@begindvi + \@dodynamicthehead\@dodynamicthefoot + \vbadness=\@M + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% + \@combinedblfloats + \@outputpage +\advance\c@curpg by -\c@page\relax + \whiledo{\c@curpg>0}{\advance\c@curpg by -1\relax + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% +\@outputpage} + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw \if@fcolmade \fi + {\@outputpage \@startdblcolumn }\endgroup + \@resetst@tics + \@resetdyn@mics +\else % still on same page, save contents of box255 + \global\@firstcolumnfalse + \@setcolbox\c@thisframe +\fi +\global\c@thisframe=\@nxtcol +\@setcol{\c@thisframe}\relax +\global\@colht\vsize +} +\def\@outputpage{% +\begingroup + \let\protect\noexpand + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse\@parboxrestore + \shipout\vbox{\set@typeset@protect + \aftergroup + \endgroup + \aftergroup + \set@typeset@protect + \reset@font\normalsize\normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip + \lineskip\z@skip + \lineskiplimit\z@ + \vskip\topmargin\moveright\@themargin + \vbox{% + \vskip\headheight + \vskip\headsep + \box\@outputbox + }}% + \global\let\if@newlist\@@if@newlist + \stepcounter{page}% + \setcounter{displayedframe}{0}% + \let\firstmark\botmark} + +\newcommand*\bidi@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\bidicolor\ff@txtcol}} + +\newcommand{\bidi@ff@box}[3]{{\@ffbackground{\vbox to#2 +{\hb@xt@ #1{\hss{\bidi@s@tfftextcol #3}\hss}\vss\kern\z@}}}} + +\renewcommand*{\@docolbox}[1]{% +\edef\ff@frametype{% +\csname @ff@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @ff@col@\romannumeral#1\endcsname}% +\edef\ff@txtcol{\csname @ff@txtcol@\romannumeral#1\endcsname}% +\edef\ff@backcol{\csname @ff@backcol@\romannumeral#1\endcsname}% +\@ff@setoffset{#1}% +\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}{% +\csname\ff@frametype\endcsname}% +}{% +\bidi@ff@box{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}% +}}} +\@ifclassloaded{book}{% +\renewcommand\theequation + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation} +\renewcommand \thefigure + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure} +\renewcommand \thetable + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table} +\renewcommand \thechapter {\@arabic\c@chapter} +\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section} +\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection} +\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph} +\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{} +\@ifclassloaded{report}{% +\renewcommand\theequation + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation} +\renewcommand \thefigure + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure} +\renewcommand \thetable + {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table} +\renewcommand \thechapter {\@arabic\c@chapter} +\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section} +\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection} +\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph} +\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{} +\renewcommand{\rotateframe}[2]{\if@ttb@rotate +\rotatebox{#1}{\if@RTL\beginL\fi#2\if@RTL\endL\fi}% +\else +#2\relax +\fi} +%% +%% Copyright © 2009–2013 Vafa Khalighi <vafakh@me.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 +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is “maintained” (as per LPPL maintenance status) +%% by Vafa Khalighi. +%% +%% +%% +%% +%% End of file `flowfram-xetex-bidi.def'. |