[XeTeX] xdvipdfmx 0.3 and PDF annotations

Jonathan Kew jonathan_kew at sil.org
Mon Dec 4 12:33:56 CET 2006


On 4 Dec 2006, at 11:23 am, Pablo Rodríguez wrote:
>
> The minimal example bellow shows that annotations
> don't work when spanish is selected as main language in babel.
>
> \documentclass{article}
> \usepackage[spanish]{babel}
> \begin{document}
> \special{pdf: ann width 7cm height 5cm
> << /Type /Annot /Subtype /Text /Open true
> /Contents (χαλεπὰ τὰ καλά) >>}
> hola
> \end{document}

This seems to be because babel's spanish option makes the < and >  
into active characters, and they then misbehave when used to  
construct a dictionary in the pdf annotation.

To work around this, you could wrap the annotation in \foreignlanguage 
{english}{....}, thus:

\documentclass{article}
\usepackage[spanish]{babel}
\begin{document}
\foreignlanguage{english}{\special{pdf: ann width 7cm height 5cm
<< /Type /Annot /Subtype /Text /Open true
/Contents (χαλεπὰ τὰ καλά) >>}}
hola
\end{document}


JK



More information about the XeTeX mailing list