[XeTeX] footnotes and ArabXeTeX

Zdenek Wagner zdenek.wagner at gmail.com
Wed Oct 5 17:13:58 CEST 2011


2011/10/5 Philip TAYLOR <P.Taylor at rhul.ac.uk>:
>
>
> Zdenek Wagner wrote:
>
>> This is a problem of \catcode. Apparently \textarab changes \catcode
>> of ^ and _ to 12. However, \footnote (as well as other macros) read
>> the whole argument and when \textarab starts to play its role, it is
>> too late and \catcode of ^ and _ is already set. I do not know how to
>> solve this problem without breaking math in \footnote, some dirty
>> trick will be needed.
>
> To re-catcode a TeX sequence known to contain (e.g.) ^12 :
>
> Pass the sequence + \sentinel to a macro with parameter structure
>
>        #1^12#2\sentinel
>
>
> Yield as expansion #1^#2, where ^ has its normal catcode.
>
Generally, \footnote may contain both math, where ^ and _ must have
their catcodes as written in the TeXbook, and \textarab, where the
catcodes of ^ and _ have to be changed. there may be several
occurences of \textarab (\texturdu, \textpersian) in a \footnote and
several occurences of ^ and _ in \textarab. I am not sure whether math
can appear inside \textarab. Thus the solution would not be that
simple.

> Philip Taylor
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the XeTeX mailing list