### Basic LaTeX Guide

Posted:

**Thu Mar 05, 2009 7:25 pm**You can post formatted mathematical expressions by inserting LaTeX ("LAY-teck") commands between "tex" tags. You may click the "tex" button (at the right-hand end of the "formatting" row, across the top of the message-entry box) or else by typing the opening "[

. . . . .[

If you want to surround your fraction in size-appropriate grouping symbols, use the "\left" and "\right" tags to indicate this. For instance:

. . . . .[

...but:

. . . . .[

Try not to use a lower-case "x" to indicate "times", since this will be confused with the variable. Instead, use the "\times" operator: "[

You can insert summation symbols by using the capital "Sigma", and you can include lower and upper limits: "[

. . . . .

Integrals are formatted similarly: "[

. . . . .

You can display limits using the "\lim" and "\rightarrow" commands: "[

To display set and element notation, use "\subset" for , "\not\subset" for , "\subseteq" for , "\in" for ("is an element of"), "\cup" for (set union), and "\cap" for (set intersection).

Note that "\" and "{}" are LaTeX "reserved" characters. To display them, you must first "escape" them, so the LaTeX renderer knows that you're not using them to begin a command. For instance, to format a set, you would type "[

If you want function names, such as "sine" or "log", to be non-italicised, you can use the back-slash to tell the LaTeX renderer that "the following is the well-known function of (whatever)". For instance, "[

Links to further information will be posted eventually. For now,

**tex]" and closing "[**_{}**/tex]" tags manually.**_{}**Exponents and Subscripts:**To format exponents, use the same carat symbol, " ^ ", as you always have on your graphing calculator, probably the Shift-6 key on your computer keyboard. Thus, "[**tex]x^2[**_{}**/tex]" displays as "". Note: If your exponent is more than just the one character, use the LaTeX grouping symbols of "curly braces". To raise something to the one-half power, you would format as "[**_{}**tex]x^{1/2}[**_{}**/tex]" to get "". You can insert subscripts by using the understroke character. For instance, "[**_{}**tex](x_1,y_1)[**_{}**/tex]" displays as "". You can even combine the two: "[**_{}**tex]x_1^2[**_{}**/tex]" displays "".**_{}**Radicals:**To create radical symbols, use the "sqrt" abbreviation (for "square root") and the back-slash "operator" command, using curly braces to indicate what goes inside the radical. To format the square root of seven, you would typeset as "[**tex]\sqrt{7}[**_{}**/tex]" to get "". To create other radicals, such as cube roots, put the base (for cube roots, this would be "3") inside square brackets. To display the cube root of five, you would format as "[**_{}**tex]\sqrt[3]{5}[**_{}**/tex]" to get "".**_{}**Fractions:**To create fractions, use the "frac" abbreviation and the back-slash operator, and use curly braces to group the numerator and denominator. To format two-thirds, you would type "[**tex]\frac{2}{3}[**_{}**/tex]" to get "". You can put expressions and other operators inside the numerator or denominator. For instance:**_{}. . . . .[

**tex]\frac{\sqrt{2}}{3}[**_{}**/tex] displays**_{}If you want to surround your fraction in size-appropriate grouping symbols, use the "\left" and "\right" tags to indicate this. For instance:

. . . . .[

**tex](\frac{14}{23})[**_{}**/tex] displays as**_{}...but:

. . . . .[

**tex]\left(\frac{14}{23}\right)[**_{}**/tex] displays as**_{}**Special Symbols:**The "not equals" symbol "" is inserted using "[**tex]\neq[**_{}**/tex]". The "greater than or equal to" (the symbol) and the "less than or equal to" (the symbol) are inserted using "[**_{}**tex]\geq[**_{}**/tex]" and "[**_{}**tex]\leq[**_{}**/tex]", respectively. The "wiggly equals" for "approximately" is inserted using "[**_{}**tex]\approx[**_{}**/tex]", which displays "". The symbol "", for "infinity", is inserted using "[**_{}**tex]\infty[**_{}**/tex]". To insert a "plus-minus" sign, such as for the Quadratic Formula, use "[**_{}**tex]\pm[**_{}**/tex]" to display "". Many of these same symbols can be "cancelled" or negated by using the "\not" tag. For instance, "not less than or equal to" would be typeset as "[**_{}**tex]\not\leq[**_{}**/tex]", which displays as "".**_{}Try not to use a lower-case "x" to indicate "times", since this will be confused with the variable. Instead, use the "\times" operator: "[

**tex]3 \times 5[**_{}**/tex]" displays as "". You can also use "\div" for the division symbol, "".**_{}**Colors and Spacing:**Sometimes the default spacing is too crabbed and difficult to read. You can insert extra space by inserting "\," between your characters. For instance, "[**tex]x^2+3[**_{}**/tex]" displays as "", but "[**_{}**tex]x^2\,+\,3[**_{}**/tex]" displays as "". If you want to highlight something using color, use the "\color" operator and insert the desired color within curly braces. However, the different parts need to be inserted inside their own LaTeX tags, as the last color in the line seems to be interpreted (in the current installation) as being the color for the entire expression. For instance, "[**_{}**tex]\color{red}x^2 \color{blue} \,+\,3[**_{}**/tex]" displays as "", but "[**_{}**tex]\color{blue}x^2\,[**_{}**/tex][**_{}**tex]\color{blue}+\,3[**_{}**/tex]" displays as "".**_{}**Greek Letters and Special Characters:**To insert Greek letters, such as "", spell the letter out, starting the name with a upper- or lower-case letter, depending on whether you want the upper- or lower-case Greek letter. So "[**tex]\delta[**_{}**/tex]" is the lower-case "" while "[**_{}**tex]\Delta[**_{}**/tex]" is the upper-case "". Common angle names are "alpha", "beta", "gamma", and "theta", which display as , , , and , respectively. You can display the "angle" symbol by using "\angle".**_{}You can insert summation symbols by using the capital "Sigma", and you can include lower and upper limits: "[

**tex]\Sigma_{i=1}^n 2^n[**_{}**/tex]" displays as:**_{}. . . . .

Integrals are formatted similarly: "[

**tex]\int_0^3 x^2 dx[**_{}**/tex]" displays as:**_{}. . . . .

