josephwright / csquotes

Con­text sen­si­tive quo­ta­tion fa­cil­i­ties
LaTeX Project Public License v1.3c
28 stars 18 forks source link

autostyle=once doesn't honor babel's main=⟨language⟩ #52

Closed dbitouze closed 3 years ago

dbitouze commented 3 years ago

According to the documentation, the autostyle=once option controls multilingual support by only adapting the style once so that it matches the main language of the document.

This does work if the main language is just the last listed one, as shown by the following MCE:

\documentclass[french,english]{article}
\usepackage[T1]{fontenc}
\usepackage[autostyle=once]{csquotes}
\usepackage{babel}

\begin{document}
\section{Default}
\enquote{Very interesting quote.}

\selectlanguage{french}
\section{French}
\enquote{Une très intéressante citation.}

\selectlanguage{english}
\section{English}
\enquote{Very interesting quote.}
\end{document}

image

But this doesn't work if the main language is stipulated through the babel's main=⟨language⟩ option, as shown by the following MCE:

\documentclass[french,main=english]{article}
\usepackage[T1]{fontenc}
\usepackage[autostyle=once]{csquotes}
\usepackage{babel}

\begin{document}
\section{Default}
\enquote{Very interesting quote.}

\selectlanguage{french}
\section{French}
\enquote{Une très intéressante citation.}

\selectlanguage{english}
\section{English}
\enquote{Very interesting quote.}
\end{document}

image

Interestingly, the babel's main=⟨language⟩ option is honored by the autostyle=true option

dbitouze commented 3 years ago

Sorry for the noise: babel's main=⟨language⟩ doesn't work at the \documentclass' level, but only at the \usepackage{babel}'s level.