deploy: 10dcb7a324
This commit is contained in:
parent
9ba85ea5df
commit
26ccdf3134
19 changed files with 84 additions and 84 deletions
|
@ -1,8 +1,8 @@
|
|||
<!doctype html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta property="og:title" content="Math Typesetting"><meta property="og:description" content="A brief guide to setup KaTeX"><meta property="og:type" content="article"><meta property="og:url" content="http://h.xjj.pub/math-typesetting/"><meta property="article:section" content><meta property="article:published_time" content="2021-07-18T10:52:59+08:00"><meta property="article:modified_time" content="2021-07-18T10:52:59+08:00"><meta name=twitter:card content="summary"><meta name=twitter:title content="Math Typesetting"><meta name=twitter:description content="A brief guide to setup KaTeX"><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#262d33"><title>Hi Folks - Math Typesetting</title><link rel="shortcut icon" href=/favicon.ico type=image/x-icon><link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap" rel=stylesheet><link rel=stylesheet href=/minima.1667708353.css><script defer type=text/javascript src=/minima.1667708353.js></script></head><script>let theme_2b_used=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';try{if(!('theme'in localStorage)){const a='system';(a==='dark'||a==='light')&&(theme_2b_used=a),localStorage.theme=theme_2b_used}document.querySelector('html').classList.add(localStorage.theme)}catch(a){console.error(a)}</script><body class="sm:mx-5 sm:my-0"><header class="flex justify-between items-center mb-6 sm:my-3"><div class="flex items-center"><div id=theme-switcher class="text-4xl cursor-pointer">🌝</div></div><nav class="flex items-center
|
||||
whitespace-nowrap overflow-x-auto overflow-y-hidden"><a class=ml-5 href=/>Home</a>
|
||||
<a class=ml-5 href=/categories>Categories</a>
|
||||
<a class=ml-5 href=/series>Series</a>
|
||||
<a class=ml-5 href=/about>About</a></nav></header><h1 class="mt-6 mb-6">Math Typesetting</h1><div class="mb-3 text-xs flex justify-between sm:flex-col"><div>Posted at — Jul 18, 2021</div></div><main><p>A brief guide to setup KaTeX</p><article class=md><p>Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.</p><p>In this example we will be using <a href=https://katex.org/>KaTeX</a></p><ul><li>Create a partial under <code>/layouts/partials/math.html</code></li><li>Within this partial reference the <a href=https://katex.org/docs/autorender.html>Auto-render Extension</a> or host these scripts locally.</li><li>Include the partial in your templates like so:</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre class=chroma><code><span class=lnt>1
|
||||
<!doctype html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta property="og:title" content="Math Typesetting"><meta property="og:description" content="A brief guide to setup KaTeX"><meta property="og:type" content="article"><meta property="og:url" content="http://h.xjj.pub/math-typesetting/"><meta property="article:section" content><meta property="article:published_time" content="2021-07-18T10:52:59+08:00"><meta property="article:modified_time" content="2021-07-18T10:52:59+08:00"><meta name=twitter:card content="summary"><meta name=twitter:title content="Math Typesetting"><meta name=twitter:description content="A brief guide to setup KaTeX"><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#262d33"><title>Hi Folks - Math Typesetting</title><link rel="shortcut icon" href=/favicon.ico type=image/x-icon><link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap" rel=stylesheet><link rel=stylesheet href=/minima.1667708588.css><script defer type=text/javascript src=/minima.1667708588.js></script></head><script>let theme_2b_used=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';try{if(!('theme'in localStorage)){const a='system';(a==='dark'||a==='light')&&(theme_2b_used=a),localStorage.theme=theme_2b_used}document.querySelector('html').classList.add(localStorage.theme)}catch(a){console.error(a)}</script><body class="sm:mx-5 sm:my-0"><header class="flex justify-between items-center mb-6 sm:my-3"><div class="flex items-center"><div id=theme-switcher class="text-4xl cursor-pointer">🌝</div></div><nav class="flex items-center
|
||||
whitespace-nowrap overflow-x-auto overflow-y-hidden"><a class=ml-5 href=http://h.xjj.pub/>Home</a>
|
||||
<a class=ml-5 href=http://h.xjj.pub/categories>Categories</a>
|
||||
<a class=ml-5 href=http://h.xjj.pub/series>Series</a>
|
||||
<a class=ml-5 href=http://h.xjj.pub/about>About</a></nav></header><h1 class="mt-6 mb-6">Math Typesetting</h1><div class="mb-3 text-xs flex justify-between sm:flex-col"><div>Posted at — Jul 18, 2021</div></div><main><p>A brief guide to setup KaTeX</p><article class=md><p>Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.</p><p>In this example we will be using <a href=https://katex.org/>KaTeX</a></p><ul><li>Create a partial under <code>/layouts/partials/math.html</code></li><li>Within this partial reference the <a href=https://katex.org/docs/autorender.html>Auto-render Extension</a> or host these scripts locally.</li><li>Include the partial in your templates like so:</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre class=chroma><code><span class=lnt>1
|
||||
</span><span class=lnt>2
|
||||
</span><span class=lnt>3
|
||||
</span></code></pre></td><td class=lntd><pre class=chroma><code class=language-bash data-lang=bash><span class=o>{{</span> <span class=k>if</span> or .Params.math .Site.Params.math <span class=o>}}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue