Don’t use any WordPress LaTeX Plugins: Write Math in WordPress without any plugin

WordPress makes writing blog really easy. WordPress has made blogging and website building a piece of cake. Without knowing any technicalities of language used for making website (like HTML, CSS, Java Script, etc), any one can make website and start blogging with WordPress.

But when it comes to writing blog on Math and Science, people find it difficult to write equation in WordPress. There are many free and paid WordPress LaTeX plugin available that makes writing math in WordPress easy. But wait. You don’t need any plugin to write math in WordPress blog.

LaTeX in WordPress without any plugin

Many bloggers use third party plugin to write LaTeX in WordPress. However WordPress supports LaTeX and you don’t need any third party plugin to write math in WordPress Blog. Using thirdparty plugin may slows down page load time and also takes finite amount of space.

WordPress LaTeX shortcut

To write LaTeX math in WordPress blog you just need to enclose Your LaTeX Code in $latex $ like $latex Your Latex Code $ tag.

For e.g. you can write x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} by typing $latexx=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$

This was just an example, you can write any LaTeX equation inside WordPress. You type any math equation using the above method.

Custom font size of LaTeX in WordPress

Increase size of LaTeX equation or LaTeX math you can use $latex\LaTeX &s=X$ where X can be any integer between -4 to 4, with 0 as default. Value of X indicates relative size, use higher value of X to increase size of LaTeX equation and lower value of X to decrease size of LaTeX equation. Following table shows the size of equation that you get with different value of X

Value of XFont SizeWordPress codeDisplay
-4\tiny$latex\alpha&s=-4$\alpha
-3\scriptsize
$latex\alpha&s=-3$
\alpha
-2\fontsize
$latex\alpha&s=-2$
\alpha
-1\small
$latex\alpha&s=-1$
\alpha
0\normalsize (12 pt)
$latex\alpha&s=0$
\alpha
1\large
$latex\alpha&s=1$
\alpha
2\Large
$latex\alpha&s=2$
\alpha
3\LARGE
$latex\alpha&s=3$
\alpha
4\huge
$latex\alpha&s=-4$
\alpha

Limitations

If your LaTeX code is broken then you will see \LaTeX as error. One thing to remember is that, when you use $latex $ for writing LaTeX, WordPress puts all the LaTeX code inside LaTeX math environment. If you try to use LaTeX that does’t work inside LaTeX math environment then like (\begin{align} … \end{align}, etc) then you will get error.

Thanks

If you have any comment regarding how to type LaTeX equation in WordPress please comment below. I will do my best to help you.

If you find it useful then please share this blog with those who may find it useful.

Leave a Reply