2

I am new to LaTeX and was trying out this today:

\documentclass[11pt]{article}
\begin{document}
\title{Latex}
\maketitle
\end{document}

But as I run it, it says Error: A document must be saved with an extension (and without spaces or accents in the name) before being used by a command.

Can anyone help ?

Tish
  • 29
  • 6
    Welcome to TeX.SX! That doesn't seem a LaTeX error message. Can you tell us what operating system, TeX distribution and editor you're using? – egreg Dec 03 '13 at 20:57
  • 1
    And please consider revising the question title to reflect the content instead of your current situation. – masu Dec 03 '13 at 21:06

2 Answers2

3

Try to save your document before compiling,if you haven't done it yet.

1

From Version 4.1 onwards, Texmaker gives more meaningfull error compared to the earlier Could not start the command error, but unfortunately it does not prompt for SAVE dialog box with untitled-1.tex like TeXworks.

A document must be saved with an extension (and without spaces or accents in the name) before being used by a command.

So as alessandro suggested save it first with a good file-name.tex and compile later.

  • Save the file as file-name.tex and then compile using QuickBuild or PDFLATEX.

Please refer also Common newbie mistakes/errors Using Texmaker