# [XeTeX] fancyhdr and plyglossia

Vafa Khalighi vafa at users.berlios.de
Mon Feb 1 01:35:44 CET 2010

On Mon, Feb 1, 2010 at 6:47 AM, Ross Moore <ross at ics.mq.edu.au> wrote:

> Hi Vafa,

Hi Ross,

There are 2 issues here: the side on which the marginal note is placed,

> as well as the directionality of its contents.
>

I am not really sure if I can understand these two issues. I think these two
are done appropriately in v1.0.4 of bidi package, whenever, you are
typesetting RTL, you get RTL \marginpar and whenever, you are typesetting
LTR, you are getting LTR \marginpar. I guess that when you said that there
are two issues, you really meant that when one is typesetting RTL, he should
be able to have LTR \marginpar as well as RTL \marginpar by having
\LTRmarginpar and \RTLmarginpar predefined in the bidi package. Right? or is
it something else that you see as the issue?

>
> Now for positioning, using \reversemarginpar  at the
> beginning of the environment indeed switches sides.
> However one wonders why there should be a need for this.
>

I already explained this. So I repeat it agian here. When you are
typesetting LTR, you are typesetting from left to right and the \marginpar
appears on the right hand side and \reversemarginpar appears on the left
hand side but when you typeset RTL, you write from right to left, so it
makes sense that \marginpar appears on the left hand side and
\reversemarginpar appears on the right hand side. I have not implemented
this idea myself, I took it from TeX-e-Parsi people and I think that it is
correct.

>
> Now marginal notes are usually used by scholars or editors,
> By default LaTeX supports L to R marginal notes;
> e.g., for Western scholars commenting on Western texts.
>

Yes, but LaTeX \marginpar is very limited for this kind of typesetting.
There are various packages designed for typesetting critical editions that
users can benefit from.

>
> You are right in that bidi should support, by default, R to L
> content in margin-pars; e.g. for Arabic/Persian scholars commenting
> on Arabic & Persian texts.
>
> However, bidi is clearly to support bi-directionality.
> So it should also be making it easy for Arabic scholars to make
> comments on Western texts, as well as Western scholars commenting
> on Arabic/Persian texts.
>

My thinking was that in RTL, you should get RTL \marginpar and in LTR, you
should get LTR \marginpar. But I am quite happy to add two more CSs,
\RTLmarginpar and \LTRmarginpar.

>
>
> What would be nice is to give an option to the {Arabic}
> environment that would:
>  a.  execute  \reversemarginpar
>  b.  apply the \LR to marginpar content
>  c.  remove the need for the \hfill at the end .
>
>
>
That is polyglossia (Arabic environment) not bidi but I can implement
required tools in bidi that polyglossia can take advantage of them.

Thanks heaps Ross for your wonderful and excellent ideas and suggestions. I
will definitely add more support for typesetting \marginpar in the next
version of bidi package.

--
Best wishes,
Vafa Khalighi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20100201/3369f845/attachment.html>