Thursday, May 14, 2020

First Post - Adding MathJax to Blogger

The purpose of this blog is to post as many homework solutions done by me as humanly possible.
I finally got MathJax to work for me ( I get to add calculus equations...yay!).

Here's an example of some math in blogger with MathJax:

\[\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0
\end{vmatrix} \]

\[\left\{ \begin{aligned} a_1x+b_1y+c_1z &=d_1+e_1 \\ a_2x+b_2y&=d_2 \\ a_3x+b_3y+c_3z &=d_3 \end{aligned} \right. \]

To do this for blogger I did the following:

  1. In your Blogger go to your Theme and then click Edit HTML


  2. Insert this bad boy into the header as shown below:

    <script async='async' src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML,Safe' type='text/javascript'></script>



  3. Once this is done you can now type latex command on your pages as long as they are boxed by "\ [" and "\ ]". (make sure there are no spaces in between the "\" and the respective "]")


    this(in brackets): \sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_{i}-\mu)^{2}}\
    becomes this: \[\sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_{i}-\mu)^{2}}\ \]

And that's it!