How to embed Latex in blogs : WordPress

Add Plugin : Mathjax-Latex

The default option is use “Use MathJax CDN Service”.
But sometimes it cannot work because of some reasons.
So you have to install the service on your own vps!

Install MathJax Service

  1. wget
  2. unzip
  3. mv MathJax-master /xxxxxx ....../wordpress/wp-content/plugins/mathjax-latex/

Check The MathJax Service is Okay

Custom MathJax location

“Settings”->”MathJax-LaTeX”->”Custom MathJax location”

  1. /wp-content/plugins/mathjax-latex/MathJax/MathJax.js

Test It !

  1. [latex]E=mc^2[/latex]
\(\frac{{ – b \pm \sqrt {{b^2} – 4ac} }}{{2a}}\)
  1. [latex]\frac{{ - b \pm \sqrt {{b^2} - 4ac} }}{{2a}}[/latex]
\(\sum\limits_{i = 1}^n {{{({X_i} – \bar X)}^2}} \)
  1. [latex]\sum\limits_{i = 1}^n {{{({X_i} - \bar X)}^2}} [/latex]
\(\left( {\begin{array}{*{20}{c}}
\end{array}} \right)\)
  1. [latex]\left( {\begin{array}{*{20}{c}}
  2. {{a_{11}}}&{{a_{12}}}&{{a_{13}}}\\
  3. {{a_{21}}}&{{a_{22}}}&{{a_{23}}}\\
  4. {{a_{31}}}&{{a_{32}}}&{{a_{33}}}
  5. \end{array}} \right)[/latex]