Essential WordPress Plugins for Math, Science, and Programming Blogs

If you are writing content related to math, science, or programming, chances are you will need to write mathematical equations or source code!

Luckily, if you use WordPress there are many plugins that will make your life easier and your site fabulous. This post will write about some plugins used to display geeky contents on this site.

Mathematical Equations

For mathematical equations, you can use the plugin LaTeX for WordPress. It uses LaTeX syntax which is the de facto standard for writing academic papers.

Currently the default settings doesn't work because the previous CDN of MathJax has shut down. Go to settings and change the MathJax server to https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML

To write an inline formula, the syntax is:

\(YOUR-LATEX-CODE\)

For example:

\(\alpha+\beta\geq\gamma\)

Which will produce: 

For equations that will be displayed on a single line (math mode in LaTeX lingo), use:

\[YOUR-LATEX-CODE\]

Which produces for example:

Source Code

Source code is displayed using the plugin Syntax Highlighter Evolved. To write a block of code, just surround with with [LANGUAGE][/LANGUAGE] where LANGUAGE is for example python or php.

The result is like this:

from math import sin

x = sin(0.0)
print(x)

Closing

As you can see, with some plugins your WordPress site will be ready to tackle any technical content. If you have other plugins to recommend please feel free to write in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *