TeXpad

LaTeX error: Undefined control sequence

TeX met a command, a word starting with a backslash, that nothing has defined. It prints the line up to the unknown command, then stops. The command itself is the last thing on the first line of the error context.

! Undefined control sequence.

Try it: this example has the error

Press Fix it in the error box, and it compiles to a PDF. What pdfTeX printed for it:

! Undefined control sequence.
l.3 This is \textbff
                    {bold} text.
or paste your own document

Ready. Press Compile (or Ctrl/Cmd + Enter).

Open in the full editor →

Common causes

How to fix it

  1. Read the end of the first context line in the log: that is the unknown command.
  2. If it is a typo, correct it. TeXpad suggests the closest known command and fixes it in one click.
  3. If it belongs to a package, add the \usepackage line to the preamble. TeXpad recognizes over 130 common package commands and offers to add the package.

Related errors