Template:Theorem: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><div class="math_theorem" style="{{{style | <includeonly><div class="math_theorem" {{#if: {{{style|}}}|style{{=}}"{{{style}}}"|}}> | ||
{{#if: {{{contents|{{{1|}}}}}}|<strong class="theorem-name">{{#if: {{{name|}}}|{{{name | {{#if: {{{contents|{{{1|}}}}}}|<strong class="theorem-name">{{#if: {{{name|}}}|{{{name}}}|Theorem}}</strong><!-- | ||
-->{{#if:{{{note|}}}| <span class="theorem-note">({{{note}}})</span>|}}<!-- | -->{{#if: {{{note|}}}| <span class="theorem-note">({{{note}}})</span>|}}<!-- | ||
--><span class="theoreme-tiret"> — </span><!-- | --><span class="theoreme-tiret"> — </span><!-- | ||
-->{{{contents|}}}|}} | -->{{{contents|}}}|}} | ||
Latest revision as of 00:06, 28 January 2026
This template formats mathematical theorems.
Usage
For example:
{{theorem
| note=Existence of an irrational number
| contents=<math>\sqrt{2}</math> is irrational.
}}
yields
Theorem (Existence of an irrational number) — [math]\displaystyle{ \sqrt{2} }[/math] is irrational.
Only the contents parameter is obligatory.
Note: Pipe characters (|) must be escaped as {{!}} or {{pipe}}, equals signs must be escaped as {{=}} (this may apply to tags as well, e.g. <div style{{=}}"…">), and other special characters and character sequences may need to be escaped accordingly, except for ones inside <nowiki>, <pre>, <math>, and <syntaxhighlight> tags.