%% %% This is file `flowfram-xetex-bidi.def', %% generated with the docstrip utility. %% %% The original source files were: %% %% bidi.dtx (with options: `flowfram-xetex-bidi.def') %% %% ______________________________________ %% Copyright © 2009–2010 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–2010 Vafa Khalighi %% %% 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 “author-maintained” (as per LPPL maintenance status) %% by Vafa Khalighi. %% %% In addition to the terms of LPPL any distributed version %% (unchanged or modified) of bidi has to keep the statement %% about the moral obligation for using bidi. In case of major %% changes where this would not be appropriate the author of the %% changed version should contact the copyright holder. %% %% %% %% Moral obligation for using bidi: %% ____________________________________ %% %% Users of bidi who wish to include or use bidi or a modified %% version in a proprietary and commercially market product are asked %% under certain conditions (see below) for the payment of a license %% fee. The size of this fee is to be determined, in each instance, %% by the commercial user, depending on his/her judgment of the value of %% bidi for his/her product. %% %% %% The conditions for this are as follows: %% %% The producer of a proprietary and commercially market product %% that involves typesetting using bidi is asked to determine %% the value of a license fee for using bidi if %% %% - the product is a document and the producer has decided to %% include bidi to typeset (parts of) the document or has %% directed the author of the document to include bidi (for %% example, by providing a class file to be used by the author) %% %% - the product is a LaTeX class or package that includes bidi %% %% %% There is no moral obligation in case %% %% - the product is a document but producer has not directed %% the author to include bidi (in that case the moral obligation %% lies with the author of the document) %% %% - the product does not involve typesetting, e.g., consists, for %% example, of distributing bidi and its documentation. %% %% - the product is not proprietary, i.e., is made available as free %% software itself (which doesn't prohibit its commercial marketing) %% %% - bidi is used for non-commercial purposes %% %% %% Determinating a license fee might result in a license fee of zero %% (i.e., no payment) in case a producer has determined that the use %% of bidi has no enhancing effect on the product. This is a %% plausible scenario, i.e., in the above two cases the producer is %% only asked to evaluate the value of bidi for the product %% not for the payment of a license fee per se (which might or might %% not follow from this evaluation). %% %% The license fee, if any, can be payed to the author of %% the program who can be contacted at %% %% vafakhlgh@gmail.com %% %% %% %% %% End of file `flowfram-xetex-bidi.def'.