[XeTeX] XeLaTeX and Arabic text in Footnotes

Ross Moore ross at ics.mq.edu.au
Fri May 14 08:33:20 CEST 2010


Hello Nathan,

On 14/05/2010, at 4:11 PM, Nathan Camillo Sidoli wrote:

> For some reason, this is only happening within footnotes. Within  
> the footnote, even changing the catcodes inside a group is not  
> working.

The \catcode is set as soon as TeX reads the input source.
That means that as soon as TeX encounters the \footnote
it reads its argument. Thus catcodes are set as this point
and cannot be changed easily.
So you have to make the change *before* reading the argument.

e.g.

\bgroup
\catcode`_=11
\catcode`^=11
\def\thisfootnotearg{a^2_3}%  local definition
  ... some text coming here\footnote{\thisfootnotearg}.
\egroup

Hopefully that \bgroup ... \egroup  will not upset the footnote
numbering or storing the argument for the bottom of the page.

If it does, then this should work OK instead.


\bgroup
\catcode`_=11
\catcode`^=11
\gdef\thisfootnotearg{a^2_3} %  global definition
\egroup
  ... some text coming here\footnote{\thisfootnotearg}.


There are other more complicated constructions that will
work, without the use of global definitions, if you really
need to have it done that way.


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.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