0

I first tired to type up some maths without using any $$. And there was a ! Missing $ inserted warning message. So I've added the $$ at the beginning and at the end of each line like this

$$H_0:\beta_2=0 $$ \\

$$H_1:\beta_2 \neq 0 $$ \\

$$ F=\frac{(SS_{null}-SS_{full})\triangle p}{MS_{res}} \sim F_{\triangle p,n-p}=F_{1,13} $$ \\

Then I got an Missing $ inserted. <inserted text> error message for the last line. Where am I supposed to put the $$ sign?

Is it necessary to use them whenever I type up maths-related stuff? Can I just use it at the beginning and at the end of the document? Many thanks!

teox14
  • 1
  • 2
    Welcome to TeX-sx! We will need some more context here: if I paste the above into a small LaTeX document then all works (although you shouldn't use $$ in LaTeX: see http://tex.stackexchange.com/questions/503/why-is-preferable-to). (I'm assuming LaTeX, but the example could of course be a plain TeX one.) – Joseph Wright Sep 20 '14 at 09:56
  • @JosephWright Thanks!:) I didn't realise that TeX would be different from Latex. just wondering, where can i download Latex for mac? Last time I downloaded a MacTex package but it's only got LateXiT and TeXworks – teox14 Sep 20 '14 at 10:11
  • TeXworks is one of many editors for TeX and LaTeX. You can happily use TeXworks on the Mac to edit LaTeX documents: I do so routinely. – Joseph Wright Sep 20 '14 at 10:13
  • If you are getting "missing $ errors then you have tex (and most likely latex) post the complete log file you get from running your document – David Carlisle Sep 20 '14 at 10:44

1 Answers1

2

Every math section has to be marked with $ or a suitable environment such as align, you should not use $$ in LaTeX, also you should very rarely use \\ outside of tabular and alignment environments.

The following may not be aligned as you need (I didn't recognise the subject area:-) but will give you a start.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
H_0:\beta_2 &=0  \\
H_1:\beta_2 &\neq 0 \\
F&=\frac{(SS_{\mathrm{null}}-SS_{\mathrm{full}})\triangle p}
      {MS_{\mathrm{res}}}
\sim F_{\triangle p,n-p}=F_{1,13}
\end{align*}

\end{document}
David Carlisle
  • 757,742
  • I don't think, the colon is a division symbol here, it's rather a punctuation character without previous space (unless French typography). – Heiko Oberdiek Sep 20 '14 at 10:08
  • Thanks for the {align} tip!! Oh and I forgot to mention that I was using TeXworks instead of Latex. Somehow it always gives me error messages when I don't use $$. – teox14 Sep 20 '14 at 10:14
  • You shouldn't use $$…$$, which is plain TeX, not LaTeX, and can give some bad vertical spacing. As to TeXworks it is only an editor dedicated to TeX. The compiler remains (pdf)latex, or xelayex, or lualatex. – Bernard Sep 20 '14 at 10:24
  • @teox14 texworks is just the editor, you can use any editor to make tex files as they are just plain text. You must be using some tex format (most likely plain tex or latex) I assumed latex as plain tex does not define \\ or \frac – David Carlisle Sep 20 '14 at 10:41
  • @HeikoOberdiek I did wonder about that or if this is a specific notation (chemistry?) – David Carlisle Sep 20 '14 at 10:43
  • @DavidCarlisle http://en.wikipedia.org/wiki/Null_hypothesis – Manuel Sep 20 '14 at 16:11