# Beautiful Math with MathJex

Posted on 17 Dec 2012, tagged compositionMathJexLaTex

Never ever say you are a geek if you don’t have some mathematical formulas on your website! I have done so though MathJex:). Here are some examples:

Code:

1$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$
2$$|s_n - s_m|=|\sum_{k=m+1}^n u_{k}|=|u_{m+1}+u_{m+2}+...+u_{n}| \lt \epsilon$$


Result:

$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

$$|s_n - s_m|=|\sum_{k=m+1}^n u_{k}|=|u_{m+1}+u_{m+2}+...+u_{n}| \lt \epsilon$$

Now let’s try some inline formulas, such as you may except (b \ne 0) in expression (a \over b) and the famous formula (E = mc^2) from Einstein.

However, there are some issues to use MathJex with Markdown because symbols in formula will be parsed by Markdown first. The easiest way to avoid this is surrounding your formula with <span> since Markdown will parse nothing in a html/xml block. Such as <span>$$a \ne 0$$</span> for a inline formula (a \ne 0).

 Prev: Create A Virtual Machine Network Next: Call Program Like A Function