Template:Theorem: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Inthar (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div class="math_theorem" style="{{{style|}}}"><!--
<includeonly><div class="math_theorem" style="{{{style|}}}">
ne pas enlever le saut de ligne suivant, do not remove the next line break,  cf bug 9207,
{{#if: {{{contents|{{{1|}}}}}}|<strong class="theorem-name">{{#if: {{{name|}}}|{{{name|}}}|Theorem}}</strong><!--
-->
{{#if: {{{contents|{{{1|}}}}}}
| <strong class="theorem-name">{{#if: {{{name|}}}
| {{{name|}}}
| Theorem
}}</strong><!--
-->{{#if:{{{note|}}}|&nbsp;<span class="theorem-note">({{{note}}})</span>|}}<!--
-->{{#if:{{{note|}}}|&nbsp;<span class="theorem-note">({{{note}}})</span>|}}<!--
--><span class="theoreme-tiret">&nbsp;&mdash;&nbsp;</span><!--  
--><span class="theoreme-tiret">&nbsp;&nbsp;</span><!--  
-->{{{contents|}}}<!--
-->{{{contents|}}}|}}
-->|  
</div></includeonly><noinclude>
}}<!--
{{documentation}}
ne pas enlever le saut de ligne suivant
-->
</div></includeonly><noinclude>Formats math theorems, for example:
<pre> {{theorem|note=Existence of an irrational number|contents=<math>\sqrt{2}</math> is irrational.}}</pre>
yields
 
{{theorem|note=Existence of an irrational number|contents=<math>\sqrt{2}</math> is irrational.}}
 
Note: To include the character <code>|</code>, it must be escaped as <code><nowiki>{{!}}</nowiki></code>, unless it appears inside preformatted text (such as a <nowiki><syntaxhighlight></nowiki> or <nowiki><math></nowiki> tag).


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 11:42, 2 February 2025

Template documentation[view] [edit] [history] [purge]

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.

See also