Latex is a typesetting program which is now considered as a standard in mathematical writing. It works just like MathType and Equation Editor, but has a lot more functionalities. Equation Editor is just part of a word processor, but Latex is capable of creating an entire document, and mostly in pdf, dvi or postscript format. The other advantages of Latex are discussed by Robert Talbert in his blog Five reasons you should use latex and five tips for teaching it. Openwetware.org also discusses the advantages of Latex over Microsoft Word.
Latex, however, is quite different because you have to code the mathematical expressions and equations instead of writing them.
If you can see web pages with complicated equations or expressions, then it has to be Latex because most web pages do not support writing of mathematical expressions like word processors.
With Latex, equations like
can be easily written in web pages and blogs. In fact, the quadratic formula you see above is coded with Latex. To see the code, place the mouse pointer on the code and let it rest for about two seconds.
If you are familiar with HTML, it works just like it: its code is different from its output. If you want to write a fraction, for instance, the source code you have to type is \frac{a}{b} where a is the numerator and b is the denominator. This means, that if you want to write , then you have to write \frac{1}{2}. Several examples of Latex source codes and their outputs are shown below. Do not be intimidated with the codes because in the next tutorial, I am going to discuss them slowly and step-by-step.
| Latex Source Code | Output |
| \sqrt{x} = 5 | |
| A = \frac{(b_1 + b_2)h}{2} | |
| c^2 = a^2 + b^2 | |
| d = \sqrt{(y_2 – y_1)^2 + (x_2-x_1)^2} | |
| x = \frac{-b \pm \sqrt{b^2 – 4ac}}{2a} | |
| 1 + 2 + 3 + \ldots + n = \sum_{i=1}^{n} i = \frac{n(n+1)}{2} |
Embedding Latex in Blogs, Forums and Web Pages
Latex can be embedded in web pages, forums and blogs. Note that not all forums or blogs are capable of embedding Latex, so you have to know if your service provider is compatible with Latex. For instance, the Art of Problem Solving forum supports Latex while Ask Dr. Math does not.
Most forums or blogs let you embed Latex by placing dollar signs on both sides of the Latex code as shown below. Suppose you want to write the following sentence:
For any triangle with side lengths and hypotenuse
, then
.
If you are in Art of Problem Solving Forum, then you have to write it in the following format:
For any right triangle with side $a, b$ and hypotenuse $c$, then $c^2 = a^2 + b^2$.
Red-colored texts shown above are Latex codes.
Also, not all blogs or forums follow the same format. WordPress, for example, places the word latex after the first dollar sign before typing the code, and Moodle places two dollar signs at each side of the latex code. Notice below that the format of embedding changes depending on the service provider or website, but the latex code is always the same.
WordPress Code
For any right triangle with side $latex a, b$ and hypotenuse , then $latex c^2 = a^2 + b^2$.
Moodle Code
For any right triangle with side $$a, b$$ and hypotenuse $$c$$, then $$c^2 = a^2 + b^2$$.
In my next Latex blog, we will learn the basics of coding Latex.







Stumble It!






Guillermo,
Thanks for laying out the basics of Latex. My web-based mathematical writing has just improved from reading this post.
Thanks for the information.
Mr. Pi
I am happy that I have helped somehow. I’ll post the Latex tutorial ASAP.
[...] my previous latex blog, we have seen that Latex is capable of displaying complex mathematical expressions in blogs and [...]
[...] my previous blogs, we have discussed how to use Latex in writing mathematical equations in blogs and websites, and we also have learned the most commonly used Latex [...]
[...] as on websites, blogs and wikis. If you do not know about Latex, I have created a Latex tutorial here and [...]
[...] P and Q. If you have not used a slider before, I have created a tutorial in creating sliders here and here. To do this, click the Slider tool, and click the drawing [...]
Great site and nice introduction to Latex have appreciated your tutorials on GeoGebra and am working my way through your them. Have been trying to set up Latex capabilities using a variety of wordpress plugins for a teacher on staff. I am assuming that wordpress.com provides the latex engine do you know if code such as this works on wordpress.com? Appreciate any help you may be able to give me.
\text{For the following polynomial, answer these questions: Find each: }\underset{x\rightarrow -\infty }{\lim }\text{f(x) and }\underset{x\rightarrow +\infty }{\lim }\text{f(x). [Answer is +$\infty $, -$\infty $, or neither]. h(x) = }-20.79 (x-9) (x-1)^2 (x+6)^3 (x+7)^4\underset{x\rightarrow -\infty }{\lim }\text{f(x) = }\underset{x\rightarrow +\infty }{\lim }\text{f(x) = }
I haven’t tried complicated latex yet. But this blog might help you.
http://kogler.wordpress.com/2008/03/21/latex-use-of-math-symbols-formulas-and-equations/
This post and its follow up have been unbelievably helpful. I knew the basics but this has made things so much simpler. Thanks a lot!
Thanks James. I’m glad it has helped you.
[...] symbols in latex are shown in the Scribd document in number 4, and I have two tutorials on latex here and [...]
[...] reason why I chose WordPress over Blogspot/Blogger before was because of Latex. Latex as we have discussed is a way to create equations in blogs and [...]
[...] must be in HTML, Word, or OpenOffice Writer format. Math and Multimedia supports latex, so please use latex code if you know how [...]