10

As per this question, I am using csquotes to convert quotationmarks to typographical-quotes. However, when changing language through \selectlanguage the quotationmarks no longer gets converted. (I need an English abstract and Danish content. Instead of renaming the abstract I find it “prettier” to change language before and after the abstract, though it’s more cumbersome.)

MWE:

\documentclass[article,12pt,a4paper,openany,oneside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,danish]{babel}
\usepackage[danish=quotes]{csquotes}
\MakeOuterQuote{"}    
\usepackage{lmodern}
\begin{document}

\selectlanguage{danish}
Quote: "Morbi dolor risus."
\end{document}

johankj
  • 407
  • 1
    If I leave \selectlanguage{danish} out (Danish already is the active language) it works for me. Selecting Danish probably makes " a babel shorthand a thus overwrites the csquotes definition. – cgnieder Dec 11 '12 at 12:41
  • That might be it. Unfortunately I have already used a \selectlanguage{english} for the abstract and need to revert back to Danish. I could remove both and rename the abstract-title but that doesn't feel like the right way to do this. – johankj Dec 11 '12 at 12:52
  • 3
    If you only need English for the abstract you could try putting it into \begin{otherlanguage*}{english} ... \end{otherlanguage*} instead of using \selectlanguage (I haven't tested this, though) – cgnieder Dec 11 '12 at 13:01
  • That does indeed work and I might go with it. Of course I'd still love a solution to this problem in case anyone else needs a solution to this. – johankj Dec 11 '12 at 13:10

1 Answers1

11

You can use \EnableQuotes to get the quotes back. But I personally prefer the \MakeAutoQuote command with an non-ascii arguments:

\documentclass[article,12pt,a4paper,openany,oneside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,danish]{babel}

\usepackage[autostyle, %if quote style should change with language
           danish=quotes]{csquotes}
\MakeAutoQuote{«}{»}
\MakeOuterQuote{"}   
\usepackage{lmodern}
\begin{document}

\selectlanguage{danish}
\EnableQuotes
"Quote" 

danish Quote: «Morbi «dolor» risus.»

\selectlanguage{english}
\EnableQuotes
"Quote" 

english Quote: «Morbi «dolor» risus.»
\end{document}
Ulrike Fischer
  • 327,261