[XeTeX] bidi.sty bug (was flushleft and flushright in amsart.cls)
VAFA KHALIGHI
vafa.khalighi at students.mq.edu.au
Fri Nov 28 12:14:42 CET 2008
No problem.
It was the cause of other problems for example if you put this code at
permeable of your document
%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{صفحهٔ \thepage}
%%%%%%%%%%%%%%%%%%%%%%%
You want that fancyhead to be printed on the right hand-side of odd pages
and left hand-side of the even pages, but with the current definitions of
raggedright and raggedleft of the bidi.sty, the opposite happens, so to fix
this you need to have
%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\def\raggedright{%
\let\\\@centercr
\rightskip\z at skip\rightskip\@flushglue
\parindent\z@\parfillskip\z at skip}
\renewcommand\raggedleft{\@@raggedleft}
\renewcommand\raggedright{\@@raggedright}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%
You also need to fix \centerline, \rightline and \leftline in bidi.sty as
follow:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\centerline#1{%
\if at rl\@@line{\hss\beginR #1 \endR\hss}
\else\@@line{\hss#1\hss}\fi}
\def\leftline#1{%
\if at rl\@@line{\beginR #1 \endR\hss}
\else\@@line{#1\hss}\fi}
\def\rightline#1{%
\if at rl\@@line{\hss\beginR #1 \endR}
\else\@@line{\hss#1}\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Cheers
--
``Life is not empty,
There is kindness, there is apple and there is faith
One day will come,
and to a mendicant I will endow a jasmine''
-- Sohrab Sepehri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20081128/6c86a888/attachment.html
More information about the XeTeX
mailing list