# LaTeX doesn't like my \hspace

Using TeXShop, I get complaints when LaTeXing the following code:

\beq
\mathrm{Cosmic\; ray\; } p + \mathrm{Nucleus}   \longrightarrow  \pi + \dots
\eeq
\vspace{-.30 cm}
\hspace{6.05 cm}   $\decayarrow} \mu + \num$
\newline
\hspace*{6.95 cm}   $\decayarrow} e + \nue + \num$

The command \decayarrow is defined in the preamble as:
\def\decayarrow{\kern0.2em\hbox{$\raise1.08ex\hbox{\big|}\kern-0.5em \longrightarrow$}\,}


Here is the relevant part of the console log (I hit Return after the ?):

[Loading MPS to PDF converter (version 2006.09.02).]
)
! Extra }, or forgotten $. l.43 \hspace{6.05 cm}$ \decayarrow}
\mu + \num$? ! Extra }, or forgotten$.
l.45 \hspace*{6.95 cm}   $\decayarrow} e + \nue + \num$
?
[1{/usr/local/texlive/2009/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]


The resulting pdf looks OK, and I can't find any unbalanced $or curly brackets. If I comment out the two lines beginning with \vspace, there's no problem; commenting out one of the \hspace lines means I only have to hit Return once to complete texing. So, it's an \hspace problem, but what? I'm using a very old Mac Powerbook, running 10.5.8 (the latest it can run), with TeXShop v2.43 (I don't know if a newer version will help, or even if it can run; likewise, I haven't updated my TeX installation for many years on this device). • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Nov 8 '14 at 18:42 • You should not use that much \hspace and \vspace commands at all, they destroy the typographic layout in my point of view – user31729 Nov 8 '14 at 18:43 ## 1 Answer As clearly shown in your error message $ \decayarrow} \mu + \num\$


You have a } with no { in that math expression.

The markup is hmm strange, you really shouldn't have any \hspace or \newline within the document markup. Hard to say from a fragment but this should presumably be using align.

 \hbox{\big|}\

from the definition you show will also generate errors as \big is a math mode command and the contents of \hbox are set in text mode.