Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I just switched from babel to polyglossia and got several errors which are related to the usage of \enquote in \section. The problems only occur if babelshorthands=true is set for polyglossia and hyperref is loaded. They don't occur when babel is used instead of polyglossia. Does anyone know how to solve this?

Example

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{german} % problems
%\setmainlanguage{german} % no problems
%\usepackage[german]{babel} % no problems
\usepackage{csquotes}
\usepackage{hyperref}

\begin{document}
\section{\enquote{Test}}
\end{document}

Error Message

! Argument of \language@active@arg" has an extra }.
<inserted text> 
            \par 
l.9 \section{\enquote{Test}}
share|improve this question
    
+1, Great MWE! :) –  doncherry Sep 14 '13 at 11:55

1 Answer 1

up vote 4 down vote accepted

You have activated the shorthands too early. This disturbs the loading of packages that do not expect catcode changes. Thus the version of \enquote that is used for the bookmarks is defined with an active " instead of being an inactive character.

Solution: Load the package csquotes earlier:

...
\usepackage{csquotes}
...
\setmainlanguage[babelshorthands=true]{german}

BTW, package babel has learned the lesson and activates the shorthands later via \AtBeginDocument.

share|improve this answer
    
I've got a very similar problem with polyglossia in combination with biblatex: Undefined control sequence. <argument> blx@lng@\bbl@main@language l.6 \begin{document} I got rid of it loading polyglossia before biblatex. –  musicman Oct 1 at 12:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.