Undefined Control Sequence Bibliography Definition

This error appears when LaTeX does not understand one of the commands you have used.

[edit] Common Examples

Typo in a command:

The most common causes of such an error are simple typos. An example of such a typo is shown below, where you accidentally pressed instead of when writing


This will give an error message of

These errors are easily spotted by humans but can cause LaTeX to get confused as to what is being asked.

Forgetting to load a package:

Another cause of such an error is when a specific package is needed use a certain command, but it is accidentally forgotten in the preamble. An example of this would be

In this example, the document will fail to compile as LaTeX doesn't recognize the command. This is not a typo, as is a perfectly fine command. The problem is that you have forgotten to include in the preamble. When this line is included, the error message will disappear as LaTeX now knows how to interpret the command.


Backslash used in wrong place:

Another cause of an Undefined Control Sequence error is a backslash used inappropriately. This can happen particularly when writing file links as shown below.

The issue is that when LaTeX sees a backslash , it interprets what follows as a command. Here, there is no such command as \Users, so you will get an Undefined Control Sequence error. To avoid this, when writing text you should write a backslash as . For writing long file paths and urls, it may sometimes be more convenient to use the package rather than writing every time.

A typo when writing $\alpha$ could be $\Zlpha$

main.tex, line 10

Undefined control sequence.

<<recently read> \Zlpha l.10 A typo when writing $\alpha$ could be $\Zlpha $ The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. [1

I want to include a space after the word \LaTeX\xspace but I have forgotten to load the xspace package.
An error will be generated if you write a file path as   C:\Users\Files

Postby pumpkinegan » Mon May 14, 2007 7:02 pm

When you open the sample article tex file with WinEdt, it is advisable to set it as the main file (there should be an icon with a small green cross on the WinEdt interface). Sometimes BibTeX will not find the file to BibTeX unless WinEdt has a main file set.

After doing this, compile with LaTeX. Then run BibTeX. A bbl file should be generated. Open the bbl file, and it should contain:

\begin{thebibliography}{2}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
\providecommand{\doi}[1]{doi: #1}\else
\providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi

\bibitem[{Surname}(2007{\natexlab{a}})]{article_label}
Firstname~I. {Surname}.
\newblock Title of article.
\newblock \emph{Journal of Publication}, 1:\penalty0 1--2, May
2007{\natexlab{a}}.

\bibitem[{Surname}(2007{\natexlab{b}})]{book_label}
Firstname~I. {Surname}.
\newblock \emph{Title of Book}.
\newblock Publishing House, Address of Publishing House, 1 edition,
2007{\natexlab{b}}.

\end{thebibliography}


The fact that you are not getting an error, but just getting question marks at the \cite points suggests that the bbl file is not right. Is there a bbl file?
Now compile with LaTeX, and then compile again. The dvi should look like my previous post.

Patrick.


Notes:
1. WinEdt is just a nice text editor. MiKTeX is your flavor of LaTeX.
2. If you compile with texify.exe (instead of latex.exe) BibTeX will be run automatically, and the resulting dvi will open in YAP. WinEdt has a TeXify icon beside the LaTeX icon (the brownish lion).
Last edited by pumpkinegan on Mon May 14, 2007 10:33 pm, edited 1 time in total.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *