I have just tried out the main=<language>
package option to babel
and found that it seemingly does not play nicely with hyperref
's \autoref
.
Using the traditional syntax works nicely:
\documentclass{scrartcl}
\usepackage[english,ngerman]{babel}
\usepackage{hyperref}
\begin{document}
\section{Test}
\label{sec:test}
\autoref{sec:test}
\end{document}
The main=
version does not:
\documentclass{scrartcl}
\usepackage[english,main=ngerman]{babel}
\usepackage{hyperref}
\begin{document}
\section{Test}
\label{sec:test}
\autoref{sec:test}
\end{document}
Things that don't work to fix this
- Using
\setmainlanguage
Things that mitigate the problem (but seem hack-ish)
- Using the “old” form (obviously)
- Using a document option of the “old” form
What would be the best way to deal with this?
Edit: To be more precise, what can I do on the side of hyperref
or the like to deal with this when I'm not able to change document options or babel's options?
polyglossia
but I don't remember. But you are not using that anyway.]babel
documentation suggests them alongside the use ofmain=
and even makes the point I made earlier: namely, that setting them as class options allows other packages to pick them up as well. Where does it say they are "old"?babel
here, I thought this is more a problem withhyperref