<!doctype html><htmllang=en><head><metacharset=utf-8><metaname=viewportcontent="width=device-width,initial-scale=1"><metaproperty="og:title"content="Math Typesetting"><metaproperty="og:description"content="A brief guide to write mathematical notation."><metaproperty="og:type"content="article"><metaproperty="og:url"content="https://mivinci.github.io/hugo-theme-minima/math-typesetting/"><metaproperty="article:section"content><metaproperty="article:published_time"content="2021-07-18T10:52:59+08:00"><metaproperty="article:modified_time"content="2021-07-18T10:52:59+08:00"><metaname=twitter:cardcontent="summary"><metaname=twitter:titlecontent="Math Typesetting"><metaname=twitter:descriptioncontent="A brief guide to write mathematical notation."><metaname=theme-colormedia="(prefers-color-scheme: light)"content="#ffffff"><metaname=theme-colormedia="(prefers-color-scheme: dark)"content="#262d33"><title>Hugo on Minima - Math Typesetting</title><linkrel="shortcut icon"href=/hugo-theme-minima/favicon.icotype=image/x-icon><linkrel=stylesheethref=/hugo-theme-minima/minima.1678788037.css><scriptdefertype=text/javascriptsrc=/hugo-theme-minima/minima.1678788037.js></script></head><script>letdefault_theme=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';try{consta=localStorage.getItem('theme');a&&(default_theme=a),localStorage.setItem('theme',default_theme),window.minima_theme=default_theme,document.querySelector('html').classList.add(default_theme)}catch(a){console.error(a)}</script><body><headerclass="mt-3 mb-6"><divclass="container mx-auto"><navclass="flex justify-between items-center"><divclass="flex items-center"><divid=theme-switchclass="text-3xl cursor-pointer">🌝</div></div><ulclass="flexitems-centerfont-medium
whitespace-nowrap overflow-x-auto overflow-y-hidden"><liclass="ml-2 mr-2"><ahref=/hugo-theme-minima/tags>Tags</a></li><liclass="ml-2 mr-2"><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:
</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.