<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>KaTeX on Robin Yang</title>
    <link>https://yrbing.github.io/tags/katex/</link>
    <description>Recent content in KaTeX on Robin Yang</description>
    <image>
      <title>Robin Yang</title>
      <url>https://yrbing.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://yrbing.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.152.2</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 29 Dec 2025 14:45:52 +0800</lastBuildDate>
    <atom:link href="https://yrbing.github.io/tags/katex/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Math Typesetting in Hugo</title>
      <link>https://yrbing.github.io/posts/math-typesetting-in-hugo/</link>
      <pubDate>Mon, 29 Dec 2025 14:45:52 +0800</pubDate>
      <guid>https://yrbing.github.io/posts/math-typesetting-in-hugo/</guid>
      <description>&lt;p&gt;Hugo supports LaTeX math rendering via third-party JavaScript libraries, with &lt;a href=&#34;https://www.mathjax.org/&#34;&gt;MathJax&lt;/a&gt; and &lt;a href=&#34;https://katex.org/&#34;&gt;KaTeX&lt;/a&gt; being the two most popular options. This guide uses &lt;strong&gt;KaTeX&lt;/strong&gt; for its speed and lightweight design.&lt;/p&gt;
&lt;p&gt;The implementation is simple: include the library in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section. However, to optimize performance, we&amp;rsquo;ll load it conditionally—only on pages that actually need it.&lt;/p&gt;
&lt;p&gt;$$
\color{#c7c3c3} {
\begin{pmatrix}
1 &amp;amp; 2 \\
3 &amp;amp; 4
\end{pmatrix}
}
$$&lt;/p&gt;
&lt;h3 id=&#34;1-create-a-partial-for-katex-assets&#34;&gt;1. Create a Partial for KaTeX Assets&lt;/h3&gt;
&lt;p&gt;Create a new file at &lt;code&gt;/layouts/partials/helpers/math.html&lt;/code&gt; and add the following:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
