# How to use formal csQuotes and page citing?

I have been trying to write a document containing correct norwegian quotes. For this csQuotes seemed the best. I am also using natbid for the references, however when using \citep[page]{refference} instead of \citep{refference} the document fails to compile

\begin{filecontents}{biblio.bib}
@book{Feynman,
author = "Richard P. Feynman",
title = "Surely You're Joking, Mr.Feynman!",
publisher = "WW.Norton Company, Inc",
year = "1985"
}
\end{filecontents}

\documentclass[12pt,a4paper]{article}
\usepackage[sort,numbers,square]{natbib}
\usepackage[norsk]{babel}
\usepackage[autostyle]{csquotes}

\begin{document}

\textquote[Feynman \citep[s39-41]{Feynman}]{One thing I never did learn was contour integration. I had learned to do integrals
by various methods shown in a book that my high school physics teacher Mr. Bader had
given me. That book also showed how to differentiate parameters under the integral
sign—it's a certain operation. It turns out that's not taught very much in the
universities; they don't emphasize it.

But I caught on how to use that method, and I used that one damn tool again and again.
So because I was self-taught using that book, I had peculiar methods of doing integrals.
The result was, when guys at MIT or Princeton had trouble doing a certain integral, it
was because they couldn't do it with the standard methods they had learned in school. If
it was contour integration, they would have found it; if it was a simple series expansion,
they would have found it. Then I come along and try differentiating under the integral sign,
and often it worked. So I got a great reputation for doing integrals, only because my box of
tools was different from everybody else's, and they had tried all their tools on it before
giving the problem to me.}{}{}

\bibliographystyle{plain}
\bibliography{biblio}

\end{document}


In this example the document compiles fine when using \citep[s39-41]{Feynman} and fails when one uses \citep[s39-41]{Feynman} After some more testing it seems the document does compile when using no spaces in the quotes. But the result is somewhat bizarre.. Does anyone know how to correctly use csQuote and \citep ?

The optional argument to \citep confuses LaTeX, because the ] is taken as the end of the optional argument to \textquote.

Just put the command in braces.

Here's an edited version.

\begin{filecontents}{\jobname.bib}
@book{Feynman,
author = {Richard P. Feynman},
title = {Surely You're Joking, {Mr.} {Feynman}!},
publisher = {W. W. Norton Company, Inc.},
year = {1985},
}
\end{filecontents}

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,norsk]{babel}
\usepackage[sort,numbers,square]{natbib}
\usepackage{csquotes}

\begin{document}

\begin{hyphenrules}{english}
\textquote[Feynman {\citep[s39-41]{Feynman}}]{One thing I never did learn was contour
integration. I had learned to do integrals
by various methods shown in a book that my high school physics teacher Mr. Bader had
given me. That book also showed how to differentiate parameters under the integral
sign—it's a certain operation. It turns out that's not taught very much in the
universities; they don't emphasize it.

But I caught on how to use that method, and I used that one damn tool again and again.
So because I was self-taught using that book, I had peculiar methods of doing integrals.
The result was, when guys at MIT or Princeton had trouble doing a certain integral, it
was because they couldn't do it with the standard methods they had learned in school. If
it was contour integration, they would have found it; if it was a simple series expansion,
they would have found it. Then I come along and try differentiating under the integral sign,
and often it worked. So I got a great reputation for doing integrals, only because my box of
tools was different from everybody else's, and they had tried all their tools on it before
giving the problem to me.}{}{}
\end{hyphenrules}

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}