defzone.net@gmail.comLiên hệ
DZ
DefZone.Net

Kien thuc cong nghe & giai tri

Bài viếtĐịa điểmAlbum ảnhGameCửa hàng
  1. Home
  2. Wiki
Template documentation[view] [edit] [history] [purge]
Shortcut
  • {{NumBlkTemplate:NumBlk}}
CSSThis template uses TemplateStyles:
  • Template:Numbered block/styles.css
This template uses Lua:
  • Module:String (sandbox)

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}}.

red-outlined triangle containing exclamation point 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.
  • |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 the class attribute, which is a space-separated list of classes.
  • |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 the class attribute is already used internally by the template, specifying the class attribute directly in this parameter may cause problems. The class attribute should be set by assigning a value to |Cl= instead. (for wrapper templates)

Examples

[edit]

Formulae may render HTML

[edit]

{{Numbered block|:|<math>y=ax+b</math>|Eq. 3}}

y = a x + b {\displaystyle y=ax+b} {\displaystyle y=ax+b} Eq. 3

{{Numbered block|:|<math>ax^2+bx+c=0</math>|Eq. 3}}

a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0} {\displaystyle ax^{2}+bx+c=0} Eq. 3

{{Numbered block|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|1}}

Ψ ( x 1 , x 2 ) = U ( x 1 ) V ( x 2 ) {\displaystyle \Psi (x_{1},x_{2})=U(x_{1})V(x_{2})} {\displaystyle \Psi (x_{1},x_{2})=U(x_{1})V(x_{2})} 1

{{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}}

Fe3+ + H2O2 → Fe2+ + HOO• + H+ 2

{{Numbered block|:|<chem>H+ + CO3^2- -> HCO3^-</chem>|3}}

H + + CO 3 2 − ⟶ HCO 3 − {\displaystyle {\ce {H+ + CO3^2- -> HCO3^-}}} {\displaystyle {\mathrm {H} {\vphantom {A}}^{+}{}+{}\mathrm {CO} {\vphantom {A}}_{\smash[{t}]{3}}{\vphantom {A}}^{2-}{}\mathrel {\longrightarrow } {}\mathrm {HCO} {\vphantom {A}}_{\smash[{t}]{3}}{\vphantom {A}}^{-}}} 3

Indentation

[edit]

{{Numbered block||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} 3.5

{{Numbered block|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} 1

{{Numbered block|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} 13.7

{{Numbered block|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} 1.2

Formatting of equation number

[edit]

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} 3.5

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} <3.5>

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} [3.5]

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} [3.5]

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} [3.5]

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} [3.5]

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5)</math>|RawN=.}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} ( 3.5 ) {\displaystyle (3.5)\,} {\displaystyle (3.5)\,}

Line style

[edit]

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
(3.5)

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
(3.5)

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
[3.5]

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
[3.5]

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
[3.5]

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
[3.5]

{{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}}

a ( t ) = d d t v ( t ) {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)} {\displaystyle \mathbf {a} (t)={\frac {d}{dt}}\mathbf {v} (t)}
[3.5]

Indentation other than using parameter |2=

[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

3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1}
2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2}
− 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0}

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

3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} 1
2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} 2
− 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} 3

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

3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} 1
2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} 2
− 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} 3

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

3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} 1
2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} 2
− 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} 3

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>
  • 3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1}
  • 2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2}
  • − 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0}
* {{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>
}}
  • 3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} Eq. 1
  • 2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} Eq. 2
  • − 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} Eq. 3
{{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>
}}
  • 3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} Eq. 1
  • 2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} Eq. 2
  • − 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} Eq. 3

Ordered list

[edit]
# <math>3x+2y-z=1</math>
# <math>2x-2y+4z=-2</math>
# <math>-2x+y-2z=0</math>
  1. 3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1}
  2. 2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2}
  3. − 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0}
