natbib

The man who wrote natbib did not much like the name. In natbib.dtx, the package's documented source, Patrick W. Daly explains that it came from Stephen Gildea's natsci.bst — natsci for natural sciences — and adds, in parentheses, that this is admittedly an ugly name which is now too established to change. Ugly or not, \usepackage{natbib} is still how a LaTeX document gets author–year citations such as (Jones et al., 1990) out of classic BibTeX. This page goes past the grammar of \citet and \citep, which belongs to the page on citing, and into the places people actually get stuck: which .bst files natbib can and cannot work with, what (author?) is telling you, and which of round, square, \bibpunct and \setcitestyle is really deciding your brackets.

\usepackage{natbib} and the three styles it ships with: plainnat, abbrvnat, unsrtnat

Two lines in the preamble do it: \usepackage{natbib} and \bibliographystyle{plainnat}. The second matters more than it looks, and getting it wrong is what breaks citations. natbib ships three .bst files — plainnat, abbrvnat and unsrtnat — that format the reference list exactly like the standard plain, abbrv and unsrt but write one extra thing into every \bibitem: the author and the year, separately labelled. That extra label is the whole trick. A standard BibTeX style emits \bibitem{jon90} and nothing more, so LaTeX can only ever print an opaque number; the nat styles emit \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{jon90}, and from that one line natbib assembles an abbreviated author list, a full one, a year or a number on demand.

The run sequence is unchanged from plain BibTeX: latex (or pdflatex), then bibtex, then latex twice — the first pass writes the keys into the .aux file, bibtex builds the .bbl, and the last two read the labels back. For Japanese references, substitute pbibtex or upbibtex for bibtex. What natbib adds is a single thing: the same .bib and the same plainnat will also produce numeric citations if you ask for them. Author–year packages existed well before natbib appeared in 1993 — harvard, apalike, chicago, astron — but each of them tied a manuscript to one citation scheme, so moving to a numeric journal meant editing the body text. natbib learned to read all of their \bibitem labels and turned the scheme into a package option.

document.tex
\documentclass{article}
\usepackage{natbib}
\bibliographystyle{plainnat}   % not plain: only plainnat carries author and year
\begin{document}

The line-breaking algorithm is described by \citet{knuth1986}.
The same idea is used elsewhere \citep[chap.~2]{lamport1994}.

\bibliography{refs}
\end{document}

% pdflatex doc -> bibtex doc -> pdflatex doc -> pdflatex doc
% (pbibtex or upbibtex instead of bibtex for Japanese references)

Citations printing as (author?): Author undefined for citation

That pair — a bold (author?) in the PDF and Package natbib Warning: Author undefined for citation 'knuth1986' on page 1 in the log — means the .bst you named cannot do author–year. It is what \bibliographystyle{plain} plus \citet produces every single time: plain.bst writes bare \bibitem{knuth1986} labels, so there is no author for natbib to find, and \citet{knuth1986} degrades to (author?) [1]. The awkward part is that \citep in the same document looks perfectly fine — it only needs the number — so the damage hides easily in a long draft. The fix is to name a style that carries the data: plainnat instead of plain, abbrvnat instead of abbrv, unsrtnat instead of unsrt, or any of the author–year styles natbib understands (chicago, apalike, named, agsm, dcu, kluwer). Rerun bibtex after changing the style; editing the .tex file alone will not refresh the labels in the .bbl.

thebibliography
% plain.bst writes this -- no author, no year, so \citet cannot work
\bibitem{jon90}

% plainnat.bst writes this -- short list, year, then the full list
\bibitem[Jones et al.(1990)Jones, Baker, and Williams]{jon90}

% apalike.bst and friends: the minimal form natbib still accepts
\bibitem[Jones et al., 1990]{jon90}

The whole family: starred \citet / \citep, plus \citealt, \citealp, \citeauthor, \citeyear

Everything past \citet and \citep exists to take a citation apart. The starred forms print the full author list instead of abbreviating with “et al.”; \citealt and \citealp print the same content as \citet and \citep without the brackets (the alt is textual, the alp parenthetical). \citeauthor returns the author alone and \citeyear the year alone, so you can assemble a sentence like “Jones and colleagues argued, back in 1990, that…” by hand. The outputs below come from \usepackage[round]{natbib} with plainnat; the key jon90 stands for Jones, Baker, and Williams (1990). It is worth noting that \citet was not there from the start: natbib was released in 1993, but \citet only arrived in version 6.2 on 11 January 1996 — the command the package is now known by postdates the package itself by more than two years.

