diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-10 21:32:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-10 21:32:55 +0000 |
commit | 2bdc503b5e600981a5e34b591b90015d7485d086 (patch) | |
tree | acca040d207ffcf1cace1db445b04bf9e365a33d /Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def | |
parent | 54f636c57e0099a927e9c6093e67c97562a011a7 (diff) |
bidi (10may16)
git-svn-id: svn://tug.org/texlive/trunk@41016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def | 118 |
1 files changed, 77 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def index 14a12aeeaa2..d4b27ee5458 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{46457} +%% \CheckSum{46913} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -34,20 +34,40 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% -\ProvidesFile{cuted-xetex-bidi.def}[2013/04/10 v0.3 bidi adaptations for cuted package for XeTeX engine] +\ProvidesFile{cuted-xetex-bidi.def}[2016/05/10 v0.4 bidi adaptations for cuted package for XeTeX engine] + \def\RTL@outputdblcol{% -\if@firstcolumn \global\@firstcolumnfalse -\global\setbox\@leftcolumn \box\@outputbox - \else - \global\@firstcolumntrue -\setbox\@outputbox \vbox {\hbox to\textwidth {% -\hskip \columnwidth -\hfil \vrule width\columnseprule \hfil -\hbox to\columnwidth {\box\@leftcolumn \hss}% -\hskip -\textwidth -\hbox to\columnwidth{\box\@outputbox \hss}% -\hskip \columnsep -\hskip \columnwidth }}% + \if@firstcolumn + \global\@firstcolumnfalse + \global\setbox\@leftcolumn\copy\@outputbox + \splitmaxdepth\maxdimen + \vbadness\maxdimen + \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% + \setbox\@outputbox\vsplit\@outputbox to\maxdimen + \toks@\expandafter{\topmark}% + \xdef\@firstcoltopmark{\the\toks@}% + \toks@\expandafter{\splitfirstmark}% + \xdef\@firstcolfirstmark{\the\toks@}% + \ifx\@firstcolfirstmark\@empty + \global\let\@setmarks\relax + \else + \gdef\@setmarks{% + \let\firstmark\@firstcolfirstmark + \let\topmark\@firstcoltopmark}% + \fi + \else + \global\@firstcolumntrue + \setbox\@outputbox\vbox{% + \hb@xt@\textwidth{% + \hskip \columnwidth + \hfil + {\normalcolor\vrule \@width\columnseprule}% + \hfil + \hb@xt@\columnwidth{\box\@leftcolumn \hss}% + \hskip -\textwidth + \hb@xt@\columnwidth{\box\@outputbox \hss}% + \hskip \columnsep + \hskip \columnwidth }}% \ifvoid\hold@viper \else \setbox\@outputbox \vbox to\textheight{% @@ -56,10 +76,14 @@ \vss }% \fi -\@combinedblfloats \@outputpage -\begingroup \@dblfloatplacement \@startdblcolumn -\@whilesw\if@fcolmade \fi -{\@outputpage \@startdblcolumn }% + \@combinedblfloats + \@setmarks + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi{\@outputpage + \@startdblcolumn}% \ifvoid\@viper \else \global\setbox\@viper\vbox{% @@ -68,25 +92,37 @@ }% \@viperoutput \fi -\endgroup -\fi} + \endgroup + \fi}% + \def\LTR@outputdblcol{% \if@firstcolumn - \global \@firstcolumnfalse - \global \setbox\@leftcolumn \box\@outputbox - \else - \global\@firstcolumntrue - \setbox\@outputbox \vbox {% - \hb@xt@\textwidth {% - \hb@xt@\columnwidth {% - \box\@leftcolumn \hss}% - \hfil - \vrule \@width\columnseprule - \hfil - \hb@xt@\columnwidth {% - \box\@outputbox \hss}% - }% - }% + \global\@firstcolumnfalse + \global\setbox\@leftcolumn\copy\@outputbox + \splitmaxdepth\maxdimen + \vbadness\maxdimen + \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% + \setbox\@outputbox\vsplit\@outputbox to\maxdimen + \toks@\expandafter{\topmark}% + \xdef\@firstcoltopmark{\the\toks@}% + \toks@\expandafter{\splitfirstmark}% + \xdef\@firstcolfirstmark{\the\toks@}% + \ifx\@firstcolfirstmark\@empty + \global\let\@setmarks\relax + \else + \gdef\@setmarks{% + \let\firstmark\@firstcolfirstmark + \let\topmark\@firstcoltopmark}% + \fi + \else + \global\@firstcolumntrue + \setbox\@outputbox\vbox{% + \hb@xt@\textwidth{% + \hb@xt@\columnwidth{\box\@leftcolumn \hss}% + \hfil + {\normalcolor\vrule \@width\columnseprule}% + \hfil + \hb@xt@\columnwidth{\box\@outputbox \hss}}}% \ifvoid\hold@viper \else \setbox\@outputbox \vbox to\textheight{% @@ -95,14 +131,14 @@ \vss }% \fi - \@combinedblfloats + \@combinedblfloats + \@setmarks \@outputpage \begingroup \@dblfloatplacement \@startdblcolumn - \@whilesw\if@fcolmade \fi - {\@outputpage - \@startdblcolumn}% + \@whilesw\if@fcolmade \fi{\@outputpage + \@startdblcolumn}% \ifvoid\@viper \else \global\setbox\@viper\vbox{% @@ -112,8 +148,8 @@ \@viperoutput \fi \endgroup - \fi - } + \fi}% + \def \@addviper {% \if@firstcolumn \@insertfalse |