Recently, I was trying to add a few mathematical equations in the bolg posts. However, the equations were not working well. I looked for some tutorials, and found the following solutions:
Add the following to the
it says that if the
mathjaxis enabled in the pages, it will render the equations using the package. And based on this blog post, it became easier to use usual formats and notations we use in latex.
mathjax: truein the default post configuration section of the
_config.ymlfile as follows:
# Defaults defaults: # _posts - scope: path: "" type: posts values: layout: single author_profile: true read_time: true comments: true share: true related: true mathjax: true
check the last line, I have enabled
And, now you are good to go. If you need to check the configuration files, you can visit my repository to see how I configured.
A few suggestions:
\vertas the pipe symbol rather than using
|within the math expressions. Sometimes it does not work.
- I prefer
$ $for inline expression (math within paragraph)
- Other than that, you can use
$$ $$for equations that are not within the paragraphs.
That’s it! Have a good day.