[XeTeX] bidi: LTR header in RTL document

Vafa Khalighi vafakhlgh at gmail.com
Tue Sep 28 01:16:55 CEST 2010


\makeatletter
\def\@outputpage{%
\begingroup           % the \endgroup is put in by \aftergroup
  \let \protect \noexpand
  \@resetactivechars
  \global\let\@@if at newlist\if at newlist
  \global\@newlistfalse
  \@parboxrestore
  \shipout \vbox{%
    \set at typeset@protect
    \aftergroup \endgroup
    \aftergroup \set at typeset@protect
                                % correct? or just restore by ending
                                % the group?
  \if at specialpage
    \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
  \fi
  \if at twoside
    \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
         \let\@themargin\oddsidemargin
    \else \let\@thehead\@evenhead
       \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
    \fi
  \fi
  \reset at font
  \normalsize
  \normalsfcodes
  \let\label\@gobble
  \let\index\@gobble
  \let\glossary\@gobble
  \baselineskip\z at skip \lineskip\z at skip \lineskiplimit\z@
    \@begindvi
    \vskip \topmargin
    \moveright\@themargin \vbox {%
      \setbox\@tempboxa \vbox to\headheight{%
        \vfil
        \color at hbox
          \normalcolor
          \hb at xt@\textwidth{\@thehead}%
        \color at endbox
        }%                        %% 22 Feb 87
      \dp\@tempboxa \z@
      \box\@tempboxa
      \vskip \headsep
      \box\@outputbox
      \baselineskip \footskip
      \color at hbox
        \normalcolor
        \hb at xt@\textwidth{\@thefoot}%
      \color at endbox
      }%
    }%
  \global\let\if at newlist\@@if at newlist
  \global \@colht \textheight
  \stepcounter{page}%
  \let\firstmark\botmark
}
\makeatother


-- 
به نام خداوند جان و خرد          کزین برتر اندیشه برنگذرد
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20100928/ee902610/attachment.html>


More information about the XeTeX mailing list