# {{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>
}}
  1. 3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} Eq. 1
  2. 2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} Eq. 2
  3. − 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} Eq. 3
{{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>
}}
  1. 3 x + 2 y − z = 1 {\displaystyle 3x+2y-z=1} {\displaystyle 3x+2y-z=1} Eq. 1
  2. 2 x − 2 y + 4 z = − 2 {\displaystyle 2x-2y+4z=-2} {\displaystyle 2x-2y+4z=-2} Eq. 2
  3. − 2 x + y − 2 z = 0 {\displaystyle -2x+y-2z=0} {\displaystyle -2x+y-2z=0} Eq. 3

Border

[edit]
<!-- LnSty is not specified. -->
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|Border=1}}
y = a x + b {\displaystyle y=ax+b} {\displaystyle y=ax+b} Eq. 3
<!-- LnSty is specified. -->
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|LnSty=0.7em solid #e500e5|Border=1}}
y = a x + b {\displaystyle y=ax+b} {\displaystyle y=ax+b}
Eq. 3

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
a 2 + b 2 = ( a + b i ) ( a − b i ) {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} 1
a 2 − b 2 = ( a + b ) ( a − b ) {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} 2
e i x = cos ⁡ x + i sin ⁡ x {\displaystyle e^{ix}=\cos x+i\sin x} {\displaystyle e^{ix}=\cos x+i\sin x} 3
sin 2 ⁡ θ + cos 2 ⁡ θ = 1 {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} 4
sin ⁡ ( 2 θ ) = 2 sin ⁡ θ cos ⁡ θ {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } 5
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
a 2 + b 2 = ( a + b i ) ( a − b i ) {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)}
1
a 2 − b 2 = ( a + b ) ( a − b ) {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} {\displaystyle a^{2}-b^{2}=(a+b)(a-b)}
2
e i x = cos ⁡ x + i sin ⁡ x {\displaystyle e^{ix}=\cos x+i\sin x} {\displaystyle e^{ix}=\cos x+i\sin x}
3
sin 2 ⁡ θ + cos 2 ⁡ θ = 1 {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1}
4
sin ⁡ ( 2 θ ) = 2 sin ⁡ θ cos ⁡ θ {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta }
5
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
a 2 + b 2 = ( a + b i ) ( a − b i ) {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)}
1
a 2 − b 2 = ( a + b ) ( a − b ) {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} {\displaystyle a^{2}-b^{2}=(a+b)(a-b)}
2
e i x = cos ⁡ x + i sin ⁡ x {\displaystyle e^{ix}=\cos x+i\sin x} {\displaystyle e^{ix}=\cos x+i\sin x}
3
sin 2 ⁡ θ + cos 2 ⁡ θ = 1 {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1}
4
sin ⁡ ( 2 θ ) = 2 sin ⁡ θ cos ⁡ θ {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta }
5
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
a 2 + b 2 = ( a + b i ) ( a − b i ) {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} 1
a 2 − b 2 = ( a + b ) ( a − b ) {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} 2
e i x = cos ⁡ x + i sin ⁡ x {\displaystyle e^{ix}=\cos x+i\sin x} {\displaystyle e^{ix}=\cos x+i\sin x} 3
sin 2 ⁡ θ + cos 2 ⁡ θ = 1 {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} 4
sin ⁡ ( 2 θ ) = 2 sin ⁡ θ cos ⁡ θ {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } 5
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)

a 2 + b 2 = ( a + b i ) ( a − b i ) {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} {\displaystyle a^{2}+b^{2}=(a+bi)(a-bi)} 1
a 2 − b 2 = ( a + b ) ( a − b ) {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} {\displaystyle a^{2}-b^{2}=(a+b)(a-b)} 2
e i x = cos ⁡ x + i sin ⁡ x {\displaystyle e^{ix}=\cos x+i\sin x} {\displaystyle e^{ix}=\cos x+i\sin x} 3
sin 2 ⁡ θ + cos 2 ⁡ θ = 1 {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} {\displaystyle \sin ^{2}\theta +\cos ^{2}\theta =1} 4
sin ⁡ ( 2 θ ) = 2 sin ⁡ θ cos ⁡ θ {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } {\displaystyle \sin(2\theta )=2\sin \theta \cos \theta } 5

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
Fig.1: Bayesian Network representation of Eq.(6)
Fig.1: Bayesian Network representation of Eq.(6)



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.

