10

I have issues with the commands citet and citep. The error

undefined control sequence

appears. As I looked up some solutions for this error, someone suggested that natbib is not installed.

However, if I try to load \usepackage{natbib}, I get the error

Command \bibhang already defined.

Here is the code I use:

\documentclass[a4paper]{article}

\usepackage[left=4cm, right=3cm, top=3cm, bottom=3cm]{geometry}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc} 

\usepackage{amsmath,amsfonts,amssymb}

\usepackage{graphicx}

\usepackage{booktabs}

\usepackage{biblatex}

\usepackage{csquotes}

\usepackage{natbib}

\renewcommand{\baselinestretch}{1.5}

\sloppy

\addbibresource{bareferences.bib}

I use TeXmaker in conjunction with TeX Live on macOS Mojave.

0

1 Answer 1

20

By default biblatex only defines its own set of citation commands (including \cite, \parencite, \textcite, \footcite, ...; this is not strictly speaking exactly true: most common citation commands are actually defined by the citation style, but most styles define the same basic repertoire of commands). biblatex does not define the natbib commands \citet and \citep.

But biblatex has commands that do a similar thing. The biblatex equivalent of \citet is \textcite and the equivalent of \citep is \parencite. I usually prefer to use the biblatex name, a quick search-and-replace on your document should be enough. Note that biblatex's \cite usually (certainly in the standard styles) differs from the behaviour of \cite with natbib. However natbib discourages \cite and strongly encourages use of \citet or \citep instead, so that should be less of an issue for those following this advice.

If you want to keep on using the natbib names even with biblatex, you can load biblatex with the option natbib=true to load the natbib compatibility mode. Note that the natbib compatibility mode will also change nameyeardelim, see Is there a disadvantage to using natbib=true with biblatex?.

In any case you can't load biblatex and natbib together, since the packages are incompatible. Adding \usepackage{natbib} to a preamble already loading biblatex will cause errors (depending on the loading order either a very clear one, or a slightly less clear one).

1
  • Thank you. Good answer.
    – Johannes_B
    Commented Jul 2, 2019 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .