Template:Numbered block/doc: Difference between revisions
→When content of the blocks and block numbers are far apart: examples of changing the background color |
→Parameters: description of {{{Cl}}} |
||
(25 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{documentation subpage}} |
{{documentation subpage}} |
||
{{tsh|NumBlk}} |
|||
This template creates a numbered block which is usually used to number mathematical formulae. This template can be used together with {{tl|EquationRef}} and {{tl|EquationNote}} to produce nicely formatted numbered equations if a back reference to an equation is wanted. |
|||
{{Uses TemplateStyles|Template:Numbered block/styles.css}} |
|||
{{Lua|Module:String}} |
|||
This template creates a numbered block which is usually used to number mathematical and chemical formulae. This template can be used together with {{tl|EquationRef}} and {{tl|EquationNote}} to produce formatted numbered equations if a back reference to an equation is wanted. Alternatively, {{tl|Numbered block 2}} can also be used directly—a template that combines the main functionalities of both {{tl|Numbered block}} and {{tl|EquationRef}}. |
|||
{{visible anchor|top-warn|text={{warning sign}}<nowiki/>''':''' This template may cause '''[[Special:LintErrors|lint errors]]''' when used with leading colons <code>:</code>, leading asterisks <code>*</code>, or leading hash symbols <code>#</code>. Please refer to [[#Indentation_other_than_using_parameter_|2=|§ Indentation other than using parameter {{para|2}}]], {{section link||Unordered list}}, and {{section link||Ordered list}} for more information.}} |
|||
== Parameters == |
|||
Command: <nowiki>{{NumBlk|<1>|<2>|<3>|RawN=<>|LnSty=<>|Border=<>}}</nowiki> |
|||
== Usage == |
|||
Parameters <nowiki>{{{1}}}</nowiki>, <nowiki>{{{2}}}</nowiki>, and <nowiki>{{{3}}}</nowiki> of this template are required. In addition, there are three optional parameters <nowiki>{{{RawN}}}</nowiki>, <nowiki>{{{LnSty}}}</nowiki> and <nowiki>{{{Border}}}</nowiki>. |
|||
{{tlx|Numbered block|<1>|<2>|<3>|RawN{{=}}<>|LnSty{{=}}<>|Border{{=}}<>}} |
|||
:'''<nowiki>{{{1}}}</nowiki>''': Specify indentation. The more colons (:) you put, the further indented the block will be, up to a limit of 20. This parameter can be empty if no indentation is needed. |
|||
:'''<nowiki>{{{2}}}</nowiki>''': The body or content of the block. |
|||
== Parameters == |
|||
:'''<nowiki>{{{3}}}</nowiki>''': Specify the block number. |
|||
Parameters {{para|1}}, {{para|2}}, and {{para|3}} of this template are required. In addition, there are five optional parameters {{para|RawN}}, {{para|LnSty}}, {{para|Border}}, {{para|Cl}} and {{para|Attr}}. |
|||
:'''<nowiki>{{{RawN}}}</nowiki>''': If a non-empty non-whitespace value, no extra formatting will be applied to the block number. |
|||
* {{para|1}} |
|||
:'''<nowiki>{{{LnSty}}}</nowiki>''': Specify the line style. |
|||
*: Specify indentation. The more colons <code>:</code> you put, the further indented the block will be, up to a limit of 20. This parameter can be empty if no indentation is needed. |
|||
:'''<nowiki>{{{Border}}}</nowiki>''': If set, put a box around the equation. (Experimental.) |
|||
* {{para|2}}: The body or content of the block. |
|||
* {{para|3}}: Specify the block number. |
|||
* {{para|RawN}} |
|||
*: If a non-empty non-whitespace value, no extra formatting will be applied to the block number. |
|||
* {{para|LnSty}}: Specify the line style. |
|||
* {{para|Border}}: If set, put a box around the equation. (Experimental.) |
|||
* {{para|Cl}} |
|||
*: The value of this parameter will be added to the <code>class</code> attribute of the outermost element of the template. Therefore, this parameter must conform to the syntax of the <code>class</code> attribute, which is a space-separated list of classes. |
|||
* {{para|Attr}} |
|||
*: Specify the attributes of the outermost [[HTML element|element]] of the template. Default is <code><nowiki>style="margin-left: {{#expr:1.6 * </nowiki>''indentation_level''<nowiki>}}em;"</nowiki></code> where ''indentation_level'' is derived from {{para|1}}. Thus, this parameter determines the indentation of the template by default. When specifying the attributes of the outermost element of the template through this parameter, it is recommended to assign an appropriate value to this parameter to replace the original role of the default value and obtain the expected indentation effect. Besides, since the <code>class</code> attribute is already used internally by the template, specifying the <code>class</code> attribute directly in this parameter may cause problems. The <code>class</code> attribute should be set by assigning a value to {{para|Cl}} instead. (for [[wp:wrapper templates|wrapper templates]]) |
|||
== Examples == |
== Examples == |
||
{| class="wikitable" style="margin:1em auto; width:96%;" |
{| class="wikitable" style="margin:1em auto; width:96%;" |
||
!colspan="2"| |
!colspan="2"| |
||
=== |
=== Formulae may render HTML === |
||
|- |
|- |
||
|style="width:55%;"| |
|style="width:55%;"| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:|<math>y=ax+b</math>|Eq. 3}}</syntaxhighlight> |
||
|style="width:45%;"| |
|style="width:45%;"| |
||
{{ |
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3}} |
||
|- |
|||
| |
|||
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:|<math>ax^2+bx+c=0</math>|Eq. 3}}</syntaxhighlight> |
|||
| |
|||
{{Numbered block|:|<math>ax^2+bx+c=0</math>|Eq. 3}} |
|||
|- |
|||
| |
|||
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|1}}</syntaxhighlight> |
|||
| |
|||
{{Numbered block|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|1}} |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:|Fe<sup>3+</sup> + H<sub>2</sub>O<sub>2</sub> → Fe<sup>2+</sup> + HOO<sup>•</sup> + H<sup>+</sup>|2}}</syntaxhighlight> |
||
| |
| |
||
{{Numbered block|:|Fe<sup>3+</sup> + H<sub>2</sub>O<sub>2</sub> → Fe<sup>2+</sup> + HOO<sup>•</sup> + H<sup>+</sup>|2}} |
|||
{{NumBlk|:|<math>ax^2+bx+c=0</math>|Eq. 3}} |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:|<chem>H+ + CO3^2- -> HCO3^-</chem>|3}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|:|<chem>H+ + CO3^2- -> HCO3^-</chem>|3}} |
||
|- |
|- |
||
!colspan="2"| |
!colspan="2"| |
||
Line 37: | Line 59: | ||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}} |
||
|- |
|- |
||
!colspan="2"| |
!colspan="2"| |
||
Line 60: | Line 82: | ||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5)</math>|RawN=.}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5) \,</math>|RawN=.}} |
||
|- |
|- |
||
!colspan="2"| |
!colspan="2"| |
||
Line 98: | Line 120: | ||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=1px dashed red}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=1px dashed red}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=3px dashed #0a7392}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=3px dashed #0a7392}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px solid green}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px solid green}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px dotted blue}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px dotted blue}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=0px solid green}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=0px solid green}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px none green}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px none green}} |
||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" inline>{{ |
<syntaxhighlight lang="wikitext" inline>{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px double green}}</syntaxhighlight> |
||
| |
| |
||
{{ |
{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px double #f4c300}} |
||
|- |
|- |
||
!colspan="2"| |
!colspan="2"| |
||
=== Indentation other than using parameter {{para|2}} === |
|||
=== Line height and indentation (1) === |
|||
|- |
|- |
||
| |
| |
||
Line 139: | Line 161: | ||
The following equations |
The following equations |
||
:<math>3x+2y-z=1</math> |
:<math>3x+2y-z=1</math> |
||
:<math>2x-2y+4z=-2</math> |
::<math>2x-2y+4z=-2</math> |
||
:<math>-2x+y-2z=0</math> |
:::<math>-2x+y-2z=0</math> |
||
form a system of three equations. |
form a system of three equations. |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
Line 146: | Line 168: | ||
The following equations |
The following equations |
||
:<math>3x+2y-z=1</math> |
:<math>3x+2y-z=1</math> |
||
:<math>2x-2y+4z=-2</math> |
::<math>2x-2y+4z=-2</math> |
||
:<math>-2x+y-2z=0</math> |
:::<math>-2x+y-2z=0</math> |
||
form a system of three equations. |
form a system of three equations. |
||
|- |
|- |
||
Line 153: | Line 175: | ||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
The following equations |
The following equations |
||
{{ |
:{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
{{ |
::{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
{{ |
:::{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
||
form a system of three equations. |
form a system of three equations. |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Box|border size=1px|border color=red|background=lightpink |
|||
The following equations |
|||
|<p>The result is not rendered as there may be '''lint errors'''.</p><p>Combining leading colons ([[WP:DLIST|description lists]]) with {{tl|Numbered block}} in wikimarkup could be problematic.</p> |
|||
{{NumBlk|:|<math>3x+2y-z=1</math>|1}} |
|||
}} |
|||
{{NumBlk|:|<math>2x-2y+4z=-2</math>|2}} |
|||
{{NumBlk|:|<math>-2x+y-2z=0</math>|3}} |
|||
form a system of three equations. |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
The following equations |
The following equations |
||
<dl><dd> |
|||
<div style="line-height: 0;"> |
|||
{{ |
{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
<dl><dd> |
|||
{{NumBlk|:|<math>2x-2y+4z=-2</math>|2}} |
|||
{{ |
{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
< |
<dl><dd> |
||
{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
|||
</dd></dl> |
|||
</dd></dl> |
|||
</dd></dl> |
|||
form a system of three equations. |
form a system of three equations. |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
The following equations |
The following equations |
||
<dl><dd> |
|||
<div style="line-height: 0;"> |
|||
{{ |
{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
<dl><dd> |
|||
{{NumBlk|:|<math>2x-2y+4z=-2</math>|2}} |
|||
{{ |
{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
< |
<dl><dd> |
||
{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
|||
</dd></dl> |
|||
</dd></dl> |
|||
</dd></dl> |
|||
form a system of three equations. |
form a system of three equations. |
||
|- |
|- |
||
Line 187: | Line 215: | ||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
The following equations |
The following equations |
||
<div style="line-height: 0;"> |
|||
{{NumBlk||<math>3x+2y-z=1</math>|1}} |
|||
{{NumBlk||<math>2x-2y+4z=-2</math>|2}} |
|||
{{NumBlk||<math>-2x+y-2z=0</math>|3}} |
|||
</div> |
|||
form a system of three equations. |
|||
</syntaxhighlight> |
|||
| |
|||
The following equations |
|||
<div style="line-height: 0;"> |
|||
{{NumBlk||<math>3x+2y-z=1</math>|1}} |
|||
{{NumBlk||<math>2x-2y+4z=-2</math>|2}} |
|||
{{NumBlk||<math>-2x+y-2z=0</math>|3}} |
|||
</div> |
|||
form a system of three equations. |
|||
|- |
|||
| |
|||
<syntaxhighlight lang="wikitext"> |
|||
The following equations |
|||
<div style="line-height: 0; margin-left: 1.6em;"> |
|||
{{NumBlk||<math>3x+2y-z=1</math>|1}} |
|||
{{NumBlk||<math>2x-2y+4z=-2</math>|2}} |
|||
{{NumBlk||<math>-2x+y-2z=0</math>|3}} |
|||
</div> |
|||
form a system of three equations. |
|||
</syntaxhighlight> |
|||
| |
|||
The following equations |
|||
<div style="line-height: 0; margin-left: 1.6em;"> |
|||
{{NumBlk||<math>3x+2y-z=1</math>|1}} |
|||
{{NumBlk||<math>2x-2y+4z=-2</math>|2}} |
|||
{{NumBlk||<math>-2x+y-2z=0</math>|3}} |
|||
</div> |
|||
form a system of three equations. |
|||
|- |
|||
!colspan="2"| |
|||
=== Line height and indentation (2) === |
|||
|- style="height: 22em;" |
|||
| |
|||
<syntaxhighlight lang="wikitext"> |
|||
The following equations |
|||
:<math>3x+2y-z=1</math> |
|||
::<math>2x-2y+4z=-2</math> |
|||
:::<math>-2x+y-2z=0</math> |
|||
form a system of three equations. |
|||
</syntaxhighlight> |
|||
| |
|||
The following equations |
|||
:<math>3x+2y-z=1</math> |
|||
::<math>2x-2y+4z=-2</math> |
|||
:::<math>-2x+y-2z=0</math> |
|||
form a system of three equations. |
|||
|- style="height: 22em;" |
|||
| |
|||
<syntaxhighlight lang="wikitext"> |
|||
The following equations |
|||
<div style="line-height: 0; margin-left: 1.6em;"> |
|||
{{NumBlk||<math>3x+2y-z=1</math>|1}} |
|||
<div style="margin-left: 1.6em;"> |
<div style="margin-left: 1.6em;"> |
||
{{ |
{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
<div style="margin-left: 1.6em;"> |
|||
{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
|||
<div style="margin-left: 1.6em;"> |
<div style="margin-left: 1.6em;"> |
||
{{ |
{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
||
</div> |
</div> |
||
</div> |
</div> |
||
Line 256: | Line 228: | ||
| |
| |
||
The following equations |
The following equations |
||
<div style="line-height: 0; margin-left: 1.6em;"> |
|||
{{NumBlk||<math>3x+2y-z=1</math>|1}} |
|||
<div style="margin-left: 1.6em;"> |
<div style="margin-left: 1.6em;"> |
||
{{ |
{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
<div style="margin-left: 1.6em;"> |
<div style="margin-left: 1.6em;"> |
||
{{ |
{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
<div style="margin-left: 1.6em;"> |
|||
{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
|||
</div> |
</div> |
||
</div> |
</div> |
||
</div> |
</div> |
||
form a system of three equations. |
form a system of three equations. |
||
|- |
|||
|- style="height: 22em;" |
|||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
The following equations |
The following equations |
||
<div style="line-height: 0;"> |
|||
<div style="margin-left: calc(1.6em * 1);"> |
<div style="margin-left: calc(1.6em * 1);"> |
||
{{ |
{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
</div> |
</div> |
||
<div style="margin-left: calc(1.6em * 2);"> |
<div style="margin-left: calc(1.6em * 2);"> |
||
{{ |
{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
</div> |
</div> |
||
<div style="margin-left: calc(1.6em * 3);"> |
<div style="margin-left: calc(1.6em * 3);"> |
||
{{ |
{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
||
</div> |
|||
</div> |
</div> |
||
form a system of three equations. |
form a system of three equations. |
||
Line 285: | Line 255: | ||
| |
| |
||
The following equations |
The following equations |
||
<div style="line-height: 0;"> |
|||
<div style="margin-left: calc(1.6em * 1);"> |
<div style="margin-left: calc(1.6em * 1);"> |
||
{{ |
{{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
</div> |
</div> |
||
<div style="margin-left: calc(1.6em * 2);"> |
<div style="margin-left: calc(1.6em * 2);"> |
||
{{ |
{{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
</div> |
</div> |
||
<div style="margin-left: calc(1.6em * 3);"> |
<div style="margin-left: calc(1.6em * 3);"> |
||
{{ |
{{Numbered block||<math>-2x+y-2z=0</math>|3}} |
||
</div> |
|||
</div> |
</div> |
||
form a system of three equations. |
form a system of three equations. |
||
Line 314: | Line 282: | ||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
* {{ |
* {{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
* {{ |
* {{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
* {{ |
* {{Numbered block||<math>-2x+y-2z=0</math>|3}} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Box|border size=1px|border color=red|background=lightpink |
|||
* {{NumBlk||<math>3x+2y-z=1</math>|Eq. 1}} |
|||
|<p>The result is not rendered as there may be '''lint errors'''.</p><p>Combining leading asterisks ([[Help:List#List_basics|unordered lists]]) with {{tl|Numbered block}} in wikimarkup could be problematic.</p> |
|||
* {{NumBlk||<math>2x-2y+4z=-2</math>|Eq. 2}} |
|||
}} |
|||
* {{NumBlk||<math>-2x+y-2z=0</math>|Eq. 3}} |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
{{Bulleted list |
|||
<ul style="line-height: 0;"> |
|||
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ul> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Bulleted list |
|||
<ul style="line-height: 0;"> |
|||
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ul> |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
{{Bulleted list |
|||
<ul style="line-height: 0;"> |
|||
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ul> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Bulleted list |
|||
<ul style="line-height: 0;"> |
|||
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ul> |
|||
|- |
|- |
||
!colspan="2"| |
!colspan="2"| |
||
Line 369: | Line 337: | ||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
# {{ |
# {{Numbered block||<math>3x+2y-z=1</math>|1}} |
||
# {{ |
# {{Numbered block||<math>2x-2y+4z=-2</math>|2}} |
||
# {{ |
# {{Numbered block||<math>-2x+y-2z=0</math>|3}} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Box|border size=1px|border color=red|background=lightpink |
|||
# {{NumBlk||<math>3x+2y-z=1</math>|Eq. 1}} |
|||
|<p>The result is not rendered as there may be '''lint errors'''.</p><p>Combining leading hash symbols ([[Help:List#List_basics|ordered lists]]) with {{tl|Numbered block}} in wikimarkup could be problematic.</p> |
|||
# {{NumBlk||<math>2x-2y+4z=-2</math>|Eq. 2}} |
|||
}} |
|||
# {{NumBlk||<math>-2x+y-2z=0</math>|Eq. 3}} |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
{{Ordered list |
|||
<ol style="line-height: 0;"> |
|||
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ol> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Ordered list |
|||
<ol style="line-height: 0;"> |
|||
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ol> |
|||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
{{Ordered list |
|||
<ol style="line-height: 0;"> |
|||
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ol> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
| |
| |
||
{{Ordered list |
|||
<ol style="line-height: 0;"> |
|||
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div> |
|||
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div> |
|||
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div> |
|||
}} |
|||
</ol> |
|||
|- |
|- |
||
!colspan="2"| |
!colspan="2"| |
||
Line 412: | Line 380: | ||
|- |
|- |
||
| |
| |
||
<syntaxhighlight lang="wikitext" |
<syntaxhighlight lang="wikitext"> |
||
<!-- LnSty is not specified. --> |
|||
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|Border=1}} |
|||
</syntaxhighlight> |
|||
| |
| |
||
<!-- LnSty is not specified. --> |
|||
{{NumBlk|:|<math>y=ax+b</math>|Eq. 3|Border=1}} |
|||
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|Border=1}} |
|||
|- |
|||
| |
|||
<syntaxhighlight lang="wikitext"> |
|||
<!-- LnSty is specified. --> |
|||
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|LnSty=0.7em solid #e500e5|Border=1}} |
|||
</syntaxhighlight> |
|||
| |
|||
<!-- LnSty is specified. --> |
|||
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|LnSty=0.7em solid #e500e5|Border=1}} |
|||
|} |
|} |
||
Line 422: | Line 403: | ||
! style="width: 0.1%" | Markup |
! style="width: 0.1%" | Markup |
||
| <syntaxhighlight lang="wikitext"> |
| <syntaxhighlight lang="wikitext"> |
||
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}} |
|||
<div style="line-height:0;"> |
|||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}} |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
||
{{NumBlk|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
|||
</div> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
|- |
|- |
||
! Renders as |
! Renders as |
||
| |
|||
| <div style="line-height:0;"> |
|||
{{ |
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}} |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}} |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
||
</div> |
|||
|} |
|} |
||
Line 445: | Line 423: | ||
! style="width: 0.1%" | Markup |
! style="width: 0.1%" | Markup |
||
| <syntaxhighlight lang="wikitext"> |
| <syntaxhighlight lang="wikitext"> |
||
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}} |
|||
<div style="line-height:0;"> |
|||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}} |
||
{{NumBlk|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}} |
|||
</div> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
|- |
|- |
||
! Renders as |
! Renders as |
||
| |
|||
| <div style="line-height:0;"> |
|||
{{ |
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}} |
||
</div> |
|||
|} |
|} |
||
Line 468: | Line 443: | ||
! style="width: 0.1%" | Markup |
! style="width: 0.1%" | Markup |
||
| <syntaxhighlight lang="wikitext"> |
| <syntaxhighlight lang="wikitext"> |
||
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}} |
|||
<div style="line-height:0;"> |
|||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex none Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex none Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}} |
||
{{NumBlk|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}} |
|||
</div> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
|- |
|- |
||
! Renders as |
! Renders as |
||
| |
|||
| <div style="line-height:0;"> |
|||
{{ |
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex none Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex none Gainsboro}} |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}} |
||
</div> |
|||
|} |
|} |
||
Line 491: | Line 463: | ||
! style="width: 0.1%" | Markup |
! style="width: 0.1%" | Markup |
||
| <syntaxhighlight lang="wikitext"> |
| <syntaxhighlight lang="wikitext"> |
||
<div style="line-height:0;"> |
|||
<div style="background-color: Beige;"> |
<div style="background-color: Beige;"> |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}} |
||
</div> <div style="background-color: none;"> |
</div> <div style="background-color: none;"> |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}} |
||
</div> <div style="background-color: Beige;"> |
</div> <div style="background-color: Beige;"> |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}} |
||
</div> <div style="background-color: none;"> |
</div> <div style="background-color: none;"> |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}} |
||
</div> <div style="background-color: Beige;"> |
</div> <div style="background-color: Beige;"> |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
||
</div> |
|||
</div> |
</div> |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
|- |
|- |
||
! Renders as |
! Renders as |
||
| |
|||
| <div style="line-height:0;"> |
|||
<div style="background-color: Beige;"> |
<div style="background-color: Beige;"> |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}} |
||
</div> <div style="background-color: none;"> |
</div> <div style="background-color: none;"> |
||
{{ |
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}} |
||
</div> <div style="background-color: Beige;"> |
</div> <div style="background-color: Beige;"> |
||
{{ |
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}} |
||
</div> <div style="background-color: none;"> |
</div> <div style="background-color: none;"> |
||
{{ |
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}} |
||
</div> <div style="background-color: Beige;"> |
</div> <div style="background-color: Beige;"> |
||
{{ |
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
||
</div> |
|||
</div> |
</div> |
||
|} |
|} |
||
Line 528: | Line 497: | ||
(mouse over the row you want to highlight) |
(mouse over the row you want to highlight) |
||
{{row hover highlight}} |
{{row hover highlight}} |
||
{| class="hover-highlight" style=" |
{| class="hover-highlight" style="width: 100%; border-collapse: collapse; margin: 0; padding: 0;" |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
||
|} |
|} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
Line 546: | Line 515: | ||
(mouse over the row you want to highlight) |
(mouse over the row you want to highlight) |
||
{{row hover highlight}} |
{{row hover highlight}} |
||
{| class="hover-highlight" style=" |
{| class="hover-highlight" style="width: 100%; border-collapse: collapse; margin: 0; padding: 0;" |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}} |
||
|- |
|- |
||
| {{ |
| {{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}} |
||
|} |
|} |
||
|} |
|} |
||
Line 571: | Line 540: | ||
probabilistic relationships between diseases and symptoms. Given symptoms, the network can be used to compute |
probabilistic relationships between diseases and symptoms. Given symptoms, the network can be used to compute |
||
the probabilities of the presence of various diseases. |
the probabilities of the presence of various diseases. |
||
{{ |
{{Numbered block|1=:|2=<math> |
||
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
||
</math>,|3='''Eq.(6)'''|RawN=.}}</nowiki> |
</math>,|3='''Eq.(6)'''|RawN=.}}</nowiki> |
||
Line 581: | Line 550: | ||
probabilistic relationships between diseases and symptoms. Given symptoms, the network can be used to compute |
probabilistic relationships between diseases and symptoms. Given symptoms, the network can be used to compute |
||
the probabilities of the presence of various diseases. |
the probabilities of the presence of various diseases. |
||
{{ |
{{Numbered block|1=:|2=<math> |
||
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
||
</math>,|3='''Eq.(6)'''|RawN=.}} |
</math>,|3='''Eq.(6)'''|RawN=.}} |
||
Line 595: | Line 564: | ||
the probabilities of the presence of various diseases. |
the probabilities of the presence of various diseases. |
||
{{clear}} |
{{clear}} |
||
{{ |
{{Numbered block|1=:|2=<math> |
||
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
||
</math>,|3='''Eq.(6)'''|RawN=.}}</nowiki> |
</math>,|3='''Eq.(6)'''|RawN=.}}</nowiki> |
||
Line 606: | Line 575: | ||
the probabilities of the presence of various diseases. |
the probabilities of the presence of various diseases. |
||
{{clear}} |
{{clear}} |
||
{{ |
{{Numbered block|1=:|2=<math> |
||
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, |
||
</math>,|3='''Eq.(6)'''|RawN=.}} |
</math>,|3='''Eq.(6)'''|RawN=.}} |
||
Line 614: | Line 583: | ||
== Table caveat == |
== Table caveat == |
||
Because <code><nowiki>{{ |
Because <code><nowiki>{{Numbered block}}</nowiki></code> is implemented as a table, putting <code><nowiki>{{Numbered block}}</nowiki></code> within a table yields a [[Help:Table#Nested_tables|nested table]]. Due to a bug in [[MediaWiki]]'s handling of nested tables, {{tl|Numbered block}} must be used carefully in this case. In particular, when indentation for the outer table is desired, use explicit {{tag|dl|content={{tag|dd}}}} tags for indentation instead of a leading colon (:). |
||
For example, |
For example, |
||
Line 621: | Line 590: | ||
{| |
{| |
||
|<math>(f * g)[n]\,</math> |
|<math>(f * g)[n]\,</math> |
||
|{{ |
|{{Numbered block||<math>\stackrel{\mathrm{def}}{=}\sum_{m=-\infty}^{\infty} f[m]\cdot g[n - m]\,</math>| |
||
3=<span style="color:darkred">'''(Eq.1)'''</span>|RawN=.}} |
3=<span style="color:darkred">'''(Eq.1)'''</span>|RawN=.}} |
||
|- |
|- |
||
Line 633: | Line 602: | ||
{{(}}{{!}} |
{{(}}{{!}} |
||
{{!}}<math>(f * g)[n]\,</math> |
{{!}}<math>(f * g)[n]\,</math> |
||
{{!}}{{ |
{{!}}{{Numbered block||<math>\stackrel{\mathrm{def}}{=}\sum_{m=-\infty}^{\infty} f[m]\cdot g[n - m]\,</math>| |
||
3=<span style="color:darkred">'''(Eq.1)'''</span>|RawN=.}} |
3=<span style="color:darkred">'''(Eq.1)'''</span>|RawN=.}} |
||
{{!}}- |
{{!}}- |
||
Line 654: | Line 623: | ||
|- |
|- |
||
|The first parameter for indentation still works when used inside table. |
|The first parameter for indentation still works when used inside table. |
||
{{ |
{{Numbered block|::::|<math>ax^2+bx+c=0</math>|Level 4}} |
||
{{ |
{{Numbered block|:::|<math>ax^2+bx+c=0</math>|Level 3}} |
||
{{ |
{{Numbered block|::|<math>ax^2+bx+c=0</math>|Level 2}} |
||
{{ |
{{Numbered block|:|<math>ax^2+bx+c=0</math>|Level 1}} |
||
{{ |
{{Numbered block||<math>ax^2+bx+c=0</math>|Level 0}} |
||
|- |
|- |
||
|} |
|} |
||
Line 670: | Line 639: | ||
|- |
|- |
||
|The first parameter for indentation still works when used inside table. |
|The first parameter for indentation still works when used inside table. |
||
{{ |
{{Numbered block|::::|<math>ax^2+bx+c=0</math>|Level 4}} |
||
{{ |
{{Numbered block|:::|<math>ax^2+bx+c=0</math>|Level 3}} |
||
{{ |
{{Numbered block|::|<math>ax^2+bx+c=0</math>|Level 2}} |
||
{{ |
{{Numbered block|:|<math>ax^2+bx+c=0</math>|Level 1}} |
||
{{ |
{{Numbered block||<math>ax^2+bx+c=0</math>|Level 0}} |
||
|- |
|- |
||
|} |
|} |
||
Line 683: | Line 652: | ||
<includeonly>{{basepage subpage| |
<includeonly>{{basepage subpage| |
||
[[Category:Mathematical formatting templates]] |
[[Category:Mathematical formatting templates]] |
||
[[Category:Chemistry templates]] |
|||
}}</includeonly> |
}}</includeonly> |
Latest revision as of 17:46, 31 December 2024
This is a documentation subpage for Template:Numbered block. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses TemplateStyles: |
This template uses Lua: |
This template creates a numbered block which is usually used to number mathematical and chemical formulae. This template can be used together with {{EquationRef}} and {{EquationNote}} to produce formatted numbered equations if a back reference to an equation is wanted. Alternatively, {{Numbered block 2}} can also be used directly—a template that combines the main functionalities of both {{Numbered block}} and {{EquationRef}}.
Warning: This template may cause lint errors when used with leading colons :
, leading asterisks *
, or leading hash symbols #
. Please refer to § Indentation other than using parameter |2=
, § Unordered list, and § Ordered list for more information.
Usage
[edit]{{Numbered block|<1>|<2>|<3>|RawN=<>|LnSty=<>|Border=<>}}
Parameters
[edit]Parameters |1=
, |2=
, and |3=
of this template are required. In addition, there are five optional parameters |RawN=
, |LnSty=
, |Border=
, |Cl=
and |Attr=
.
|1=
- Specify indentation. The more colons
:
you put, the further indented the block will be, up to a limit of 20. This parameter can be empty if no indentation is needed.
- Specify indentation. The more colons
|2=
: The body or content of the block.|3=
: Specify the block number.|RawN=
- If a non-empty non-whitespace value, no extra formatting will be applied to the block number.
|LnSty=
: Specify the line style.|Border=
: If set, put a box around the equation. (Experimental.)|Cl=
- The value of this parameter will be added to the
class
attribute of the outermost element of the template. Therefore, this parameter must conform to the syntax of theclass
attribute, which is a space-separated list of classes.
- The value of this parameter will be added to the
|Attr=
- Specify the attributes of the outermost element of the template. Default is
style="margin-left: {{#expr:1.6 * indentation_level}}em;"
where indentation_level is derived from|1=
. Thus, this parameter determines the indentation of the template by default. When specifying the attributes of the outermost element of the template through this parameter, it is recommended to assign an appropriate value to this parameter to replace the original role of the default value and obtain the expected indentation effect. Besides, since theclass
attribute is already used internally by the template, specifying theclass
attribute directly in this parameter may cause problems. Theclass
attribute should be set by assigning a value to|Cl=
instead. (for wrapper templates)
- Specify the attributes of the outermost element of the template. Default is
Examples
[edit]
Formulae may render HTML[edit] | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
Indentation[edit] | ||||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
Formatting of equation number[edit] | ||||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
Line style[edit] | ||||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
Indentation other than using parameter [edit] | ||||||||||
The following equations
:<math>3x+2y-z=1</math>
::<math>2x-2y+4z=-2</math>
:::<math>-2x+y-2z=0</math>
form a system of three equations.
|
The following equations form a system of three equations. | |||||||||
The following equations
:{{Numbered block||<math>3x+2y-z=1</math>|1}}
::{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
:::{{Numbered block||<math>-2x+y-2z=0</math>|3}}
form a system of three equations.
|
The result is not rendered as there may be lint errors. Combining leading colons (description lists) with {{Numbered block}} in wikimarkup could be problematic. | |||||||||
The following equations
<dl><dd>
{{Numbered block||<math>3x+2y-z=1</math>|1}}
<dl><dd>
{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
<dl><dd>
{{Numbered block||<math>-2x+y-2z=0</math>|3}}
</dd></dl>
</dd></dl>
</dd></dl>
form a system of three equations.
|
The following equations
form a system of three equations. | |||||||||
The following equations
<div style="margin-left: 1.6em;">
{{Numbered block||<math>3x+2y-z=1</math>|1}}
<div style="margin-left: 1.6em;">
{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
<div style="margin-left: 1.6em;">
{{Numbered block||<math>-2x+y-2z=0</math>|3}}
</div>
</div>
</div>
form a system of three equations.
|
The following equations
form a system of three equations. | |||||||||
The following equations
<div style="margin-left: calc(1.6em * 1);">
{{Numbered block||<math>3x+2y-z=1</math>|1}}
</div>
<div style="margin-left: calc(1.6em * 2);">
{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
</div>
<div style="margin-left: calc(1.6em * 3);">
{{Numbered block||<math>-2x+y-2z=0</math>|3}}
</div>
form a system of three equations.
|
The following equations
form a system of three equations. | |||||||||
Unordered list[edit] | ||||||||||
* <math>3x+2y-z=1</math>
* <math>2x-2y+4z=-2</math>
* <math>-2x+y-2z=0</math>
|
| |||||||||
* {{Numbered block||<math>3x+2y-z=1</math>|1}}
* {{Numbered block||<math>2x-2y+4z=-2</math>|2}}
* {{Numbered block||<math>-2x+y-2z=0</math>|3}}
|
The result is not rendered as there may be lint errors. Combining leading asterisks (unordered lists) with {{Numbered block}} in wikimarkup could be problematic. | |||||||||
{{Bulleted list
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}
|
| |||||||||
{{Bulleted list
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}
|
| |||||||||
Ordered list[edit] | ||||||||||
# <math>3x+2y-z=1</math>
# <math>2x-2y+4z=-2</math>
# <math>-2x+y-2z=0</math>
|
| |||||||||
# {{Numbered block||<math>3x+2y-z=1</math>|1}}
# {{Numbered block||<math>2x-2y+4z=-2</math>|2}}
# {{Numbered block||<math>-2x+y-2z=0</math>|3}}
|
The result is not rendered as there may be lint errors. Combining leading hash symbols (ordered lists) with {{Numbered block}} in wikimarkup could be problematic. | |||||||||
{{Ordered list
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}
|
| |||||||||
{{Ordered list
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}
|
| |||||||||
Border[edit] | ||||||||||
<!-- LnSty is not specified. -->
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|Border=1}}
|
| |||||||||
<!-- LnSty is specified. -->
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|LnSty=0.7em solid #e500e5|Border=1}}
|
|
When content of the blocks and block numbers are far apart
[edit]Markup | {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}}
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}}
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}}
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}}
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}}
| |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Renders as |
|
Markup | {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}}
| |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Renders as |
|
Markup | {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex none Gainsboro}}
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex none Gainsboro}}
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}}
| |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Renders as |
|
Markup | <div style="background-color: Beige;">
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}}
</div> <div style="background-color: none;">
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}}
</div> <div style="background-color: Beige;">
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}}
</div> <div style="background-color: none;">
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}}
</div> <div style="background-color: Beige;">
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}}
</div>
| |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Renders as |
|
Markup | (mouse over the row you want to highlight)
{{row hover highlight}}
{| class="hover-highlight" style="width: 100%; border-collapse: collapse; margin: 0; padding: 0;"
|-
| {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}}
|-
| {{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}}
|-
| {{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}}
|-
| {{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}}
|-
| {{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}}
|}
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Renders as |
(mouse over the row you want to highlight)
|
Positioning relative to surrounding images
[edit]Numbered blocks should be able to be placed around images that take up space on the left or right side of the screen. To ensure numbered block has access to the entire line, consider using a {{clear}}-like template.
To illustrate, consider the example:
Markup | [[Image:Bnet_fan2.png|frame|right|Fig.1: Bayesian Network representation of Eq.(6)]] [[Image:Bnet_fan2.png|frame|left|Fig.1: Bayesian Network representation of Eq.(6)]] <br><br>A Bayesian network (or a belief network) is a probabilistic graphical model that represents a set of variables and their probabilistic independencies. For example, a Bayesian network could represent the probabilistic relationships between diseases and symptoms. Given symptoms, the network can be used to compute the probabilities of the presence of various diseases. {{Numbered block|1=:|2=<math> P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, </math>,|3='''Eq.(6)'''|RawN=.}} | |||
---|---|---|---|---|
Renders as |
|
If it is desirable for the numbered block to span the entire line, a {{clear}} should be placed before it.
Markup | [[Image:Bnet_fan2.png|frame|right|Fig.1: Bayesian Network representation of Eq.(6)]] [[Image:Bnet_fan2.png|frame|left|Fig.1: Bayesian Network representation of Eq.(6)]] <br><br>A Bayesian network (or a belief network) is a probabilistic graphical model that represents a set of variables and their probabilistic independencies. For example, a Bayesian network could represent the probabilistic relationships between diseases and symptoms. Given symptoms, the network can be used to compute the probabilities of the presence of various diseases. {{clear}} {{Numbered block|1=:|2=<math> P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, </math>,|3='''Eq.(6)'''|RawN=.}} | |||
---|---|---|---|---|
Renders as |
|
Table caveat
[edit]Because {{Numbered block}}
is implemented as a table, putting {{Numbered block}}
within a table yields a nested table. Due to a bug in MediaWiki's handling of nested tables, {{Numbered block}} must be used carefully in this case. In particular, when indentation for the outer table is desired, use explicit <dl>
tags for indentation instead of a leading colon (:).
<dd>...</dd>
</dl>
For example,
Markup |
| |||||||
---|---|---|---|---|---|---|---|---|
Renders as |
|
which shows how the outer <dl>
tags give the same indentation as a single colon (:) preceding the table should.
<dd>...</dd>
</dl>
For another example,
Markup |
| ||||||||||||||||
Renders as |
|
which uses two sets of explicit tags to give the same indentation as two colons (::).