Template:Theorem/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 3: Line 3:
For example:
For example:


: <code>{{((}}theorem{{pipe}}note=Existence of an irrational number{{pipe}}contents=<math>\sqrt{2}</math> is irrational.{{))}}</code>
<pre>
{{theorem
| note=Existence of an irrational number
| contents=<math>\sqrt{2}</math> is irrational.
}}
</pre>


yields
yields


{{theorem|note=Existence of an irrational number|contents=<math>\sqrt{2}</math> is irrational.}}
{{{{ROOTPAGENAMEE}}
| note=Existence of an irrational number
| contents=<math>\sqrt{2}</math> is irrational.
}}


<br>Only the <code>contents</code> parameter is obligatory.
Only the <code>contents</code> parameter is obligatory.


'''Note:''' To include the character <code>{{!}}</code>, it must be escaped as <code>{{((}}!{{))}}</code>, unless it appears inside preformatted text (such as a <code>{{^(}}syntaxhighlight{{)^}}</code> or <code>{{^(}}math{{)^}}</code> tag).
{{escape notice}}


=== See also ===
=== See also ===
* [[Template:Proof]]
* [[Template:Proof]]

Revision as of 02:35, 31 August 2024

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.

See also