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.

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}

share|improve this question
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. –  Johan K. Jensen 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. –  Johan K. Jensen Dec 11 '12 at 13:10
add comment

1 Answer

up vote 9 down vote accepted

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}
share|improve this answer
add comment

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.