Citep and citet do not work even when using the natbib package

I am writing a document in latex, and I have a large .bib file and a large number of links. I want to have quotes in the format [Author, year], and I use the natbib package, but I can not get citep or citet to work, although simple cite works fine. The error I get is:

! Undefined control sequence. l.3 lets cite \citet{cayton05} 

I use the Ubuntu texlive package and use the \input{<file>} latex command to enter chapters in the main .tex file.

Surprisingly, instead of using \input{<file>} , if I only have the text in the main .tex file, then all citation commands work.

Any help would be greatly appreciated.

The working version looks like this:

 \usepackage{cite} \usepackage[square,sort]{natbib} %% lot of other packages and formatting %% \begin{document} \chapter{Testing citations} \begin{enumerate} \item this is the first citation \cite{belkin02}. \item this is the second citation \citep{belkin02}. \item this is the third citation \cite{shlens03}. \end{enumerate} \phantomsection\addcontentsline{toc}{chapter}{Bibliography} \begin{spacing}{1.5} \nocite{*} \bibliographystyle{apalike} \bibliography{testnb.bib} \end{spacing} \end{document} 

In the real .tex file, I enter the text of the chapter from another .tex file, and citep and citet will not work with the error above, although plain cite will work fine.

I forgot to mention earlier that I used a simple bibliographic style with simple numbers, and everything worked, so there is no error in the input .tex files.

+6
latex biblatex
source share
2 answers

If \citep and \citet not working, you probably haven’t downloaded natbib .

From the document I'm working on now:

  \usepackage[authoryear,round,longnamesfirst]{natbib} 

You will need different options for more details - see the handy help sheet for natbib .

+17
source share

You should only include \usepackage[square,sort]{natbib} .

It will work after uninstalling \usepackage{cite} .

+3
source share

All Articles