[XeTeX] footnotes and ArabXeTeX

Zdenek Wagner zdenek.wagner at gmail.com
Wed Oct 5 16:29:13 CEST 2011


2011/10/5 Nathan Sidoli <nathan.sidoli at utoronto.ca>:
> Here is one for Vafa in your new capacity as maintainer of ArabXeTeX. Thanks
> for taking over this package! (I sent this to François some time ago, but I
> don't think anything has been done about it.)
>
> In certain environments, there is some problem with the input which is
> controlled by ascii 'operators' such as ^ and _ and maybe some others. For
> example, ش is input as ^s, ذ is input as _d, and so on. The letters that are
> input using . seem to be unaffected.
>
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.

> The effect occurs in a number of environments, such as footnotes and
> pstricks figures (it doesn't occur TikZ, and this is good, but many people
> have legacy figures in pstricks). In these environments, the operators seem
> to be treated as some sort of mathematical operator and the compiler
> complains that a $ is missing and the file will not compile.
>
> I have included a couple of minimal files, below.
>
> ------------------------------------------
>
> \documentclass{article}
>
> \usepackage{fontspec}
> \setmainfont[Mapping=tex-text]{Junicode}
> \usepackage[novoc,fdf2noalif]{arabxetex}
> \newfontfamily\arabicfont[Script=Arabic,Scale=1.3,WordSpace=2]{Scheherazade}
>
> \begin{document}
>
> We have a footnote that contains the word
> \textarab{al-^skl}.\footnote{\textarab{al-^skl}.}
> It is the \^\ \ in the asci input of \textarab{^s} that causes the problem.
> It seems that it is being read as an operator in an uncalled math
> environment.
>
> This is also true of \_ in, used in, say,
> \textarab{_d}.\footnote{textarab{_d}.}
>
> And maybe some of the other operators, but the . works fine, as in
> \textarab{.z}.\footnote{\textarab{.z}.}
>
> \end{document}
>
> ----------------------------------------
>
> \documentclass{article}
>
> \usepackage{pstricks}
> \usepackage{pst-eps}
>
> \usepackage{fontspec}
> \setmainfont[Mapping=tex-text]{Junicode}
> \usepackage[novoc,fdf2noalif]{arabxetex}
> \newfontfamily\arabicfont[Script=Arabic,Scale=1.3,WordSpace=2]{Scheherazade}
>
> \newcommand{\A}{\textarab}
>
> \begin{document}
>
> \begin{center}
> \begin{pspicture}(0,0)(3,3)
> \psline[linewidth=1pt](0,0)(0,3) %base
> \psline[linewidth=1pt](0,0)(3,0) %2e base
> \psline[linewidth=1pt](0,3)(3,3) %3e base
> \psline[linewidth=1pt](3,0)(3,3) %oblique 1
> \psline[linewidth=1pt](0,3)(3,0) %oblique 1
> \rput(1.5,2.4){\A{mA'iT}}
> \rput(1.5,3.278){\A{`^srT}}
> \rput*[0,0]{-45}(0.23,1.74){\A{j_dr mA'ityn}}
> \rput*[0,0]{-90}(3.125,2.1){}
> \rput*[0,0]{-90}(-0.7,2.1){}
> \rput(1.5,-0.275){}
> \end{pspicture}
> \end{center}
>
> \end{document}
>
>
>
>
>
> --------------------------------------------------
> 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