Take the 2-minute tour ×
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.

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?

share|improve this question
4  
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

up vote 8 down vote accepted

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.

share|improve this answer
5  
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.

share|improve this answer
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

share|improve this answer
3  
\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
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.