[lltx] issue with \texorpdfstring{}

Pablo Rodríguez oinos at web.de
Thu Dec 23 13:08:02 CET 2010


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?

Thanks again,


Pablo
-- 
http://www.ousia.tk


More information about the lualatex-dev mailing list