natbib package extends BibTeX with textual (\citet) and parenthetical (\citep) citations and supports both author-year and numbered citation modes. Load \usepackage[authoryear,round]{natbib} in the preamble, choose a compatible style such as \bibliographystyle{plainnat}, and link your .bib file with \bibliography{references}.
natbib-basic.tex
references.bib
Test this example live in your browser. Open a ready-to-compile LaTeX project with TeX Live 2026 preinstalled and zero local setup.Open starter article
\citet, \citep, and citation variants
natbib provides separate commands depending on whether the authors belong to the grammar of the sentence, whether all authors should be listed, or whether only the author or year is needed.
Add a single optional bracket for a postnote (
\citep[p.~14]{rivera2023}), or two optional brackets for both a prenote and a postnote (\citep[see][p.~14]{rivera2023}).
natbib-commands.tex
references.bib
Author-year vs. numeric mode and package options
You can switch the same document between author-year and numbered citations by changing the options passed to\usepackage[...]{natbib} (or calling \setcitestyle{...} in the preamble).
In numeric mode with
sort&compress, \citep{rivera2023,chen2021,agency2025} sorts the labels and compresses consecutive numbers into [1–3], while \citet{rivera2023} still names the authors before the bracketed number.
natbib-numbers.tex
references.bib
Compatible .bst styles
Three BibTeX styles ship alongside natbib and work in both authoryear and numbers modes:
plainnat: sorted alphabetically by author, full first names.abbrvnat: sorted alphabetically by author, abbreviated first names.unsrtnat: ordered by first citation in the text.
plain, unsrt, and abbrv work with natbib only in numbers mode, and even there \citet and \citeauthor print (author?), because these styles do not write author-year metadata into the .bbl file. To compare compiled bibliography styles, see Choosing citation styles. If your project is not tied to a BibTeX .bst template, consider BibLaTeX with Biber for new documents.
Common mistakes
- Square brackets with
plainnat: withplainnatandnatbib’s defaults,\citepprints square brackets ([Chen et al., 2021]). Passroundin\usepackage[authoryear,round]{natbib}or add\setcitestyle{round}for parentheses. - Using
\bibliographystyle{plain}inauthoryearmode: this stops compilation withPackage natbib Error: Bibliography not compatible with author-year citations. Switch toplainnat(or another author-year.bststyle), or loadnatbibwithnumbers. - Adding
.bibinside\bibliography{...}: write\bibliography{references}, not\bibliography{references.bib}. - Missing bibliography pass:
natbibneeds the same BibTeX build as any.bststyle; see Compiling your bibliography.
Related guides
Ready to trynatbib in the browser? Start from the Basic Article template in LaTeX Cloud Studio, replace main.tex with the complete example, and add references.bib to the project.