General ⇒ BibTeX & "undefined control sequence"
-
- Posts: 18
- Joined: Tue Mar 20, 2007 7:42 pm
Re: BibTeX & "undefined control sequence"
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- pumpkinegan
- Posts: 91
- Joined: Thu May 03, 2007 10:29 pm
Re: BibTeX & "undefined control sequence"
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.
-
- Posts: 1
- Joined: Mon Jun 09, 2008 5:12 pm
Re: BibTeX & "undefined control sequence"

D.
Re: BibTeX & "undefined control sequence"
BibTeX & "undefined control sequence"
You can save the .bst files in your current working directory (the same directory (folder) that contains the .tex file)
Re: BibTeX & "undefined control sequence"
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
BibTeX & "undefined control sequence"
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}
\huge
My 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}
}
BibTeX & "undefined control sequence"
a backslash usually starts a LaTeX command. The message just means, that `\apj' has not been defined as such a command.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.
You could try adding s.th. like
Code: Select all
\newcommand*\apj{Astrophysical Journal}
KR
Rainer
BibTeX & "undefined control sequence"
thank you for the reply!
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
BibTeX & "undefined control sequence"
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)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.
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