<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Math on Beacon Demo</title><link>http://beacon-demo.starry-s.moe/tags/math/</link><description>Recent content in Math on Beacon Demo</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 15 Jul 2026 10:00:00 +0800</lastBuildDate><atom:link href="http://beacon-demo.starry-s.moe/tags/math/index.xml" rel="self" type="application/rss+xml"/><item><title>Writing Math with LaTeX</title><link>http://beacon-demo.starry-s.moe/posts/writing-math/</link><pubDate>Wed, 15 Jul 2026 10:00:00 +0800</pubDate><guid>http://beacon-demo.starry-s.moe/posts/writing-math/</guid><description>&lt;p&gt;Beacon supports LaTeX math. Equations are typeset &lt;strong&gt;at build time&lt;/strong&gt; with KaTeX
(via Hugo&amp;rsquo;s &lt;code&gt;transform.ToMath&lt;/code&gt;), so no JavaScript is shipped to readers — the
KaTeX stylesheet is only included on pages that actually contain math.&lt;/p&gt;
&lt;h2 id="inline-math"&gt;Inline math&lt;/h2&gt;
&lt;p&gt;Wrap inline expressions in &lt;code&gt;\(&lt;/code&gt; and &lt;code&gt;\)&lt;/code&gt;. For example, the identity
&lt;span class="katex"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;e^{i\pi} + 1 = 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; holds, and the golden ratio is
&lt;span class="katex"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;φ&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;msqrt&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;/msqrt&gt;&lt;/mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;mn&gt;1.618&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\varphi = \frac{1 + \sqrt{5}}{2} \approx 1.618&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Plain dollar signs are left alone, so writing about a $5 coffee or a $10
lunch is safe.&lt;/p&gt;</description></item><item><title>Shortcodes: Math, Music, and Sponsor</title><link>http://beacon-demo.starry-s.moe/posts/shortcodes-showcase/</link><pubDate>Tue, 14 Jul 2026 10:00:00 +0800</pubDate><guid>http://beacon-demo.starry-s.moe/posts/shortcodes-showcase/</guid><description>&lt;p&gt;Beacon ships a few shortcodes for richer posts. Everything below renders from a
short tag in the Markdown — no manual HTML.&lt;/p&gt;
&lt;h2 id="math-latex"&gt;Math (LaTeX)&lt;/h2&gt;
&lt;p&gt;Beacon typesets LaTeX with &lt;strong&gt;KaTeX at build time&lt;/strong&gt; — the equations are baked into
the HTML, so there is no client-side JavaScript and no flash of unstyled math.&lt;/p&gt;
&lt;p&gt;You can write math two ways. The first is bare delimiters (needs the Goldmark
passthrough extension, which this demo enables): the Pythagorean theorem
&lt;span class="katex"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;a^2 + b^2 = c^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; sits inline, and a display block reads:&lt;/p&gt;</description></item></channel></rss>