LaTeX forum ⇒ BibTeX, biblatex and biberUndefined control sequence when I try to use citet and citep Topic is solved

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
prince_2018
Posts: 4
Joined: Sun Dec 17, 2017 2:31 am

Undefined control sequence when I try to use citet and citep

Postby prince_2018 » Sun Dec 17, 2017 2:35 am

Hello
I am working on the template below for a conference paper and whenever I try to use \citet or \citep, it says "underfind control sequence"

http://www.complexis.org/Templates.aspx

I would very much appreciate your help as I have a submission deadline.
Thanks a bunch

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Dec 17, 2017 8:11 am

I guess you did not load the natbib package.

\usepackage{natbib}

Stefan
Site admin

User avatar
Johannes_B
Site Moderator
Posts: 3825
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Dec 17, 2017 9:27 am

The template uses the bibiography packae apalike. You should replace that by natbib, as only natbib provides the commands you want to use.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

prince_2018
Posts: 4
Joined: Sun Dec 17, 2017 2:31 am

Postby prince_2018 » Sun Dec 17, 2017 2:58 pm

I used natbib, however when I compile I get the following:
Command \bibhang already defined. \newlength{\bibhang}

User avatar
Johannes_B
Site Moderator
Posts: 3825
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Dec 17, 2017 3:36 pm

Replace apalike in the example code with natbib.

Sidenote: A conference for future information systems ships a file that is distributed with every TeX distribution in an updated manner. That file is from 2000, and many updates have been done to not only for the article class. Package subfigure is deprecated for over a decade, epsfig should only be used for compatibility to documents pre 1994.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

prince_2018
Posts: 4
Joined: Sun Dec 17, 2017 2:31 am

Postby prince_2018 » Sun Dec 17, 2017 5:01 pm

I replaced it and got the following

\bibhang already defined. \newlength{\bibhang}
Suggestions?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Dec 18, 2017 5:16 am

Quick fix: disable \bibhang before loading natbib:

  1. \usepackage{apalike}
  2. \let\bibhang\relax
  3. \usepackage{natbib}


To make full use of natbib, you could check out options and possibilities in the natbib manual.

Stefan
Site admin

prince_2018
Posts: 4
Joined: Sun Dec 17, 2017 2:31 am

Postby prince_2018 » Mon Dec 18, 2017 5:52 am

Thanks a bunch. I really appreciate it.
It worked!


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 3 guests