TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a weird LaTeX error here. It seems as if the newline (\\) command is the culprit of a compilation error. The error shows up at the ending line of the .tex document: the \end{document} line, stating that this line has the undefined control sequence.

This code, though, is actually what causes the error. This will compile (formatted incorrectly):

\defn{Method of Moments Estimator (MOME)}{a} 
Properties of MOME:

But this won't compile (formatted correctly):

\defn{Method of Moments Estimator (MOME)}{a} \\
Properties of MOME:

The only difference is the \\ at the end of the line. I have no idea why this should not work. For reference, this is the \defn command that I made:

\textit{\textbf{Definition }}

And the \tab command:

\newcommand{\tab}{\text{    } \text{    } \text{    }}

I would greatly appreciate any help on this matter. Thank you to all who contribute.

share|improve this question

migrated from stackoverflow.com Jul 11 '11 at 22:15

This question came from our site for professional and enthusiast programmers.

closed as too localized by egreg, Lev Bishop, Caramdir, lockstep, Gonzalo Medina Aug 7 '11 at 22:42

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. – Martin Scharrer Jul 11 '11 at 22:21
Both compile for me. (side note, you should use \hspace to add horizontal space). – Caramdir Aug 7 '11 at 22:36