Page 1 of 2

Basic LaTeX Guide

Posted: Thu Mar 05, 2009 7:25 pm
by stapel_eliz
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 "[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


. . . . .[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. :D

Re: Basic LaTeX Guide

Posted: Fri May 01, 2009 1:44 pm
by Martingale

. . . . .
I think the \sum command looks better

Code: Select all

\sum_{i=1}^n 2^n

Re: Basic LaTeX Guide

Posted: Wed Aug 05, 2009 2:45 pm
by michaelempeigne
I never knew how to do these before

Re: Basic LaTeX Guide

Posted: Tue Oct 12, 2010 6:01 pm
by afwings
Just testing the LaTeX (no need to respond). . And now a matrix:

Re: Basic LaTeX Guide

Posted: Wed Apr 20, 2011 5:09 pm
by TeddyNall
How do I write quantors like "for each" or "exists"?

Re: Basic LaTeX Guide

Posted: Wed Apr 20, 2011 6:07 pm
by Martingale
How do I write quantors like "for each" or "exists"?

\forall \exists

Re: Basic LaTeX Guide

Posted: Thu May 14, 2015 4:07 am
by buddy
This forum was choking on the LaTeX earlier. I'm checking that its good again:

looks OK now

Re: Basic LaTeX Guide

Posted: Thu Mar 02, 2017 10:52 pm
by poopbutthole

Re: Basic LaTeX Guide

Posted: Thu Mar 02, 2017 10:54 pm
by loudmaster32
^^ I agree

Re: Basic LaTeX Guide

Posted: Fri Mar 17, 2017 6:15 pm
by yogeshbhau
Be cautious any time you Buy YouTube subscribers. It might be a scam. Speak to us for support and advice. buy youtube subscribers