[XeTeX] arabxetex vs. xepersian
Ross Moore
ross.moore at mq.edu.au
Mon Oct 4 23:45:42 CEST 2010
Hello Fr. Michael,
On 05/10/2010, at 8:05 AM, Fr. Michael Gilmary wrote:
> I've been meaning to ask recently about the kashida.sty file
There is a big compatibility problem with this package, which really
should be fixed before it gets distributed widely.
The choices of some of the macro-names are rather unfortunate,
since they clash with existing, long-standing uses for those names.
> I've posted here before: when making this into an environment, is it necessary to "turn off" the interchartokenstate? It doesn't seem to need it, but it doesn't prevent it from working if it is "turned off".
>
> This is what I have at present (slightly modified from what I sent before, Gareth):
>
> \newenvironment{kashida}{
> \XeTeXinterchartoks \D \D = {\stretch}
> \XeTeXinterchartoks \L \D = {\stretch}
> \XeTeXinterchartoks \D \L = {\stretch}
> \XeTeXinterchartoks \L \L = {\stretch}
> \XeTeXinterchartoks \D \R = {\stretch}
> \XeTeXinterchartoks \D \A = {\stretch}
> \XeTeXinterchartoks \L \R = {\stretch}
> \XeTeXinterchartoks \L \A = {}
\A = Å
\L = Ł
\R is undefined, but is often used privately for ℝ
\D is undefined, but is often used privately for ⅅ
\V is undefined
Using single-letter macro names is always dangerous,
due to clashes of this kind.
It is especially damaging when your document has bibliographic
entries, with authors names requiring the letters whose macros
have now been redefined.
>
> \XeTeXinterchartokenstate=1
> %}{\XeTeXinterchartokenstate=-1} % comment or uncomment to see if there's a difference
> }{}
>
> Any corrections welcome!
I would suggest changing all the definitions and uses within
the package to names such as:
\kshdA \kshdD \kshdL \kshdR \kshdV
Doubtless you have documents which already use the 1-letter names.
That's OK, since you can always include the shorthands to apply
within a specific environment --- which probably you are using
environments anyway.
That is, allow your package to define a macro:
\newcommand{\useKashidaShorthands}{%
\def\A{\kshdA}%
\def\D{\kshdD}%
\def\L{\kshdL}%
\def\R{\kshdR}%
\def\V{\kshdV}%
}
and include \useKashidaShorthands
as part of the definition of your environment(s)
that explicitly need to use these features.
Note that I'm suggesting using \def\A{\kshdA} rather than
\let\A\kshdA here, so that if you write out stuff
into auxiliary files, then it will use the unique names
starting \kshd... rather than potentially clashing shorthands.
This should avoid problems in the Table-of-Contents,
and the Bibliography, say.
>
> Also, any other languages besides Syriac, Persian, Arabic that could be added will have to be done by someone who knows those extra code points to add.
>
>
> I've asked François about adding it to polyglossia as an environment option or whatever ... but no response yet.
>
>
>
> --
> United in adoration of Jesus,
>
>
> fr. michael gilmary, mma
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore ross.moore at mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
More information about the XeTeX
mailing list