0

I am using superscript citations and it mostly is working fine, but when I try to add page numbers, I get a runaway argument error. An MWE is

\documentclass[12pt,reqno]{article}       % Sets 12pt font, equation numbers on right
\usepackage{amsmath,amssymb,amsfonts} % Typical maths resource packages
\usepackage{graphics}                 % Packages to allow inclusion of graphics
\usepackage{color}                    % For creating coloured text and background

\usepackage[colorlinks,citecolor=blue,linkcolor=blue]{hyperref}                 % For creating hyperlinks in cross references. It should be after the color package. The option colorlinks produces colored entries without boxes. The option citecolor=blue changes the default green citations to blue.

\usepackage{fancyvrb}%Verbatim
\usepackage{natbib}
\usepackage{latexsym}
\usepackage[dvipdf]{graphicx}
\usepackage{mathptmx}
\usepackage{alltt}
\usepackage{float}
\usepackage[toc,page]{appendix}

\usepackage{fancyhdr}
\usepackage[final]{showlabels}

\usepackage[superscript]{cite} \bibliographystyle{plain}


\title{Stories make us human}

\author{Peter Flom}

 \date{ }



\begin{document}
\maketitle

"Those who can recall and recount the past in ways that shape audience response can have considerable influence over decision making" \cite[p.\,169]{Boyd2009}


\bibliographystyle{plain}
\bibliography{c:/writing/references}


\end{document}

Boyd 2009 is in my references and citations to Boyd that do not include page numbers work fine.

  • 1
    The preamble loads natbib and cite. Normally one would only load one of the two. hyperref should usually be loaded as last (or almost last) package. Packages should be loaded only once (fancyhdr). graphicx already loads graphics, so the latter need not be loaded explicitly. – moewe Mar 22 at 15:38
  • Thanks I moved hyperref to the end, that didn't change things. When I tried commenting out natbib, I got a whole bunch of errors. I only see one use of fancyhdr (I searched the code). – Peter Flom Mar 22 at 15:45
  • 1
    Oops, sorry about the fancyhdr I confused fancyvrb for a second fancyhdr. Note that you should only have one \bibliographystyle (the code has two \bibliographystyle{plain}s). – moewe Mar 22 at 15:47
1

It is not recommended to load both cite and natbib. In most cases it probably does not matter a lot, but here it is an issue as

\documentclass{article}

\usepackage[super]{natbib}
\usepackage[superscript]{cite}

\begin{document}
Lorem \cite[p.\,169]{kullback}

\bibliographystyle{plain}
\bibliography{biblatex-examples}
\end{document}

shows.

To quote the natbib documentation, abstract, p. 1

[natbib] can also emulate the sorting and compressing functions of the cite package [...]. (The natbib package, however, is not compatible with either cite or mcite themselves.)

(This incompatibility is not a big issue for most use cases since natbib usually offers a superset of the features of cite.)

The document will only compile without error if you comment out one of the two \usepackages.

Unfortunately, neither package yields the output you presumably expected, because neither package supports superscript citations with page numbers/postnotes.

  • cite will just full on refuse to typeset the citation as superscript and will produce the normal "[1, p. 169]" instead.

  • With natbib you get a superscript citation, but the page number will just be dumped after the superscript as normal text in normal size on the baseline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.