Example post

Contents

This draft brings the blog’s formatting and shortcodes together. Its source is a starting point for a new post.

Use bold for emphasis, italics for a softer emphasis, and strikethrough for a correction. Chinese text uses the CJK font: 数学与计算机科学。

An internal link stays in the same tab. An external Markdown link opens in a new tab, as does the external-link shortcode. A local download stays on this site.

A short quotation can stand apart from the surrounding discussion.

A footnote keeps an aside close without interrupting a sentence.1

Lists

  1. State the question.
  2. Work through a small example.
  3. Check the conclusion.

Keep related questions together:

Tasks can be marked as they are completed:

Mathematics

Inline mathematics works with both $S_n$ and \(n \geq 1\). Display equations can use dollar delimiters:

$$ S_n = \sum_{k=1}^{n} k = \frac{n(n+1)}{2}. $$

Theorems and proofs

Theorem (Sum of the first integers).

For every positive integer $n$, the sum $1+2+\cdots+n$ equals $n(n+1)/2$.

Proof

Write the sum in opposite orders:

\[ \begin{aligned} S_n &= 1 + 2 + \cdots + n, \\ S_n &= n + (n-1) + \cdots + 1. \end{aligned} \]

Each of the $n$ pairs adds up to $n+1$, so $2S_n=n(n+1)$.□

The proof can be collapsed by selecting its heading. The theorem’s id gives it a stable link.

Other statements

Lemma (Consecutive squares).

For every positive integer $n$, the difference $n^2-(n-1)^2$ equals $2n-1$.

Proof of the lemma

Expanding the square gives $n^2-(n^2-2n+1)=2n-1$.□

The kind parameter also accepts names such as Proposition or Definition. Use title for a statement’s name and id when it needs a cross-reference.

Images and tables

Images can live beside index.md or under static/assets/images/. This example uses the static images folder; the figure shortcode adds a caption and alternative text:

A right triangle with perpendicular legs a and b and hypotenuse c.

The small square marks the right angle. Here, a² + b² = c².

Ordinary Markdown images also work:

A right triangle with perpendicular legs a and b and hypotenuse c.

Number of termsSum written outTotal
111
21 + 23
31 + 2 + 36
41 + 2 + 3 + 410
51 + 2 + 3 + 4 + 515

Tables adapt to narrow screens. The values here agree with the sum formula, though checking examples alone does not prove it.

Code

Inline code, such as triangular(4), uses the same font as fenced code blocks:

def triangular(n):
    return n * (n + 1) // 2


print([triangular(n) for n in range(1, 6)])

The output is [1, 3, 6, 10, 15]. HTML keyboard markup, such as Ctrl + C, uses that font too.

The contents list includes headings at levels two through four. Categories, tags, dates, and reading time appear above it. The arrow in the lower corner returns to the top after scrolling.

Published posts appear in the Index, with five posts per page and previous/next links between posts. This example stays unpublished while draft = true.


  1. A footnote includes a return link to the sentence where it was cited. ↩︎