P ( a , b , λ ) = P ( a | λ ) P ( b | λ ) P ( λ ) {\displaystyle P(a,b,\lambda )=P(a|\lambda )P(b|\lambda )P(\lambda )\,} {\displaystyle P(a,b,\lambda )=P(a|\lambda )P(b|\lambda )P(\lambda )\,}, Eq.(6)

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
Fig.1: Bayesian Network representation of Eq.(6)
Fig.1: Bayesian Network representation of Eq.(6)



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.

P ( a , b , λ ) = P ( a | λ ) P ( b | λ ) P ( λ ) {\displaystyle P(a,b,\lambda )=P(a|\lambda )P(b|\lambda )P(\lambda )\,} {\displaystyle P(a,b,\lambda )=P(a|\lambda )P(b|\lambda )P(\lambda )\,}, Eq.(6)

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><dd>...</dd></dl> tags for indentation instead of a leading colon (:).

For example,

Markup
<dl><dd>
{|
|<math>(f * g)[n]\,</math>&nbsp; &nbsp; &nbsp; 
|{{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=.}}
|-
|
|<math>= \sum_{m=-\infty}^{\infty} f[n-m]\cdot g[m].\,</math> &nbsp; &nbsp; &nbsp; ([[Convolution#Commutativity|commutativity]])
|}
</dd></dl>
Renders as
( f ∗ g ) [ n ] {\displaystyle (f*g)[n]\,} {\displaystyle (f*g)[n]\,}     
= d e f ∑ m = − ∞ ∞ f [ m ] ⋅ g [ n − m ] {\displaystyle {\stackrel {\mathrm {def} }{=}}\sum _{m=-\infty }^{\infty }f[m]\cdot g[n-m]\,} {\displaystyle {\stackrel {\mathrm {def} }{=}}\sum _{m=-\infty }^{\infty }f[m]\cdot g[n-m]\,} (Eq.1)
= ∑ m = − ∞ ∞ f [ n − m ] ⋅ g [ m ] . {\displaystyle =\sum _{m=-\infty }^{\infty }f[n-m]\cdot g[m].\,} {\displaystyle =\sum _{m=-\infty }^{\infty }f[n-m]\cdot g[m].\,}       (commutativity)

which shows how the outer <dl><dd>...</dd></dl> tags give the same indentation as a single colon (:) preceding the table should.

For another example,

Markup
<dl><dd>
<dl><dd>
{|
|-
|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}}
|-
|}
</dd></dl>
</dd></dl>
Renders as
The first parameter for indentation still works when used inside table.
a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0} {\displaystyle ax^{2}+bx+c=0} Level 4
a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0} {\displaystyle ax^{2}+bx+c=0} Level 3
a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0} {\displaystyle ax^{2}+bx+c=0} Level 2
a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0} {\displaystyle ax^{2}+bx+c=0} Level 1
a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0} {\displaystyle ax^{2}+bx+c=0} Level 0

which uses two sets of explicit tags to give the same indentation as two colons (::).

The above documentation is transcluded from Template:Numbered block/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
DZ
DefZone.Net

Noi chia se kien thuc, huong dan va kham pha cong nghe.

Liên kết nhanh

Trang chủ Bài viết Wiki Cửa hàng Liên hệ

Liên hệ

Email: defzone.net@gmail.com
Điện thoại: +84 762 559 696
Địa chỉ: Thiên Hương, Thủy Nguyên, Hải Phòng

Đăng ký nhận tin

Nhận bài viết và cập nhật mới nhất qua email.

© 2026 DefZone.Net. All rights reserved.
PrivacyTermsSitemap Language