# Three quotation levels for csquotes

The recommended way of solving nested quotations in Norwegian is to use «» for the outer level and then alternating between ‘’ and “”. (Source)

Is it a large undertaking to do this with csquotes?

Define a new quote style and add appropriate level tests for the outer quotation marks:

\documentclass[12pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[maxlevel=3]{csquotes}

\makeatletter
\DeclareQuoteStyle{threelevel}
{\ifnum\csq@qlevel<2 \guillemotleft\else\textquotedblleft\fi}% opening outer mark
{\ifnum\csq@qlevel<2 \guillemotright\else\textquotedblright\fi}% closing outer mark
{\textquoteleft}% opening inner mark
{\textquoteright}% closing inner mark
\makeatother

\ExecuteQuoteOptions{style=threelevel}

\begin{document}

\enquote{Jeg (temmelig hånlig): \enquote{I setter uvanlig pris på Dürer --
først kommer \enquote{Som jeg vil fryse etter solen} og nå sanduret fra Melancolia.}}

\end{document}


• I've added two spaces in the definition; while in this case they're not strictly necessary, in other situations they may be crucial. When TeX is looking for a constant, it expands tokens until finding something (unexpandable) which can't be part of a number. So in your initial code, \guillemotleft would be expanded before the \ifnum\csq@qlevel<2 test is performed. Happily, the expansion of \guillemotleft doesn't start with a digit: you can guess what would happen. The spaces I added will be ignored. Jul 23 '12 at 14:24
• @egreg Is it correct that no spaces would be necessary if I had used \tw@ instead of 2? Jul 23 '12 at 14:31
• Correct: \tw@ is unexpandable and TeX just fetches its value. Jul 23 '12 at 14:34
• Adding something like \MakeAutoQuote{«}{»} in your solution makes it easier to use since you can write «some text» instead of \enquote{some text}. May 7 '14 at 7:28