You can display limits using the "\lim" and "\rightarrow" commands: "[

**tex]\lim_{x \rightarrow \infty} \frac{1}{x}[**_{}**/tex]" displays as .**_{}To display set and element notation, use "\subset" for , "\not\subset" for , "\subseteq" for , "\in" for ("is an element of"), "\cup" for (set union), and "\cap" for (set intersection).

Note that "\" and "{}" are LaTeX "reserved" characters. To display them, you must first "escape" them, so the LaTeX renderer knows that you're not using them to begin a command. For instance, to format a set, you would type "[

**tex]\{1,2,3\}[**_{}**/tex]" to display "".**_{}**Function Names and Text:**You'll quickly notice that all textual information is assumed by LaTeX to be variables. However, sometimes you actually want text, or at least non-italicised characters. One way to accomplish this is to insert the text inside the "\mbox{}" operator. For instance, "[**tex]This is text.[**_{}**/tex]" displays as "", while "[**_{}**tex]\mbox{This is not text.}[**_{}**/tex]" displays as "".**_{}If you want function names, such as "sine" or "log", to be non-italicised, you can use the back-slash to tell the LaTeX renderer that "the following is the well-known function of (whatever)". For instance, "[

**tex]ln(x)[**_{}**/tex]" displays as "", while "[**_{}**tex]\ln{(x)}[**_{}**/tex]" displays as "". Other common function names are "\log", "\sin", "\cos", and "\tan". Each of these commands can take superscripts and subscripts: "[**_{}**tex]\cos^2{(x)}[**_{}**/tex]" displays as "" and "[**_{}**tex]\log_2{(x)}[**_{}**/tex]" displays as "".**_{}Links to further information will be posted eventually. For now,

**this site**has a nice display of many characters and commends, and the**Physics Forum**has a nice tutorial post.