2

I'm trying to create a citation like:

The books (Charles, 1985; Smith, 1989) are great.

by using package natbib and

\begin{thebibliography}{99}

\bibitem[(Charles, 1985)]{Charles85}

\bibitem[(Smith, 1989)]{Smith89}

\end{thebibliography}{}

But the command \citep{Charles85,Smith89} does not seem to work.

moewe
  • 175,683
  • 1
    (<Name>, <Year>) is not a format natbib can parse in the optional argument to \bibitem. Drop the parentheses and try <Name>, <Year>: \bibitem[Charles, 1985]{Charles85} – moewe Mar 12 '19 at 21:41
  • https://tex.stackexchange.com/a/134182/11604 – Fran Mar 12 '19 at 21:47

1 Answers1

2

natbib needs the author and year information in the optional argument of \bibitem to be in a special format so it can be parsed. natbib.sty explains the possible formats in a comment

 % If author-year citations are selected, \bibitem must have one of the
 %   following forms:
 %   \bibitem[Jones et al.(1990)]{key}...
 %   \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}...
 %   \bibitem[Jones et al., 1990]{key}...
 %   \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones
 %       et al.}{1990}]{key}...
 %   \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}...
 %   \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}...
 %   \bibitem[\protect\citename{Jones et al., }1990]{key}...
 %   \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}...

The format used in the question

\bibitem[(Charles, 1985)]{Charles85}

is not among the supported formats. The simplest way to make the information digestible for natbib is probably by dropping the parentheses to make it read

\bibitem[Charles, 1985]{Charles85}

Alternatively, you could use the format that natbib's standard .bst files use

\bibitem[Charles(1985)]{Charles85}

In total

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{natbib}


\begin{document}
\citep{Charles85,Smith89}

\begin{thebibliography}{99}

\bibitem[Charles, 1985]{Charles85} Anne Charles: \emph{Title}. 1985

\bibitem[Smith, 1989]{Smith89} Jane Smith: \emph{Another Title}. 1989

\end{thebibliography}
\end{document}

(Charles, 1985; Smith, 1989)


That said, it is usually more comfortable to use .bib files and BibTeX (or biblatex and Biber: bibtex vs. biber and biblatex vs. natbib) instead of a manual thebibliography. Entries can be re-used and re-styled more easily and BibTeX (or Biber) takes care of sorting.

moewe
  • 175,683
  • additionally writing bibliographies (even inside of a bib file) in a manual fashion is a very complicated process compared to how life is with tools like jabreb and the like – der bender Mar 16 '19 at 00:05
  • How do you get this setup to number the references? – Shaun Mar 06 '24 at 16:01
  • 1
    @Shaun \usepackage[numbers]{natbib} instead of \usepackage{natbib} should work. Or you fine-tune the output with \setcitestyle. – moewe Mar 06 '24 at 19:10
  • Thank you, @moewe. I'll try this tomorrow, once I have time. – Shaun Mar 06 '24 at 19:12