Testing Post 2

AI Summary

A test post that demonstrates the rich content the blog's Markdown renderer supports. The first half covers interactive charts written as fenced chart blocks with a JSON body: line charts built from shared labels or x/y points with optional smoothing and area fill, pie and donut charts built from labelled slices, and a draggable 3D globe that draws routes between named points. The second half covers LaTeX math rendered with KaTeX at build time: inline formulas in single dollar signs, centred display blocks, and fenced math blocks for aligned equations, piecewise functions and matrices, plus a Japanese grammar table built from an array with a one-sided brace and struck-out kana. It also shows math inside lists, tables and headings, escaping dollar signs, and red errors for invalid formulas. A quotes section covers blockquotes, icon callouts and nesting, and the post ends with an embedded photo.

Testing Post 2

Testing Post 2

This is the starter

Charts

Posts support interactive charts. Write a fenced code block tagged chart with a JSON body and the renderer draws the graph. Hover a chart to inspect values; click a line-chart legend item to toggle that series.

Line chart

Provide shared labels for the x-axis and one or more series, each with its own values. Optional smooth and area flags.

Japanese Test Scores by Month
020406080100JanFebMarAprMayJunScoreMonth

A series can instead be described as { "x": ..., "y": ... } points:

Daily Study Minutes
020406080100MonTueWedThuFriMinutes

Pie chart

Use slices, each with a label and value. Add "donut": true for a donut variant. Hover a slice (or its legend entry) to highlight it.

Final Exam Score Breakdown
66%15%7%13%100

Map chart

Draw routes from Point A to Point B on a draggable 3D globe. List the points (with lat/lng) and the routes between them; a route's from/to can reference a point by name or carry inline coordinates. Set "autoRotate": false to keep the globe still, and use the on-map button to toggle rotation. The route line itself stays fixed.

From Hong Kong to a New Life in Tokyo
  • Diving trip
  • Move to Japan

Math (LaTeX)

Posts render LaTeX with KaTeX. There are three ways to write it: $…$ for inline math, $$…$$ for a centred display block, and a fenced ```math block when the source deserves its own lines. Everything is typeset at build time, so no client-side script has to run for the formulas to show up.

Inline math

Wrap the expression in single dollar signs: Euler's identity, eiπ+1=0e^{i\pi} + 1 = 0, flows with the surrounding sentence, and so do symbols such as α\alpha, Σ\Sigma, 2\sqrt{2}, fractions like 34\tfrac{3}{4} and comparisons such as 0<ε≪10 < \varepsilon \ll 1.

Display math

Double dollar signs on their own lines centre the formula and give it room to breathe:

∫−∞∞e−x2 dx=π\int_{-\infty}^{\infty} e^{-x^{2}}\,dx = \sqrt{\pi} f^(ξ)=∫−∞∞f(x) e−2πixξ dx\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\, e^{-2\pi i x \xi}\,dx

Fenced math blocks

A fenced block tagged math is equivalent to $$…$$ and keeps long derivations readable in the source file:

(a+b)2=a2+2ab+b2(a−b)2=a2−2ab+b2(a+b)(a−b)=a2−b2\begin{aligned} (a + b)^2 &= a^2 + 2ab + b^2 \\ (a - b)^2 &= a^2 - 2ab + b^2 \\ (a + b)(a - b) &= a^2 - b^2 \end{aligned}

Environments such as aligned, cases, matrix and array all work:

f(n)={n/2if n≡0(mod2)3n+1if n≡1(mod2)f(n) = \begin{cases} n / 2 & \text{if } n \equiv 0 \pmod{2} \\ 3n + 1 & \text{if } n \equiv 1 \pmod{2} \end{cases} A=[1000cos⁡θ−sin⁡θ0sin⁡θcos⁡θ]A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{bmatrix}

Grammar brace (Japanese text)

\text{} accepts Japanese, and \left. … \right\} draws a one-sided brace, which suits grammar tables. \sout{} strikes out the dropped kana:

V て形V ない形 なくてい形容詞(い)くてな形容詞(な)で}、~\left. \begin{array}{l} \text{V て形} \\ \text{V ない形 なくて} \\ \text{い形容詞(\sout{い})くて} \\ \text{な形容詞(\sout{な})で} \end{array} \right\}\text{、~} [V て形V ない形 なくてい形容詞(い)くてな形容詞(な)で]、~\left[ \begin{array}{l} \text{V て形} \\ \text{V ない形 なくて} \\ \text{い形容詞(\sout{い})くて} \\ \text{な形容詞(\sout{な})で} \end{array} \right]\text{、~} [Vて形Vない形(い)くて形容詞い(い)くて形容詞な(な)で]、~\left[ \begin{array}{l} \text{V}_{\text{て形}} \\ \text{V}_{\text{ない形}}\text{(}\cancel{\text{い}}\text{)くて} \\ \text{形容詞}_{\text{い}}\text{(}\cancel{\text{い}}\text{)くて} \\ \text{形容詞}_{\text{な}}\text{(}\cancel{\text{な}}\text{)で} \end{array} \right]\text{、~}

Math inside other blocks

Formulas are allowed anywhere inline text is, including list items:

  1. Arithmetic series: ∑i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
  2. Geometric series: ∑i=0∞ri=11−r\sum_{i=0}^{\infty} r^{i} = \frac{1}{1-r} for ∣r∣<1|r| < 1
  3. Binomial coefficient: (nk)=n!k! (n−k)!\binom{n}{k} = \frac{n!}{k!\,(n-k)!}

...and table cells:

NotationMeaningExample
O(n)O(n)Linear timeA single pass over nn items
O(nlog⁡n)O(n \log n)Linearithmic timeComparison sorting
Θ(1)\Theta(1)Constant timeA hash lookup

Headings can hold math, like a2+b2=c2a^2 + b^2 = c^2

The table of contents on the right lists this section by the formula as it is drawn, and the heading's anchor link is still derived from the plain source.

Escaping dollar signs

A backslash keeps a dollar sign literal, so $5 and $10 stay plain text rather than opening a formula. Inline code is never parsed as math either, so $not math$ renders verbatim. A formula KaTeX cannot parse is shown in red where it sits instead of breaking the rest of the page.

Quotes

Start a line with > to make a blockquote:

Don't let anyone turn your sky into a ceiling.

Quotes can hold several paragraphs, bold, italic, code and links:

The first paragraph of a longer quote.

A second paragraph with bold, italic, inline code and a link.

Put a MingCute icon at the start to turn a quote into a callout:

Tip: renew the My Number Card together with the residence card.

Three wrong PIN entries lock the card.

Quotes can be nested, and can contain lists and math:

Outer quote

Nested quote

  • A list item inside a quote
  • Inline math such as eiπ+1=0e^{i\pi} + 1 = 0 also works here

Some photos

W

Web Development

Building modern web applications with React