### How to use LaTeX

Posted:

**Mon Dec 06, 2010 11:47 pm**In this site we have implemented LaTeX using jsMath, a java script based system that changes the LaTeX codes within dollar sign into nice LaTeX equations.

We highly recommend you (I can not stress enough) to download the LaTeX fonts (just 151 KB) to your PC, and install them. This will not only improve the look of the website, but also save bandwidth as you do not need to download the images every time you see an equation.

Instructions to install and enable fonts:

1.

and unzip them. Then copy the all 8 fonts (control+C). Go to start > control panel > fonts. Now paste the fonts (control+V). The fonts will be installed. 2. Then restart your browser, and go to this topic.

3. After that click on the jsMath button at the bottom-right corner of your page. Cick on "Options", and check if your settings are as shown the following image. If not, change them.

(Specially set the setting for 5 years, and select "use native TeX fonts"

4. Bingo! We are done!

When you don't have fonts installed, you shall see something like this (and it will take an eon to load):

Whereas, with the settings enabled, and fonts installed you should see something nice like the following.

Now compare and decide if you have done everything correctly.

$2\sum \sqrt{(a^{4}+b^{2}c^{2})(b^{4}+c^{2}a^{2})} \geq 2[3,1,0]$ (Cauchy)

$a^4+b^4+c^4+a^{2}b^{2}+a^{2}c^{2}+b^{2}c^{2}+ 2\sum \sqrt{(a^{4}+b^{2}c^{2})(b^{4}+c^{2}a^{2})}\geq 2[3,1,0]+\frac{[4,0,0]+[2,2,0]}{2}$

$2[3,1,0]+\frac{[4,0,0]+[2,2,0]}{2}\geq\frac{[4,0,0]}{2}+ \frac{3[3,1,0]}{2}+\frac{[2,1,1]+[2,2,0]}{2}$

I think that after seeing these examples, I don't need to repeat

In the advanced mathematics or science textbook you can see nicely typeset equations. LaTeX makes it possible. LaTeX is a typesetting program that can generate professional looking equations (and many more cool stuffs!). However, the aim of this post is to tell you how to write simple nice equations.

The art of problem solving (AOPS) forum has a great LaTeX guide for the beginners. However, we shall need to focus on a few parts for being able write in our posts:

1. How to write equations in the posts

2. All the symbols (you haven't probably seen all of them before )

Read: Writing Equation using LaTeX was never easier!

If you want to write simple equation within a line like the following:
If you want to write larger equation in a separate line like:
For example:

*** for writing power use ^ i.e. x^a=$x^a$

*** for writing subscript use _ i.e. x_a=$x_a$

*** for writing nice looking fractions use \frac{a}{b}=$\frac{a}{b}$. You can use \frac within frac command

i.e. \frac{\frac{ab}{c}}{\frac{f}{g}}$=\dfrac{\frac{ab}{c}}{\frac{f}{g}}$

** "\" this sign is vry frequently used in LaTeX. See the symbol guide of AOPS to learn how to write symbols and letters like \pi=$\pi$

When you think that you have learned some basic LaTeX, you an try it on codecogs equation editor or on our Test Forum.

We highly recommend you (I can not stress enough) to download the LaTeX fonts (just 151 KB) to your PC, and install them. This will not only improve the look of the website, but also save bandwidth as you do not need to download the images every time you see an equation.

Instructions to install and enable fonts:

**A. How (and why) to install LaTeX fonts in your PC:**1.

**Download the fonts attached with this post**(we have attached 8 fonts)and unzip them. Then copy the all 8 fonts (control+C). Go to start > control panel > fonts. Now paste the fonts (control+V). The fonts will be installed. 2. Then restart your browser, and go to this topic.

3. After that click on the jsMath button at the bottom-right corner of your page. Cick on "Options", and check if your settings are as shown the following image. If not, change them.

(Specially set the setting for 5 years, and select "use native TeX fonts"

4. Bingo! We are done!

When you don't have fonts installed, you shall see something like this (and it will take an eon to load):

Whereas, with the settings enabled, and fonts installed you should see something nice like the following.

Now compare and decide if you have done everything correctly.

$2\sum \sqrt{(a^{4}+b^{2}c^{2})(b^{4}+c^{2}a^{2})} \geq 2[3,1,0]$ (Cauchy)

$a^4+b^4+c^4+a^{2}b^{2}+a^{2}c^{2}+b^{2}c^{2}+ 2\sum \sqrt{(a^{4}+b^{2}c^{2})(b^{4}+c^{2}a^{2})}\geq 2[3,1,0]+\frac{[4,0,0]+[2,2,0]}{2}$

$2[3,1,0]+\frac{[4,0,0]+[2,2,0]}{2}\geq\frac{[4,0,0]}{2}+ \frac{3[3,1,0]}{2}+\frac{[2,1,1]+[2,2,0]}{2}$

I think that after seeing these examples, I don't need to repeat

**why**we should install LaTeX fonts.**B. LaTeX Intro:**In the advanced mathematics or science textbook you can see nicely typeset equations. LaTeX makes it possible. LaTeX is a typesetting program that can generate professional looking equations (and many more cool stuffs!). However, the aim of this post is to tell you how to write simple nice equations.

The art of problem solving (AOPS) forum has a great LaTeX guide for the beginners. However, we shall need to focus on a few parts for being able write in our posts:

1. How to write equations in the posts

2. All the symbols (you haven't probably seen all of them before )

**Now you can write equations without learning LaTeX code.**However, learning LaTeX is fun, and might be useful in your later life. So learn try learning LaTeX seeing the codes.Read: Writing Equation using LaTeX was never easier!

**C. Our Own guide:**If you want to write simple equation within a line like the following:

Just use dollar sign (technically when you are writing inline math use it) like the follwoing:This is Pythagoras' theorem $a^2+b^2=c^2$

Code: Select all

`This is Pythagoras' theorem $a^2+b^2=c^2$`

Use:The following is normal distribution function \[F(x) = \tfrac{1}{\sqrt{2\pi\sigma^2}}\; e^{ -\frac{(x-\mu)^2}{2\sigma^2} } \]

Code: Select all

`\[ Your equation within this third bracketed backslashs \]`

Code: Select all

`The following is normal distribution function \[F(x) = \tfrac{1}{\sqrt{2\pi\sigma^2}}\; e^{ -\frac{(x-\mu)^2}{2\sigma^2} } \]`

**The best way to learn LaTeX is to see the examples. Double click on the examples to see the code.***** for writing power use ^ i.e. x^a=$x^a$

*** for writing subscript use _ i.e. x_a=$x_a$

*** for writing nice looking fractions use \frac{a}{b}=$\frac{a}{b}$. You can use \frac within frac command

i.e. \frac{\frac{ab}{c}}{\frac{f}{g}}$=\dfrac{\frac{ab}{c}}{\frac{f}{g}}$

** "\" this sign is vry frequently used in LaTeX. See the symbol guide of AOPS to learn how to write symbols and letters like \pi=$\pi$

When you think that you have learned some basic LaTeX, you an try it on codecogs equation editor or on our Test Forum.