Skip to main content
The 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.
Classic BibTeX styles such as 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: with plainnat and natbib’s defaults, \citep prints square brackets ([Chen et al., 2021]). Pass round in \usepackage[authoryear,round]{natbib} or add \setcitestyle{round} for parentheses.
  • Using \bibliographystyle{plain} in authoryear mode: this stops compilation with Package natbib Error: Bibliography not compatible with author-year citations. Switch to plainnat (or another author-year .bst style), or load natbib with numbers.
  • Adding .bib inside \bibliography{...}: write \bibliography{references}, not \bibliography{references.bib}.
  • Missing bibliography pass: natbib needs the same BibTeX build as any .bst style; see Compiling your bibliography.
For build diagnostics and missing references, see Fix bibliography build errors. Ready to try natbib 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.