3

I am using the book option of the combine class. When I format the following example, the citations typeset as [0,0] instead of [1,2]. The bibliography items all begin with zero. I did not import a file in my posted example, but the same thing happens to imported files. I would like a solution to this problem.

\documentclass[book]{combine}
\usepackage[numbers]{combnat}
\begin{document}
\title{The collection}
\author{A. N. Editor}
\date{\today}
\maketitle
\tableofcontents
\chapter{First chapter}
\section{Introduction}
Chapter citations: \cite{article01, article02}.
\bibliographystyle{plainnat}
\begin{thebibliography}{2}
  \providecommand{\natexlab}[1]{#1}
  \providecommand{\url}[1]{\texttt{#1}}
  \expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
  \bibitem[Name(1986)]{article01}
  Author Name.
  \newblock My article.
  \newblock \emph{Mathematics}, 1986.

  \bibitem[Two(1987)]{article02}
  Author Two.
  \newblock Another article.
  \newblock \emph{Statistics}, 1987.
\end{thebibliography}
\end{document}
  • 1
    Well, it seems that combnat's compatibility with natbib is far from perfect. You have to use numbers as labels for \bibitems (e.g. \bibitem[1]{article01}). Otherwise simply load natbib instead of combnat. – karlkoeller Jan 27 '14 at 11:15
  • Using labels is a problem because my document contains several bibliographies. natbib does not work with imported files. Originally, I used comcite, which also required some modifications to get sorted citations in imported files. However, the book option caused the chapter heading to change to BIBLIOGRAPHY. This heading continued until the next chapter, which presented a problem if I had two or more articles in a chapter. I used the sectionbib option of natbib to help eliminate this problem. I should also mention that combnat works fine if I do not use the numbers option, which I must use. – Tom Price Jan 27 '14 at 11:42
  • @TomPrice I was able to use the comcite package by modifying the \thebibliography environment. – Tom Price Feb 4 '14 at 2:30
3
+50

This is a workaround.

The package combnat redefines the command \@lbibitem in a way that seems incompatible with the numbers options.

So we first load natbib with the numbers option and save the meaning of \@lbibitem

\usepackage[numbers]{natbib}
\makeatletter
\let\old@lbibitem\@lbibitem
\makeatother

Then we load combnat with the numbers option and restore the meaning of \@lbibitem

\usepackage[numbers]{combnat}
\makeatletter 
\let\@lbibitem\old@lbibitem
\makeatother

MWE:

\documentclass[book]{combine}
\usepackage[numbers]{natbib}
\makeatletter
\let\old@lbibitem\@lbibitem
\makeatother

\usepackage[numbers]{combnat}
\makeatletter 
\let\@lbibitem\old@lbibitem
\makeatother


\begin{document}
\title{The collection}
\author{A. N. Editor}
\date{\today}
\maketitle
\tableofcontents
\chapter{First chapter}
\section{Introduction}
Chapter citations: \cite{article01, article02}.
\bibliographystyle{plainnat}
\begin{thebibliography}{2}
  \providecommand{\natexlab}[1]{#1}
  \providecommand{\url}[1]{\texttt{#1}}
  \expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
  \bibitem[Name(1986)]{article01}
  Author Name.
  \newblock My article.
  \newblock \emph{Mathematics}, 1986.

  \bibitem[Two(1987)]{article02}
  Author Two.
  \newblock Another article.
  \newblock \emph{Statistics}, 1987.
\end{thebibliography}
\end{document} 

Output (citations):

enter image description here

Output (bibliography):

enter image description here

  • Your solution worked but the sort&compress option of combnat fails as it did with the combcite package. I suspect modifications to combnat similar to those I mentioned in my previous comment would correct this. I decided to use the modified combcite package. – Tom Price Feb 4 '14 at 17:24

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.