## LaTeX forum ⇒ General ⇒ BibTeX & "undefined control sequence"

LaTeX specific issues not fitting into one of the other forums of this category.
meklenborg
Posts: 18
Joined: Tue Mar 20, 2007 7:42 pm

### Re: BibTeX & "undefined control sequence"

Shouldn't I find .bst and .bbl files when searching my computer? The search doesn't return any files. Could this be the problem?

pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm
My apologies. For natbib bibliography style, the document will need \usepackage[options]{natbib} in the preamble. The options are outlined in the natbib documentation.

However, this is not always the case for BibTeX styles. Personally, the BiBTeX styles I use (apsrev.bst, IEEETran.bst, and osajnl.bst) do not require definition in the document preamble---I just select the BibTeX style with the \bibliographystyle command at the end of the document.

The available BibTeX styles (*.bst) are locatable in the MiKTeX directory (for example, C:\Program Files (x86)\MiKTeX 2.5\bibtex\bst).

Patrick.

hydropower
Posts: 1
Joined: Mon Jun 09, 2008 5:12 pm
I know I'm one year late, but I also came upon this problem when I was trying to use the chicago style. Anyway, what solved the problem was simply to download the file "chicago.sty" and add \usepackage{chicago} to the preamble of my document.

D.

Posts: 2
Joined: Thu Jun 12, 2008 8:30 pm
well, you are not too late since I'm facing similar issues! I want to use either chicago or the humanbio styles and get the same error messages as Cristine. Can you tell me how to download (and where to put it) the chicago.sty file. Do you have an idea were I can get apa.sty ? It supposedly can help avoiding the message I get when I use the BiBTeX style "humanbio".

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Here (at CTAN (Comprehensive TeX Archive Network)) you gan get the bibliographical styles, including humanbio.bst, chicago.bst and apa.bst.

You can save the .bst files in your current working directory (the same directory (folder) that contains the .tex file)
1,1,2,3,5,8,13,21,34,55,89,144,233,...

joye
Posts: 1
Joined: Wed Jun 25, 2008 11:50 pm
1. In the preamble, use command \usepackage{natbib} for specifying the appearance of citation in the context.
2. For the bibliography command section, use the command \bibliographystyle{chicago} for specifying the appearance of the bibliography at the end of the article.

Either using chicago.sty or installing chicago.bst works well.

At least, it worked very well to me.
Good luck!
Hope this won't be too late for help.

Joye

jkobori
Posts: 3
Joined: Sun Oct 26, 2014 4:36 pm
Hi,

I'm having an "undefined control sequence" problem when trying to compile the tex source.

LaTeX Warning: Citation article2019' on page 2 undefined on input line 26.

(./texfile.bbl [2]
! Undefined control sequence.
l.6 \newblock {\em \apj
}, 42:44, July 2018.

I discovered that if I remove the "\" from the beginning of "\apj" in the bibfile.bib
then it works. Unfortunately, I couldn't figure out what causes this strange behaviour.
I use the pdflatex, bibtex, pdflatex, pdflatex compilation process.
Could you help me out?
Thanks!

The main file:

\documentclass[12pt]{book}\usepackage[utf8]{inputenc}\begin{document}\begin{titlepage}\begin{center}Unknown University\\Faculty of Something\\PhD Thesis\\\vspace{2cm}\hugeMy research\\\large\vspace{1cm}\textbf{It is me}\\\vspace{1cm}Somewhere, 2019\end{center}\end{titlepage}citing somebody \cite{article2019}\bibliographystyle{plain}\bibliography{bibfile}\end{document}

The bib file:

@ARTICLE{article2019, author = {{Author}, Mr.}, title = "{title of the paper}", journal = {\apj},archivePrefix = "arXiv", eprint = {1111.00111}, primaryClass = "astro-ph.HE", keywords = {some words:text}, year = 2018, month = jul, volume = 42, eid = {43}, pages = {44}, doi = {10.1234546846}, adsurl = {http://theInternet}, adsnote = {Provided by the System}}

rais
Posts: 220
Joined: Sun Nov 16, 2014 8:51 pm
jkobori wrote:I'm having an "undefined control sequence" problem when trying to compile the tex source.

LaTeX Warning: Citation article2019' on page 2 undefined on input line 26.

(./texfile.bbl [2]
! Undefined control sequence.
l.6 \newblock {\em \apj
}, 42:44, July 2018.

I discovered that if I remove the "\" from the beginning of "\apj" in the bibfile.bib
then it works. Unfortunately, I couldn't figure out what causes this strange behaviour.

a backslash usually starts a LaTeX command. The message just means, that \apj' has not been defined as such a command.
You could try adding s.th. like
\newcommand*\apj{Astrophysical Journal}

KR
Rainer

jkobori
Posts: 3
Joined: Sun Oct 26, 2014 4:36 pm
Hi Rainer,

Actually, I realized that the source I take the citations from automatically puts the backslash there
and it can not be configured to leave it out, so I have to manually remove them.
There are numerous journals I cite so making a \newcommand for all of them would be much more work.
Anyway, thanks again!

Joseph

rais
Posts: 220
Joined: Sun Nov 16, 2014 8:51 pm
Hi Joseph,
jkobori wrote:Actually, I realized that the source I take the citations from automatically puts the backslash there
and it can not be configured to leave it out, so I have to manually remove them.
There are numerous journals I cite so making a \newcommand for all of them would be much more work.

well, since I don't know your source I cannot comment on that (other than what business does it have to add backslashes?' OTOH there might be some .sty file provided by your source defining those journal names, in which case you'd just need to load it into your preamble)
Anyway, it depends on what such a journal should look like in your output.
Would you rather have apj' than Astrophysical Journal' (if, indeed, that is, what `apj' stands for)?

KR
Rainer