[Tex/LaTex] TeXShop cannot print hello world

environmentserrorstexshop

I'm running TeXShop on a mac. My latex environment somehow has somehow stopped working and can no longer even print hello world.
Here's my complete latex document:

\documentclass{article}
\begin{document}
   Hello world!
\end{document}

which gives the following error:

This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
 \write18 enabled.
 %&-line parsing enabled.
entering extended mode
(./MyThesis.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}
? 
! Undefined control sequence.
l.2 \begin
          {document}
? 
[1{/usr/local/texlive/2008basic/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
)</usr/local/texlive/2008basic/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb>
Output written on MyThesis.pdf (1 page, 6895 bytes).
SyncTeX written on MyThesis.synctex.gz
Transcript written on MyThesis.log.

How do I start to debug this?

Best Answer

TeXShop will let you choose between typesetting using LaTeX and using plain TeX: the error suggests you are doing the latter. The main TeXshop windows has a dropdown next to the 'Typeset' button which should say 'LaTeX' (or similar), rather than 'Plain TeX'. Alter the setting and try again.

Related Question