...include mathematical formulas?

Scholarly journals, especially in math and science, often require that submissions are made using $latex \LaTeX$ because it typesets mathematics the best. Mathematics can be typeset using inline math mode if you want to insert mathematics into a sentence or display math mode if you want your formula to be big and take up a line all to itself. In $latex \LaTeX$ you're always in text mode, inline math mode, or display mode. To enter math mode, type $ followed by your formula and end with $. That second $ symbol indicates you've left inline math mode and gone back to text mode. The commands you need to type in math mode (whether it's inline or display) depend on you, of course, but since there are so many math and science $latex \LaTeX$ users the numerous commands can be overwhelming. A number of examples can be found here. Typing $\int_0^1\frac{1}{x^2+1}\,dx$ produces $latex \int_0^1\frac{1}{x^2+1}\,dx$. The \int command creates the integral sign and \frac indicates a fraction is being made.

Learning the commands you need takes time. The simplest way to get formulas into your document when you don't know the commands is with the WebEquation link that I have on the sidebar. Here's the output from using it:

The bottom lefthand corner shows what WebEquation thinks I've written. It's interpretation of writing if very good but not perfect so you should check that your math has been interpreted correctly. When you're satisfied, the $latex \LaTeX$ code, which is located in the bottom righthand corner, can be copied into your document but you'll need to put it between two $ signs for inline math mode usage. Notice that the code is (slightly) different from the code I used; that's just another example of how $latex \LaTeX$ gives multiple ways of doing the same thing.

Display math mode is entered using \ [ and exited using \ ]. Pasting the output from WebEquation between \ [ and \ ] will give you the output you want.

Notice that the font that math is typeset in is different from the font that the text is typeset in. Therefore, changing the default font of your document (which we haven't covered) might not look good if you're using math formulas in your document.

Math mode comes with two warnings. The first is that there is a very common mistake of forgetting to leave math mode by typing $ or $$ as the case may be. In that case your document won't compile problem and you'll get an error message about a missing $ sign. The second warning is that, since $ signifies to $latex \LaTeX$ that you've entered math mode, you can't use $ as you might in a typical document. If you want to type $ you'll need to type \$. These 2 error can result in some strange results; if you type John has $5 and Mary has $4 dollars then your document will compile but it won't be what you want (see the sample file below or click on the image to get a quick look at what I mean).

That's because the first $ sign has started math mode and the second ends it. In between the two dollar signs 5 and Mary has will be typeset in math mode.

The \ symbol has that problem, too. To get the output \ you'll need to type $\backslash$.

Here's a sample file illustrating the various issues mentioned above: MathMode (.tex) MathMode (PDF)

 

Leave a Reply

Your email address will not be published. Required fields are marked *

AlphaOmega Captcha Classica  –  Enter Security Code