[lltx] issue with \texorpdfstring{}

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Dec 23 15:18:56 CET 2010


On Thu, Dec 23, 2010 at 01:08:02PM +0100, Pablo Rodríguez wrote:

> On 12/23/2010 11:37 AM, Heiko Oberdiek wrote:
> >On Thu, Dec 23, 2010 at 10:13:51AM +0100, Pablo Rodríguez wrote:
> >
> >>\documentclass{article}
> >>\usepackage[spanish]{babel}
> >>\usepackage{hyperref}
> >>\begin{document}
> >>\section{Ley (\texorpdfstring{\begin{hyphenrules}{ancientgreek}??????????\end{hyphenrules}}{??????????})}
> >>\end{document}
> >>
> >\begin and \end are fragile in LaTeX already. Thus you also need
> >\protect.
> >
> >You can avoid \texorpdfstring here by using \pdfstringdefDisableCommands:
> >
> >\pdfstringdefDisableCommands{%
> >   \def\begin#1{\csname#1\endcsname}%
> >   \def\end#1{\csname end#1\endcsname}%
> >   \def\hyphenrules#1{}%
> >   \def\endhyphenrules{}%
> >   \def\foreignlanguage#1#2{#2}%
> >}
> 
> Thanks, Heiko, it works like charm.
> 
> >In 6.82a hyperref will do this for \begin, \end, and
> >\foreignlanguage automatically.
> 
> How about adding \selectlanguage to this list?

The list shouldn't be too long, because it's called
for every bookmark and pdf information string.

Yours sincerely
  Heiko Oberdiek


More information about the lualatex-dev mailing list