나는 작은 MWE를 가지고 있습니다 :
\batchmode
\documentclass[twoside]{book}
\usepackage[spanish]{babel}
\begin{document}
\chapter{Referencia \texorpdfstring{$<$}{<} }
\end{document}
그리고 이로 인해 (pdflatex 사용) 오류가 발생합니다.
! 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.
...
일반적인 방법으로 이 문제를 해결하는 방법에 대한 제안이 있습니까? (다른 캐릭터에서도 문제가 발생합니다 textorpdfstring
)
답변1
흠... MWE를 너무 많이 줄였군요. 당신 hyperref
도 로드해야하지 않습니까 ? 어쨌든 <
스페인어 바벨에서는 기본적으로 활성화되어 있습니다. 내 솔루션(어쨌든 유니코드/utf8 인코딩을 사용한다는 점을 감안할 때)은 항상 다음을 사용하는 것입니다.
\documentclass[twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[spanish, es-noshorthands, shorthands=off]{babel}
\usepackage{hyperref}
\begin{document}
\chapter{Referencia \texorpdfstring{$<$}{<} }
\end{document}
그것은 거의 모든 곳에서 작동합니다.