[XeTeX] two columns with bidi

Sargon Hasso sargon.hasso at gmail.com
Fri May 1 03:36:17 CEST 2009


 I have the same problem typesetting Syriac in two colums. Can you show me a
simple example how to use your fix?
I am using this preamble:
\documentclass[12pt, twocolumn]{article}
\usepackage{xltxtra, polyglossia}
\usepackage{bidi}

% font selection stuff
etc.



Hi everyone,
Currently bidi has no command for changing the direction in two columns texts.
This problem even affect index part of a text because index part is typesseted
in two columns. I tried the following patch (which is, I think, from rlbabel)
and it solves the problem

%%%%%%%%For Right-to-Left two column command, I guess taken from rlbabel
\let\@old at outputdblcol <http://tug.org/mailman/listinfo/xetex>\@outputdblcol
\newcommand{\rl at outputdblcol <http://tug.org/mailman/listinfo/xetex>}{%
 \if at firstcolumn <http://tug.org/mailman/listinfo/xetex>
   \global \@firstcolumnfalse
    \global \setbox\@leftcolumn \box\@outputbox
  \else
    \global \@firstcolumntrue
    \setbox\@outputbox \vbox {\hb at xt
<http://tug.org/mailman/listinfo/xetex>@\textwidth {%
                              \hskip\columnwidth%
                              \hfil\vrule\@width\columnseprule\hfil
                              \hb at xt
<http://tug.org/mailman/listinfo/xetex>@\columnwidth {%
                                \box\@leftcolumn \hss}%
                              \hb at xt
<http://tug.org/mailman/listinfo/xetex>@\columnwidth {%
                                \hskip-\textwidth%
                                \box\@outputbox \hss}%
                              \hskip\columnsep%
                              \hskip\columnwidth}}%
    \@combinedblfloats
    \@outputpage
    \begingroup
      \@dblfloatplacement
      \@startdblcolumn
      \@whilesw\if at fcolmade <http://tug.org/mailman/listinfo/xetex> \fi
        {\@outputpage
         \@startdblcolumn}%
    \endgroup
 \fi}
\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl at
outputdblcol <http://tug.org/mailman/listinfo/xetex>}}
\newcommand{\lrdblcolumn}{\renewcommand{\@outputdblcol}{\@old at
outputdblcol <http://tug.org/mailman/listinfo/xetex>}}
%set the default direction of the twocolumn texts to Right-to-Left
\rldblcolumn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Also I think changing

\def\underline#1{\@@@underline{\if at rl
<http://tug.org/mailman/listinfo/xetex>\RL{#1}\else #1\fi}}

in bidi to

\def\underline#1{\@@@underline{\ifmmode #1\else\if at rl
<http://tug.org/mailman/listinfo/xetex>\RL{#1}\else #1\fi\fi}}

makes bidi more stable with underline texts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20090430/34ed86bd/attachment-0001.html 


More information about the XeTeX mailing list