CommandExample outputUse
\citet{jon90}Jones et al. (1990)textual; the author becomes part of the sentence
\citep{jon90}(Jones et al., 1990)parenthetical; the whole thing sits in brackets
\citet*{jon90}Jones, Baker, and Williams (1990)full author list, textual
\citep*{jon90}(Jones, Baker, and Williams, 1990)full author list, parenthetical
\citealt{jon90}Jones et al. 1990\citet with the brackets removed
\citealp{jon90}Jones et al., 1990\citep with the brackets removed; for brackets of your own
\citeauthor{jon90}Jones et al.the author alone
\citeauthor*{jon90}Jones, Baker, and Williamsthe full author list alone
\citefullauthor{jon90}Jones, Baker, and Williamsidentical to \citeauthor*; the older spelling
\citeyear{jon90}1990the year alone
\citeyearpar{jon90}(1990)the year in brackets, for a sentence that already named the author
\citetext{priv.\ comm.}(priv. comm.)free text inside the citation brackets
\citenum{jon90}21the bare number, with no brackets and no superscript

Every \cite… command accepts the same square-bracket notes, but Daly's own manual states plainly that notes are meant for \citep. Attaching one to \citeyear or \citeauthor is not an error, but it is silently ignored in numeric mode and only the post-note is honoured in author–year mode. Passing several keys to \citet is likewise described as not recommended: with notes, the pre-note is repeated before every year while the post-note attaches only to the last, and Daly calls these admitted bugs whose removal is not justified by the questionable usefulness of the feature. In practice, leave grouped citations to \citep and keep \citet to one work at a time. Several works by the same author in the same year are merged automatically, as (Jones et al., 1990a,b).

latex
The algorithm is due to \citet{knuth1986}.
It runs in linear time \citep[Theorem~3]{knuth1986}.
See the discussion of line breaking \citep[see][chap.~2]{knuth1986}.
Similar ideas appear elsewhere \citep{knuth1986,lamport1994}.
Both papers agree \citep{jon90a,jon90b}.   % -> (Jones et al., 1990a,b)

% author and year taken apart by hand
\citeauthor{jon90} first made the claim in \citeyear{jon90}.

\Citet and \Citep: capitalising “della” or “van der” at the start of a sentence

Use the capitalised forms \Citet, \Citep, \Citealt, \Citealp and \Citeauthor (starred versions exist too). You need them when a surname carries a “von part” — the della of della Robbia, the van der of van der Waals. Mid-sentence the lowercase is correct, so \citet{dRob98} sets della Robbia (1998); but a sentence that opens with that name must open with a capital. natbib does not rewrite the surname in your .bib — it uppercases only the first letter of the output, so the same work can be cited both mid-sentence and sentence-initially while the reference list keeps a single spelling.

CommandOutput
\citet{dRob98}della Robbia (1998)
\Citet{dRob98}Della Robbia (1998)
\Citep{dRob98}(Della Robbia, 1998)
\Citealt{dRob98}Della Robbia 1998
\Citealp{dRob98}Della Robbia, 1998
\Citeauthor{dRob98}Della Robbia

From author–year to numbers or super without touching the body text

Change one word in the options. With \usepackage[numbers]{natbib}, \citet{jon90} becomes Jones et al. [21], \citep{jon90} becomes [21], and the noted \citep[chap.~2]{jon90} becomes [21, chap. 2]. \usepackage[super]{natbib} gives the superscript numbers used by Nature and its relatives. The \citet and \citep in your text stay exactly as they are — which is precisely why Daly wrote natbib: the design goal was that changing target journals should mean editing one line of the preamble and nothing else. The reference list itself is the .bst file's business, so plainnat can stay while the citations turn numeric.

Numeric mode brings three ordering options into play. sort puts multiple citations into reference-list order, compress collapses consecutive runs into ranges, and sort&compress does both — that is what turns \citep{a,b,c} from [21, 19, 20] into [19–21]. Two things to watch. Multiple keys in \citet make even less sense here than in author–year mode, since all you get is an author list in front of a string of numbers. And in super mode \citeyearpar behaves exactly like \citeyear, losing its brackets; a journal that wants brackets around a superscript, in the style of (Ref. 21), has to supply them explicitly with \setcitestyle{open={(},close={)}}. And one command quietly breaks the promise of this whole section: plain \cite follows \citet in author–year mode but \citep in numeric and superscript modes, so a sentence built around it changes grammatical role the moment you switch. With natbib, write \citet or \citep and never \cite.

latex
% author-year, the mode the nat styles assume
\usepackage{natbib}

% numeric, sorted, consecutive runs folded into ranges: [19-21]
\usepackage[numbers,sort&compress]{natbib}

% superscript numbers, as used by Nature and its relatives
\usepackage[super,sort&compress]{natbib}

% the body text is identical in all three cases

Why plainnat prints [Jones et al., 1990]: round, square, \bibpunct, \setcitestyle

