Page 1 of 6

How to use LaTeX

Posted: Mon Dec 06, 2010 11:47 pm
by Moon
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:

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.
This file contains the LaTeX fonts that you need to install.
(186.45 KiB) Downloaded 3670 times
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. :) :ugeek:

$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:
This is Pythagoras' theorem $a^2+b^2=c^2$
Just use dollar sign (technically when you are writing inline math use it) like the follwoing:

Code: Select all

This is Pythagoras' theorem $a^2+b^2=c^2$
If you want to write larger equation in a separate line like:
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  \]
For example:

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.

Re: LaTeX implementation

Posted: Tue Dec 07, 2010 4:26 am
by Moon
Here is the guide published by AOPS forum, you can save it in your PC for quick reference.

Re: How to use LaTeX

Posted: Tue Dec 07, 2010 3:25 pm
by otitkothabole
Ubuntu/Mint users :
1. Press 'Alt + F2'
2. Type "gksu nautilus" in the box &n press 'Enter'(apply password if asked).
3. Go to 'File System/usr/share/fonts/'.
4. If there is no folder named "My Fonts", then create bit.
5. Extract the downloaded .zip file & copy all the fonts from the folder & paste it in 'File System/usr/share/fonts/My fonts/'.

Re: How to use LaTeX

Posted: Tue Dec 07, 2010 4:17 pm
by Moon
Thanks a lot. :D
Please write something about you in the introductions forum, so that we may know about you. :)

Re: How to use LaTeX

Posted: Fri Dec 10, 2010 6:43 pm
by rakeen
hey u said that there is 6+2 fonts. where is the other 2 fonts. testing:$x^3 + y^9 = 4$ koi kisu to hoilo na!

Re: How to use LaTeX

Posted: Fri Dec 10, 2010 10:30 pm
by Moon
আমি বলেছি আমি যেই ফাইলটা দিয়েছি সেইখানে ৮টা ফন্ট।

আমি তো দেখতে পাচ্ছি তোমার সমীকরণ :)

Please clean the cache of your browser and restart. If you are using firefox then go to Tools>Options>Advanced then click "Clear Now".

Let me know if that solves your problem. Thanks.

Re: How to use LaTeX

Posted: Sat Dec 11, 2010 11:59 am
by rakeen
o0o0o0o0o Taratari kore porsi to ei jonno mistakum! And by the way ami jokhon likhsilam tokhon dekhte pai nai, but post deoar pore.....

Word e ki ei ta kaj kore? Ami dekhlam oi khane ei font use korle space dile space hoyna(MS word e) :cry:

Re: How to use LaTeX

Posted: Fri Jan 21, 2011 1:11 pm
by tanvirab
writing with $kindle$

Re: How to use LaTeX

Posted: Thu Oct 20, 2011 8:14 pm
by bristy1588
I am having problem in setting Use Native Tex fonts(download). Please help me and tell me what to do

Re: How to use LaTeX

Posted: Fri Oct 21, 2011 9:16 am
by *Mahi*
Warning: Native LaTeX fonts are just to load your pages faster. You can read or write latex with or without them. Without the fonts installed, the LaTex code will just show up as images.

You can get help with installing fonts here or here.