# [lltx] issue with \texorpdfstring{}

Manuel Pégourié-Gonnard mpg at elzevir.fr
Thu Dec 23 10:50:29 CET 2010

Hi,

Le 23/12/2010 10:13, Pablo Rodríguez a écrit :
> \documentclass{article}
> \usepackage[spanish]{babel}
> \usepackage{hyperref}
> \begin{document}
> \section{Ley
> (\texorpdfstring{\begin{hyphenrules}{ancientgreek}νόμος\end{hyphenrules}}{νόμος})}
> \end{document}
>
> which uses \texorpdfstring to enable hyphenation and aviod problems with
> hyperref.
>
> I must be missing something extremely basic, but I don't know why it
> doesn't work (I get an error: "! Argument of \@sect has an extra }.").
>
> What am I doing wrong here?
>
On the tex end, I don't know, but you're probably writing to the wrong
mailing-list. I can reproduce that with pdftex, too, so there is nothing
specific to luatex here. I suggest writing to texhax, or the usenet group
comp.text.tex.

Manuel.

PS: I'm not getting any problem with

(\texorpdfstring{\foreignlanguage{ancientgreek}{νόμος}}{νόμος})}

I didn't check, but environments are likely not to be robust (ie, not usable in
a moving argument).