
Try compiling with and without the x in math mode and you'll see why. Later, you may want to read more about how to include more packages and how you can create packages of your own.įinally, one last point of style - notice in that last example that we put the x in math mode by writing $x$ instead of just x.

The package used above is part of the basic MiKTeX installation, so you don't have to download anything new to include them.

To do so, we use \ or $$math stuff here$$ (the former is usually preferred now) to put the expression in display math mode: Sometimes, we may wish to display a mathematical expression on its own line. In fact, most math will generate errors if you don't remember to put it in math mode.Īs we saw above, when using $.$ to typeset math, the resulting math expression appears in-line. Nearly all mathematical items, such as variables, expressions, equations, etc., should be written in math mode. If you remove the $ symbols from your source file then try to compile, you should get 'Missing $ inserted' error messages in the Output window of TeXnicCenter (try it and see - you may have to scroll up in the Output window to see the errors). When you view the output file, you should see The file will appear in your folder as 'mymath.tex.'Ĭompile the document just as you compiled your first document. Save the document (press Ctrl-S or click File, then Save) as 'mymath' (don't include the quote marks in the name) in a folder of your choice.

For example, open a new source file in TeXnicCenter and type or copy/paste the following: To place something written in TeX in math mode, use $ signs to enclose the math you want to display. LaTeX uses a special math mode to display mathematics.
