Skip to content

Theorem ​

When to use it ​

Use Theorem for theorems, lemmas, definitions, proofs, and other formal statements. It includes:

  • Automatic numbering
  • Consistent styling
  • English and Chinese labels

Basic Usage ​

markdown
<Theorem type="theorem" title="Pythagorean Theorem">

For a right triangle with legs $a$ and $b$, and hypotenuse $c$:

$$a^2 + b^2 = c^2$$

</Theorem>

The rendered heading is “Theorem 1 (Pythagorean Theorem).”

Available Types ​

Each type uses a distinct color:

TypeEnglishChineseColor
theoremTheorem定理Blue
lemmaLemma引理Purple
propositionProposition命题Cyan
corollaryCorollary推论Green
definitionDefinition定义Amber
exampleExample例Pink
remarkRemark注Gray
proofProof证明Slate
noteNote注意Sky
claimClaim断言Indigo

proof and note are rendered without automatic numbering by default. claim participates in the same auto-numbering flow as the other numbered theorem types.

Examples ​

Simple theorem:

markdown
<Theorem type="theorem">

Every bounded sequence of real numbers has a convergent subsequence.

</Theorem>

Theorem with title:

markdown
<Theorem type="definition" title="Continuity">

A function $f$ is continuous at $x=a$ if $\lim_{x \to a} f(x) = f(a)$.

</Theorem>

Manual numbering:

markdown
<Theorem type="lemma" number="3.2">

This lemma appears as "Lemma 3.2" instead of using an automatic number.

</Theorem>

No numbering:

markdown
<Theorem type="remark" :autoNumber="false">

This remark has no number.

</Theorem>

Content only, without the header label:

markdown
<Theorem type="note" :showHeader="false">

The original cash payment was real, but the **expense for this year** is only the part that has been consumed.

</Theorem>

Props ​

PropTypeDefaultDescription
typestring'theorem'Statement type listed above
numberstring | numberautomaticExplicit display number
titlestring-Optional title after the type and number
autoNumberbooleantrueEnables automatic numbering for supported types
compactbooleanfalseReduces margins, padding, and heading size
showHeaderbooleantrueHides the type, number, and title row when false