Skip to content

Latex Undefined Control Sequence Print Bibliography Definition

LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ Undefined control sequence when using BibTeX in TexmakerTopic is solved

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.







Chuchu
Posts:4
Joined: Tue Apr 12, 2016 2:47 am

Undefined control sequence when using BibTeX in Texmaker

Postby Chuchu » Wed May 25, 2016 4:41 am

Hello everyone,

I'm a newbie and just trying to figure my way around in referencing using BibTeX.

I created "References.bib" file to be used in my "SummaryControlStrategyReviews.tex", see attached. I used the commands \cite, \bibliographystyle{apacite} and \bibliography{References} to cite the references in my article.

However, I encountered many errors and I'm pretty sure they are complaining about the same thing. the error states:
! Undefined control sequence.
\b@Tucker2015 ->\citeauthoryear
{Tucker\ \BOthers {.}}{Tucker\ \BOthers {.}}...
l.24 The review in \cite{Tucker2015}
has divided control strategies into thr...
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.

I've also attached the related log file.

Could someone please help me with this?

Thank you very much!
Attachments
SummaryControlStrategyReviews.log
(42.52 KiB) Downloaded 46 times
SummaryControlStrategyReviews.tex
(745 Bytes) Downloaded 44 times
References.bib
(1.08 KiB) Downloaded 42 times
Chuchu
Posts:4
Joined: Tue Apr 12, 2016 2:47 am

Postby Chuchu » Wed May 25, 2016 12:01 pm

Hi Johannes,

Thank you for your reply! Do you mean including \usepackage{apacite} in the preambles?

I did that. However, when I ran 'LaTeX' I came across an error claiming that I "! Misplaced alignment tab character &."?!

This error was followed by "I can't figure out why you would want to use a tab mark
here. If you just want an ampersand, the remedy is
simple: Just type `I\&' now. But if some right brace
up above has ended a previous alignment prematurely,
you're probably due for more error messages, and you
might try typing `S' now just to see what is salvageable.
! Misplaced alignment tab character &."

oh.my.gosh!
Johannes_B
Site Moderator
Posts:3639
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed May 25, 2016 6:32 pm

I am a bit surprised that this message causes trouble for so many people. Especially since the extended help message is quite clear.

Have a look at your entries, there are alignment tabs (that is the thing you use to explicitely tell LaTeX that a new table cell starts), which are unexpected. For normal instances, the message tells you what to do. In this special case, load package url in your preamble.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Chuchu
Posts:4
Joined: Tue Apr 12, 2016 2:47 am

Postby Chuchu » Wed May 25, 2016 10:51 pm

oh woah! thanks for that! My problem is fixed.

I later got rid of all the links in my reference, and was able to create the article without loading package url. My understanding is that maybe the https:// is causing the error.

However, I still do't understand why " Misplaced alignment tab character &" would lead to not including package url, since https:// hasn't got any "&" in it? I guess my REAL question is: how did you arrive to the conclusion that I need to load package url from reading the error message?

Thanks again for your patience, haha, I'm sure in 3 years time when I'm writing my thesis I'd look back at this post thinking, oh dear, what a noob I was.

Return to “BibTeX, biblatex and biber”

Jump to
  • LaTeX Community
  •    Announcements
  •    Community talk
  •    Comments & Wishes
  •    New Members
  • LaTeX
  •    Text Formatting
  •    Graphics, Figures & Tables
  •    Math & Science
  •    Fonts & Character Sets
  •    Page Layout
  •    Document Classes
  •    General
  • LaTeX's Friends
  •    BibTeX, biblatex and biber
  •    MakeIndex, Nomenclature, Glossaries and Acronyms
  •    Conversion Tools
  •    Viewers for PDF, PS, and DVI
  •    XeTeX
  •    Others
  • LaTeX Distributions
  •    Decision Guidance
  •    MiKTeX and proTeXt
  •    TeX Live and MacTeX
  •    Others
  • LaTeX Editors
  •    Decision Guidance
  •    AUCTeX
  •    Kile
  •    LEd
  •    LyX
  •    Scientific Word/Workplace
  •    Texmaker and TeXstudio
  •    TeXnicCenter
  •       Announcements
  •       General
  •       Templates, Wizards & Tools
  •       Feature Suggestions
  •       Development
  •    TeXShop
  •    TeXworks
  •    WinEdt
  •    WinShell
  •    Others
  • LaTeX Templates
  •    Articles, Essays, and Journal Templates
  •    Theses, Books, Title pages
  •    Letters
  •    Presentations and Posters
  •    Curricula Vitae / Résumés
  •    Assignments, Laboratory books and reports
  •    Calendars and Miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB® Forum Software © phpBB Limited

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