Thursday 6 April 2017

Practising with g(Math)

I’ve created this page in Google Docs using g(Math). I installed the much anticipated Equatio Chrome extension but it’s a disappointment as far as I can tell. Perhaps I’m missing something. The 12 point Verdana that comprises the text of this blog was chosen in Docs because it is more compatible in size with the images generated.

The links to the images of the mathematical expressions that are created are preserved in Blogger, so that’s an alternative way of getting mathematical expressions into a blog. It seems to be quite fast compared to the alternative in which javascript on a server is accessed and used to convert LaTeX code into mathematics.

The disadvantage is that you can't amend the LaTeX code because it's not there. It was used to create the image of the mathematical expressions and then it's no longer available.

I worked out after some fiddling how to get the equal signs in equations to align. Here is the proof:


Here’s another example of alignment using a different format:


Of course, if the images appear a little large, they can be easily resized:



When using Google Docs, the images do take a few seconds to be created but after that they display quite promptly. Here is a matrix.



The following matrix is identical to the one above but it is being displayed with javascript that accesses the MathJax website that renders the code to display the mathematical expression: $$M = \begin{bmatrix} \frac{5}{6} & \frac{1}{6} & 0 \\[0.3em] \frac{5}{6} & 0 & \frac{1}{6} \\[0.3em] 0 & \frac{5}{6} & \frac{1}{6} \end{bmatrix}$$The difference is time between displaying the image and getting the same result by rendering the code is considerable. Google Sites of course also creates images for any LaTeX code inserted but it's far clunkier than for Google Docs (read more about this on my Google Site). With Google Docs, the g(Math) does most of the work for you. Of course, if you're viewing the previous matrix on a device running Android, then all you will see is the LaTeX notation. This is a good reason to use the graphics rather than the LaTeX code in Blogger.

So in summary:
  • Google Sites creates images of mathematical expressions from LaTeX code but it's a little clunky
  • Google Docs creates images of mathematical expressions from LaTeX code but g(Math) makes the process easier
  • Blogger will render LaTeX code if a link to MathJax is inserted into the head section of the template's HTML code OR, as I've done here, the mathematical content can be created first as images in Google Docs and then pasted into Blogger.

No comments:

Post a Comment