Because \bibliographystyle{plainnat} calls natbib's own \bibstyle@plainnat, which is defined as \bibpunct{[}{]}{,}{a}{,}{,}. natbib carries a lookup table of punctuation keyed by .bst name — chicago gets round brackets and semicolons, agu square brackets, nature bracketless superscripts — and plainnat, abbrvnat and unsrtnat are all assigned square brackets with comma separators. You will often read that natbib defaults to round parentheses; that default is only visible with a .bst whose name is not in natbib's table. Conversely, naming any bracket, separator or mode option makes natbib execute its internal nobibstyle and switch the .bst-driven punctuation off. So \usepackage[round]{natbib} restores parentheses even with plainnat, and \usepackage[authoryear]{natbib} deliberately turns the mechanism back on.

OptionEffect
roundround parentheses (…); the default when the .bst name is unknown to natbib
squaresquare brackets […]
curlycurly braces {…}
angleangle brackets <…>
semicolonseparate multiple citations with a semicolon
colonidentical to semicolon; the misnamed original, given its correct spelling in 8.0
commaseparate multiple citations with a comma
authoryearauthor–year mode; also switches the .bst-driven punctuation back on
numbersnumeric mode; internally also executes square and comma
supersuperscript numbers with empty brackets (the Nature style)
sortput multiple citations into reference-list order
compressfold consecutive runs into ranges without sorting
sort&compresssort and then fold into ranges, giving [19–21]
longnamesfirstfull author list on the first citation of each work, et al. thereafter
sectionbibwith chapterbib, set the reference list as a \section*
mergemerge keys marked with * under a single number; the mcite feature

To change the look after the package is loaded, use \setcitestyle{…}, added in natbib 8.0 in 2007. It takes a comma-separated list of keywords: the mode is authoryear, numbers or super; the brackets round, square, curly or angle; the separator semicolon or comma. Finer control comes from key={value} pairs — open={(} and close={)} for the brackets themselves, citesep={;} between multiple citations, aysep={,} between author and year, yysep={,} between years, and notesep={, } before a note. Writing \setcitestyle{square,aysep={},yysep={;}} therefore matches a submission rule that asks for square brackets, no comma between author and year, and semicolons between years.

preamble
\usepackage[round,semicolon]{natbib}   % (Jones et al., 1990; Smith, 1989)
\bibliographystyle{plainnat}

% change it again, later in the preamble (natbib 8.0 and later)
\setcitestyle{square,aysep={},yysep={;}}

% the older equivalent: [notesep]{open}{close}{citesep}{mode}{aysep}{yysep}
% mode: n = numeric, s = superscript, anything else = author-year
\bibpunct[, ]{(}{)}{;}{a}{,}{,}

\bibpunct is the older command for the same job, and it takes one optional plus six mandatory arguments: in order, the opening bracket, the closing bracket, the separator between multiple citations, the mode (n for numeric, s for superscript, anything else for author–year), the punctuation between author and year, and the punctuation between years of the same author. The leading optional argument is the string placed just before a note, , by default. \setcitestyle reads more clearly, so prefer it in new documents and treat \bibpunct as something you need to be able to read when you meet it in an old manuscript or a class file. You can also borrow just the punctuation of a known .bst with \citestyle{chicago}, and to attach punctuation to a .bst of your own, put \newcommand{\bibstyle@mystyle}{\bibpunct…} in a natbib.cfg file — \bibliographystyle{mystyle} will then apply it by itself.

Classes that load natbib for you: elsarticle's nonatbib, and the cite package you must not add

If \citet works and you never wrote \usepackage{natbib}, the class file loaded it. Elsevier's elsarticle runs \RequirePackage[\@biboptions]{natbib} and provides \documentclass[nonatbib]{elsarticle} specifically so that you can stop it. The American Physical Society's revtex4-2 loads it as \RequirePackage[sort&compress]{natbib}, pinned to a minimum version. Ninety-two class files in TeX Live 2024 mention natbib, and Daly himself wrote that it is supported — demanded — by many journals. One trap follows from this. Adding \usepackage{cite} to tidy up your numbers produces Package natbib Warning: The 'cite' package should not be used with natbib. Use option 'sort' instead. The replacement for cite is sort or sort&compress; the replacement for mcite is the merge or elide option. And citeref must be loaded after natbib, or you get an error.

natbib or biblatex: which one to start a new document with

If the submission rules name a .bst, use natbib; if you are starting a new document and can choose freely, biblatex is the stronger option. natbib's advantage is that your existing .bib files, .bst styles and the bibtex program keep working untouched, and — as we have just seen — a great many journal classes assume it. biblatex, paired with the biber backend that does the sorting, controls both ordering and formatting on the LaTeX side and was designed from the start for multilingual, localised output. natbib itself stopped moving at version 8.31b in 2010; its merge and elide code was commissioned by the American Physical Society and written by Arthur Ogawa — the (PWD, AO) in the version string is the two authors' initials. The two cannot be combined, so pick one. The command correspondences (\citet\textcite, \citep\parencite) are on the citing page, and the biblatex side is covered on the biber / biblatex page.