Introduction

If you are a professionals who working on math or science subjects. You might be pretty familiar with LaTeX. LaTeX is a high-quality typesetting system, which is well designed for the production of technical and scientific documentation.

LaTeX is a micro package that based on TEX, which build by Donald E Knuth in the 1970s. LaTeX improve some of the usages in TeX. CTAN (stand for The Com­pre­hen­sive TEX Archive Net­work) is a central of all kinds of materials you might need in TEX.

On the other hand, web is now one of the most common platform for spreading your words and ideas. But LaTex syntax is not native support on browsers. MathJax is an open source JavaScript display engine for mathematics that works in all browsers. Which you can use LaTeX syntax on the web MathJax will automatically convert it into the proper format.

Now we are going to work through some of the basics in LaTeX and MathJax.

LaTeX

Windows then download MiKTEX. If you have a Unix-like system such as GNU/Linux then get TEX Live . For a Macintosh get MacTEX

There are three files as ouput

  1. the main output file, which is one of:

    • .dvi : if you are using latex command, dvi (stands for Device Independent) you can convert into other file format by using programs such as xdvi(display directly),dvips(convert to PostScript), ordvipdfmx(convert to PDF).

    • .pdf : If you are using pdflatex command, this will output a .pdf file, If invoked as lualatex, a .pdf file is created using the LuaTEX engine.If invoked asxelatex, a .pdf file is created using the XeTEX engine.

  2. .log : Logging some summary information.
  3. .aux : This is used by LATEX itself, for things such as cross-references.

A sample tex file:

1\documentclass{class}
2\begin{document}
3your text
4\end{document}

MathJax

Installing MathJax:

1<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/
2MathJax.js?config=TeX-AMS-MML_HTMLorMML">
3</script>

Usage:

 1\begin{align*}
 2  & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right)
 3  = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\
 4  & (x_1, \ldots, x_n) \left( \begin{array}{ccc}
 5      \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\
 6      \vdots & \ddots & \vdots \\
 7      \phi(e_n, e_1) & \cdots & \phi(e_n, e_n)
 8    \end{array} \right)
 9  \left( \begin{array}{c}
10      y_1 \\
11      \vdots \\
12      y_n
13    \end{array} \right)
14\end{align*}

will show as:


1\begin{align*}
2    L(s)=\int^b_a\!\sqrt{1+(f’(x))^2}\,dx \\
3\end{align*}

will show as:


1\begin{align*}
2    \sin A \cos B &= \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \\
3    \sin A \sin B &= \frac{1}{2}\left[ \sin(A-B)-\cos(A+B) \right] \\
4    \cos A \cos B &= \frac{1}{2}\left[ \cos(A-B)+\cos(A+B) \right] \\
5\end{align*}

will show as:


References:

  • http://www.tug.org/mactex/src/WelcomeToMacTeX.pdf
  • http://www.ctan.org/
  • http://www.techscribe.co.uk/ta/latex-introduction.pdf

LaTeX Tutorials

  • http://texdoc.net/texmf-dist/doc/latex/latex2e-help-texinfo/latex2e.pdf
  • http://web.math.isu.edu.tw/yeh/HowTo/HowToTex/latex123.pdf