How-to

citep vs citet in LaTeX: What Is the Difference?

The fix

In LaTeX's natbib package, \citet{key} gives a textual citation, Smith (2020), for when the author is part of your sentence; \citep{key} gives a parenthetical one, (Smith, 2020), for a reference at the end of a clause. Load \usepackage[round]{natbib} with an author-year style such as plainnat. In biblatex the same pair is \textcite and \parencite.

Not sure it worked on your document? Paste it into LetX and compile it, free and in the browser.

Why it happens

Author-year styles need two forms of the same citation: one where the name is part of the sentence, and one where the whole reference is an aside. Plain LaTeX has only \cite, so natbib adds the pair, t for textual and p for parenthetical. The bracket shape comes from package options, not from the command: plainnat on its own gives square brackets, [Smith, 2020], so add [round] for (Smith, 2020).

Example

\usepackage[round]{natbib}
% in the document:
\citet{smith2020} showed that ...    % Smith (2020) showed that ...
... as reported \citep{smith2020}.   % ... as reported (Smith, 2020).

\bibliographystyle{plainnat}
\bibliography{refs}

Every natbib citation command

The starred forms print the full author list instead of "et al.", and the alt and alp forms drop the brackets, for use inside parentheses of your own. \citeauthor and \citeyear print one part only. Several keys in one command are separated by commas in the source and, with the round option, by semicolons in the output. The outputs below are for \usepackage[round]{natbib} with plainnat, and lee2021 has three authors.

\citet{lee2021}              % Lee et al. (2021)
\citet*{lee2021}             % Lee, Kim, and Patel (2021)
\citep{lee2021}              % (Lee et al., 2021)
\citep*{lee2021}             % (Lee, Kim, and Patel, 2021)
\citealt{lee2021}            % Lee et al. 2021
\citealp{lee2021}            % Lee et al., 2021
\citeauthor{lee2021}         % Lee et al.
\citeyear{lee2021}           % 2021
\citeyearpar{lee2021}        % (2021)
\citep{lee2021,smith2020}    % (Lee et al., 2021; Smith, 2020)
\citep[p.~5]{lee2021}        % (Lee et al., 2021, p. 5)
\citep[see][]{lee2021}       % (see Lee et al., 2021)
\citep[see][ch.~2]{lee2021}  % (see Lee et al., 2021, ch. 2)

Brackets, separators and numeric citations

natbib takes its punctuation from options: round or square for the brackets, semicolon or comma between several citations, and numbers for numeric styles. With numbers, \citet{key} prints "Lee et al. [2]" and \citep{key} prints "[2]", so a paper can switch between author-year and numeric citations without rewriting the text. Add sort&compress to turn [3, 1, 2] into [1–3].

If your document class already loads natbib, as elsarticle does, loading it again with other options stops with "Option clash for package natbib". Set the style with \setcitestyle{authoryear,round} in the preamble instead, or use the class's own option, such as \documentclass[authoryear]{elsarticle}.

The biblatex equivalents

biblatex has its own names: \textcite for \citet and \parencite for \citep, plus \autocite, which follows the style's default. Load it with natbib=true and the natbib names work too, so a document written for natbib switches without edits. Compile with biber instead of BibTeX.

One difference catches people out. biblatex adds "p." itself when the page note is a number, so \parencite[12]{smith2020} prints "(Smith, 2020, p. 12)". natbib prints exactly what you type, so there you write \citep[p.~12]{smith2020}.

\usepackage[style=authoryear,natbib=true]{biblatex}
\addbibresource{refs.bib}
% in the document:
\textcite{smith2020} argues ...      % Smith (2020) argues ...
... as shown \parencite{smith2020}.  % ... as shown (Smith, 2020).
\parencite[12]{smith2020}            % (Smith, 2020, p. 12)
\citet{smith2020}                    % works too, thanks to natbib=true
\printbibliography

Errors and odd output

"Package natbib Error: Bibliography not compatible with author-year citations": the bibliography style is numeric, such as plain or ieeetr. Switch to an author-year style (plainnat, abbrvnat, unsrtnat or your journal's .bst), or load natbib with the numbers option. Until you do, \citet prints "(author?)" in place of the name.

"Citation `smith2020' on page 1 undefined" and a (?) in the text: BibTeX has not run yet, or the key is misspelled. The build order is pdflatex, bibtex, pdflatex, pdflatex.

"Undefined control sequence" on \citet or \citep: natbib is not loaded. Plain LaTeX has only \cite.

Frequently asked questions

When should I use citet vs citep?

Use \citet when the author name is part of your sentence ("Smith (2020) argues..."); use \citep when the whole citation sits in parentheses at the end ("...as shown (Smith, 2020).").

Do citep and citet work without natbib?

No. They are natbib commands. Load \usepackage{natbib}, or use biblatex with \usepackage[natbib=true]{biblatex}. Plain LaTeX provides only \cite.

How do I add a page number to citep?

Pass it as the optional argument: \citep[p.~5]{smith2020} prints "(Smith, 2020, p. 5)". With two optional arguments the first is a prefix: \citep[see][p.~5]{smith2020}.

Why does \citep use square brackets?

plainnat defaults to square brackets. Load \usepackage[round]{natbib}, or call \setcitestyle{round}, to get (Smith, 2020).

What is the biblatex equivalent of \citet and \citep?

\textcite and \parencite. With \usepackage[natbib=true]{biblatex}, the natbib names \citet and \citep work as well.

Why does \citet print (author?)?

Your bibliography style is numeric, so natbib has no author-year data to print. Use plainnat or another author-year style, or load natbib with the numbers option.

Related LaTeX fixes

Browse all LaTeX problems & fixes, or start with the LaTeX guide.

Learn the topic properly

Try the fix in LetX

Open the editor, paste your code, and compile in seconds to see the error clear. Free, in your browser.

Open LetX Free