Translate

How to add LATEX Mathematical formula on blogger

  1. change to HTML mode
  2. add the follow code at the top
  3. save it

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js">
MathJax.Hub.Config({
 extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
 jax: ["input/TeX", "output/HTML-CSS"],
 tex2jax: {
     inlineMath: [ ['$','$'], ["\\(","\\)"] ],
     displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
 },
 "HTML-CSS": { availableFonts: ["TeX"] }
});
</script>

  • use dollar when you want to add it within a line like $\vec{A}$
  • use double dollar if you want to let the formula in a single line like $$\cos\theta=1$$


ref: https://2formosa.blogspot.com/2016/07/equations-in-blogspot.html

No comments:

Post a Comment