whitespace-nowrap overflow-x-auto overflow-y-hidden"><liclass="ml-1 mr-1"><ahref=/hugo-theme-minima/tags>Tags</a></li><liclass="ml-1 mr-1"><ahref=/hugo-theme-minima/series>Series</a></li></ul><ulclass="flex item-center text-sm font-bold"><liclass=ml-2><ahref=https://mivinci.github.io/hugo-theme-minima/>EN</a></li><liclass=ml-2><ahref=https://mivinci.github.io/hugo-theme-minima/zh-cn/>ZH</a></li></ul></nav></div></header><divclass="container mx-auto"><h1class="text-4xl font-extrabold mt-6 mb-6">Math Typesetting</h1><divclass="mb-3 text-sm flex justify-between"><div>Post at — Jul 18, 2021</div><div><aclass=ml-1href=/hugo-theme-minima/tags/KaTex>#KaTex</a></div></div><mainclass=mb-8><p>A brief guide to write mathematical notation.</p><articleclass=md><p>Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries like <ahref=https://katex.org>KaTeX</a> the one that Minima uses. Here’s what you can do in the configuration file to enable it.</p><pre><code>math:
enable: false
provider: katex
</code></pre><h2id=examples>Examples</h2><p>The following are some examples of mathematical notations with KaTeX that are pretty much like LaTeX’s.</p><h3id=block>Block</h3><pre><code>\varphi = 1+\frac{1}{1+\frac{1}{1+\frac{1} {1+\cdots}}}
$$</p><h3id=inline>Inline</h3><pre><code>Pythagorean theorem can be written as $a^2+b^2=c^2$ where *a*, *b* and *c* are the length of legs of a triangle.