# Trouble with my first latex document

Just downloaded Protex, downloaded TexStudio, and i'm trying to create a document, and i have

\documentclass{article}
\begin[12pt]{document}
\section{Executive Summary}

\end{document}


and its giving me 3 errors on the last line about it can't find the file. did i save in the wrong folder? does this work like matlab where it needs to be in a set directory first?

-
Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. What happens if you remove [12pt] from line 2, and put it in line 1? –  cmhughes Oct 22 '13 at 18:09
add comment

## 3 Answers

The [12pt] is an option which belongs to the preamble of the document:

\documentclass[12pt]{article}
\begin{document}
\section{Executive Summary}
This is only test text.
\end{document}


This compiles without problems.

-
More specifically, 12pt is an option that should be given to \documentclass, which resides in the document's preamble. –  Sean Allred Oct 22 '13 at 18:23
add comment

When compiling a document, you do need to call latex (or pdflatex, xelatex, etc.) by giving it a filename that it can see, that is

• an absolute file name, like C:\Users\Victor\Documents\summary.tex
• a relative file name, like summary.tex if you're already in your Documents folder, or perhaps Documents\summary.tex if you are in your user folder (Victor).

TeXStudio should be taking care of this for you by default, provided you are clicking the green arrow in the toolbar. However, your document isn't correct; \begin doesn't take an optional argument there. You probably want

\documentclass[12pt]{article}
\begin{document}
\section{Executive Summary}

\end{document}


which will compile without issues.

-
add comment
\documentclass[12pt]{article}

\begin{document}
\maketitle
\section{Executive Summary}

\end{document}


I think you also need to insert the \maketitle as I did in the above tex

-
\maketitle is only useful if you have actually declared a title with \title{<your title here>} (and perhaps \author and \date). –  jon Oct 23 '13 at 0:28
In fact, IIRC, the use of \maketitle without any of the metadata commands (\author, \title, and \date) is an error in the standard document classes. –  Sean Allred Oct 23 '13 at 2:09
add comment