TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My code:


I found that F2 can compile as LaTeX. Compile result:

 Process started

 Process exited with error(s)

How to fixed and preview it?

share|improve this question
What are the errors you get? – egreg Aug 30 '11 at 8:27
If I compile by press F2,it doesn't show any error message.Or what the compile way I should take? – sam Aug 30 '11 at 9:12
I revised the original post by F1 compiling messages.If I press F1,it shows: LaTeX Error: The font size command \normalsize is not defined: there is probably something wrong with the class file. – sam Aug 30 '11 at 9:21
Please, turn the example code into the actual code you're using. – egreg Aug 30 '11 at 9:22
At that time,I just post all the code I know,but now I know how to get working~Thank you all~ – sam Aug 30 '11 at 9:36
up vote 5 down vote accepted

F2 in TeXmaker is a shortcut. What it runs is seen in the 'Tools' menu.

By default it runs 'LaTeX' but for this to compile correctly you would need your equation to be part of a complete, albeit minimal, .tex file. For example,

  \dot P = K'P+PK'^T + Cov(Kv-Gw)

compiles without errors and should produce a .dvi file.

You may, as usual, wish to add additional packages (e.g. amsmath) or more code to view the snippet as intended.

share|improve this answer
What is amsmath for? How to use it?Should I apt-get install something? – sam Aug 30 '11 at 9:35
To quote from the amsmath package documentation: "The amsmath package is a LaTeX package that provides miscellaneous enhancements for improving the information structure and printed output of documents that contain mathematical formulas." – mas Aug 30 '11 at 12:13
@sam: normally seen, amsmath should work out of the box. some other packages will need installation of texlive-... packages on your linux-box – long tom Oct 26 '12 at 21:29

In LaTeX, the equation environment typesets its entire contents (everything between \begin{equation} and \end{equation}) in math mode. Therefore, issuing $...$ is not needed within the environment and causes the error. Therefore, remove the "inner" $'s and it should compile fine.

share|improve this answer
I removed it as the post I revised,and press F2. That problem is still the same.How to preview the result? – sam Aug 30 '11 at 8:04

Your Answer


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.