![Das Argument von \language@active@arg< hat ein zusätzliches }](https://rvso.com/image/475737/Das%20Argument%20von%20%5Clanguage%40active%40arg%3C%20hat%20ein%20zus%C3%A4tzliches%20%7D.png)
Ich habe das kleine MWE:
\batchmode
\documentclass[twoside]{book}
\usepackage[spanish]{babel}
\begin{document}
\chapter{Referencia \texorpdfstring{$<$}{<} }
\end{document}
Und dies führt (mit pdflatex) zu dem Fehler:
! Argument of \language@active@arg> has an extra }.
<inserted text>
\par
l.5 \chapter{Referencia \texorpdfstring{$<$}{<} }
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Runaway argument?
! Paragraph ended before \language@active@arg> was complete.
<to be read again>
\par
l.5 \chapter{Referencia \texorpdfstring{$<$}{<} }
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
...
Irgendwelche Vorschläge, wie man das allgemein lösen kann? (Problem tritt auch bei anderen Zeichen in auf textorpdfstring
)
Antwort1
Hmm... du hast den MWE zu sehr reduziert. Solltest du nicht hyperref
auch laden? Wie auch immer, <
ist standardmäßig im spanischen Babel aktiviert. Meine Lösung (da ich ohnehin Unicode/UTF8-Kodierung verwende) besteht darin, immer Folgendes zu verwenden:
\documentclass[twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[spanish, es-noshorthands, shorthands=off]{babel}
\usepackage{hyperref}
\begin{document}
\chapter{Referencia \texorpdfstring{$<$}{<} }
\end{document}
Das funktioniert fast überall.