Mudanças entre as edições de "NumBlk/doc"
NumBlk>Justin545 (→Examples: refine horizontal position 2) |
m (49 edições ) |
||
(25 revisões intermediárias por 15 usuários não estão sendo mostradas) | |||
Linha 1: | Linha 1: | ||
− | This template creates a numbered block which is usually used to number mathematical formulae. | + | {{documentation subpage}} |
+ | 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. | ||
== Parameters == | == Parameters == | ||
− | Parameters <nowiki>{{{1}}}</nowiki>, <nowiki>{{{2}}}</nowiki>, and <nowiki>{{{3}}}</nowiki> of this template are required. In addition, there are | + | Command: <nowiki>{{NumBlk|<1>|<2>|<3>|RawN=<>|LnSty=<>|Border=<>}}</nowiki> |
− | '''<nowiki>{{{1}}}</nowiki>''': Specify indentation. The more colons (:) you put, the further indented the block will be. This parameter can be empty if no indentation is needed. | + | |
− | '''<nowiki>{{{2}}}</nowiki>''': The body or content of the block. | + | 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>. |
− | '''<nowiki>{{{3}}}</nowiki>''': Specify the block number. | + | :'''<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>{{{RawN}}}</nowiki>''': | + | :'''<nowiki>{{{2}}}</nowiki>''': The body or content of the block. |
− | '''<nowiki>{{{LnSty}}}</nowiki>''': Specify the line style. | + | :'''<nowiki>{{{3}}}</nowiki>''': Specify the block number. |
− | '''<nowiki>{{{Border}}}</nowiki>''': If set, put a box around the equation. (Experimental.) | + | :'''<nowiki>{{{RawN}}}</nowiki>''': If a non-empty non-whitespace value, no extra formatting will be applied to the block number. |
+ | :'''<nowiki>{{{LnSty}}}</nowiki>''': Specify the line style. | ||
+ | :'''<nowiki>{{{Border}}}</nowiki>''': If set, put a box around the equation. (Experimental.) | ||
== Examples == | == Examples == | ||
Linha 17: | Linha 20: | ||
|- | |- | ||
|width="55%"| | |width="55%"| | ||
− | < | + | <source lang="tex" inline>{{NumBlk|:|<math>y=ax+b</math>|Eq. 3}}</source> |
|width="45%"| | |width="45%"| | ||
{{NumBlk|:|<math>y=ax+b</math>|Eq. 3}} | {{NumBlk|:|<math>y=ax+b</math>|Eq. 3}} | ||
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|:|<math>ax^2+bx+c=0</math>|Eq. 3}}</source> |
| | | | ||
{{NumBlk|:|<math>ax^2+bx+c=0</math>|Eq. 3}} | {{NumBlk|:|<math>ax^2+bx+c=0</math>|Eq. 3}} | ||
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|2}}</source> |
| | | | ||
{{NumBlk|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|2}} | {{NumBlk|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|2}} | ||
Linha 35: | Linha 38: | ||
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}}</source> |
| | | | ||
− | {{NumBlk||<math>\ | + | {{NumBlk||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}}</source> |
| | | | ||
− | {{NumBlk|:|<math>\ | + | {{NumBlk|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}}</source> |
| | | | ||
− | {{NumBlk|::|<math>\ | + | {{NumBlk|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}}</source> |
| | | | ||
− | {{NumBlk|:::|<math>\ | + | {{NumBlk|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}} |
|- | |- | ||
!colspan="2"| | !colspan="2"| | ||
Linha 58: | Linha 61: | ||
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5)</math>|RawN=.}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5) \,</math>|RawN=.}} |
|- | |- | ||
!colspan="2"| | !colspan="2"| | ||
Linha 96: | Linha 99: | ||
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=1px dashed red}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=1px dashed red}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=3px dashed #0a7392}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=3px dashed #0a7392}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px solid green}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px solid green}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px dotted blue}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px dotted blue}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=0px solid green}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=0px solid green}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px none green}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px none green}} |
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px double green}}</source> |
| | | | ||
− | {{NumBlk|1=:|2=<math>\ | + | {{NumBlk|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"| | ||
Linha 134: | Linha 137: | ||
|- | |- | ||
| | | | ||
− | < | + | <source lang="tex" inline>{{NumBlk|:|<math>y=ax+b</math>|Eq. 3|Border=1}}</source> |
| | | | ||
{{NumBlk|:|<math>y=ax+b</math>|Eq. 3|Border=1}} | {{NumBlk|:|<math>y=ax+b</math>|Eq. 3|Border=1}} | ||
Linha 143: | Linha 146: | ||
To illustrate, consider the example: | To illustrate, consider the example: | ||
− | < | + | {{markupv|m=<nowiki> |
+ | [[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)]] | [[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 | <br><br>A Bayesian network (or a belief network) is a probabilistic graphical model that represents a set of | ||
Linha 151: | Linha 155: | ||
{{NumBlk|1=:|2=<math> | {{NumBlk|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=.}}</nowiki> |
+ | |r= | ||
[[Image:Bnet_fan2.png|frame|right|Fig.1: Bayesian Network representation of Eq.(6)]] | [[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)]] | [[Image:Bnet_fan2.png|frame|left|Fig.1: Bayesian Network representation of Eq.(6)]] | ||
Linha 161: | Linha 166: | ||
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=.}} | ||
+ | }} | ||
{{clear}} | {{clear}} | ||
If it is desirable for the numbered block to span the entire line, a {{tl|clear}} should be placed before it. | If it is desirable for the numbered block to span the entire line, a {{tl|clear}} should be placed before it. | ||
− | < | + | {{markupv|m=<nowiki> |
+ | [[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)]] | [[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 | <br><br>A Bayesian network (or a belief network) is a probabilistic graphical model that represents a set of | ||
Linha 172: | Linha 179: | ||
{{NumBlk|1=:|2=<math> | {{NumBlk|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=.}}</nowiki> |
+ | |r= | ||
[[Image:Bnet_fan2.png|frame|right|Fig.1: Bayesian Network representation of Eq.(6)]] | [[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)]] | [[Image:Bnet_fan2.png|frame|left|Fig.1: Bayesian Network representation of Eq.(6)]] | ||
Linha 184: | Linha 192: | ||
</math>,|3='''Eq.(6)'''|RawN=.}} | </math>,|3='''Eq.(6)'''|RawN=.}} | ||
{{clear}} | {{clear}} | ||
+ | }} | ||
== Table caveat == | == Table caveat == | ||
− | Because {{tl|NumBlk}} is implemented as a table, putting {{tl|NumBlk}} within a table yields a [[Help:Table#Nested_tables|nested table]]. Due to a bug in [[ | + | Because {{tl|NumBlk}} is implemented as a table, putting {{tl|NumBlk}} within a table yields a [[Help:Table#Nested_tables|nested table]]. Due to a bug in [[MediaWiki]]'s handling of nested tables, {{tl|NumBlk}} 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, | ||
− | < | + | {{markupv|m=<source lang="xml"> |
+ | <dl><dd> | ||
{| | {| | ||
|<math>(f * g)[n]\,</math> | |<math>(f * g)[n]\,</math> | ||
|{{NumBlk||<math>\stackrel{\mathrm{def}}{=}\sum_{m=-\infty}^{\infty} f[m]\cdot g[n - m]\,</math>| | |{{NumBlk||<math>\stackrel{\mathrm{def}}{=}\sum_{m=-\infty}^{\infty} f[m]\cdot g[n - m]\,</math>| | ||
− | 3=< | + | 3=<span style="color:darkred">'''(Eq.1)'''</span>|RawN=.}} |
|- | |- | ||
| | | | ||
|<math>= \sum_{m=-\infty}^{\infty} f[n-m]\cdot g[m].\,</math> ([[Convolution#Commutativity|commutativity]]) | |<math>= \sum_{m=-\infty}^{\infty} f[n-m]\cdot g[m].\,</math> ([[Convolution#Commutativity|commutativity]]) | ||
|} | |} | ||
− | </dd></dl></ | + | </dd></dl> |
− | + | </source> | |
+ | |r= | ||
<dl><dd> | <dl><dd> | ||
− | { | + | {{(}}{{!}} |
− | + | {{!}}<math>(f * g)[n]\,</math> | |
− | + | {{!}}{{NumBlk||<math>\stackrel{\mathrm{def}}{=}\sum_{m=-\infty}^{\infty} f[m]\cdot g[n - m]\,</math>| | |
− | 3=< | + | 3=<span style="color:darkred">'''(Eq.1)'''</span>|RawN=.}} |
− | + | {{!}}- | |
− | + | {{!}} | |
− | + | {{!}}<math>= \sum_{m=-\infty}^{\infty} f[n-m]\cdot g[m].\,</math> ([[Convolution#Commutativity{{!}}commutativity]]) | |
− | + | {{!}}{{)}} | |
</dd></dl> | </dd></dl> | ||
− | which shows how the outer | + | }} |
+ | which shows how the outer {{tag|dl|content={{tag|dd}}}} tags give the same indentation as a single colon (:) preceding the table should. | ||
For another example, | For another example, | ||
− | < | + | {| style="table-layout: fixed; width: 90%; border-width: medium; margin-left: 0em;" |
+ | {{#if: | {{!}}+ ''''''}} | ||
+ | |- | ||
+ | | style="width:10%; border-width: 1px; padding: 5px; border-style: solid solid none solid; border-color: #ddd; vertical-align:text-top;" | Markup | ||
+ | | style="border-width: 1px; padding: 5px; border-style: solid solid none none; border-color: #ddd; vertical-align:text-top;" | {{#tag:pre| | ||
+ | <source lang="xml"><dl><dd> | ||
<dl><dd> | <dl><dd> | ||
{| | {| | ||
Linha 227: | Linha 244: | ||
|} | |} | ||
</dd></dl> | </dd></dl> | ||
− | </dd></dl></pre | + | </dd></dl></source>|style="border: none; margin:0; padding: 0; word-wrap: break-word; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: -pre-wrap; white-space: pre-wrap"}} |
− | + | |- | |
− | <dl><dd> | + | | style="width:10%; border-width: 1px; padding: 5px; border-style: solid; border-color: #ddd; vertical-align:top;" | Renders as |
+ | | style="border-width: 1px; padding: 5px; border-style: solid solid solid none; border-color: #ddd; vertical-align:text-top;" | <dl><dd> | ||
<dl><dd> | <dl><dd> | ||
{| | {| | ||
Linha 243: | Linha 261: | ||
</dd></dl> | </dd></dl> | ||
</dd></dl> | </dd></dl> | ||
+ | |} | ||
which uses two sets of explicit tags to give the same indentation as two colons (::). | which uses two sets of explicit tags to give the same indentation as two colons (::). | ||
− | <includeonly> | + | <includeonly>{{basepage subpage| |
[[Category:Mathematical formatting templates]] | [[Category:Mathematical formatting templates]] | ||
− | </includeonly> | + | }}</includeonly> |
Edição atual tal como às 19h06min de 16 de abril de 2020
{{#ifeq:numblk/doc |doc
|
{{#ifeq:show |show
| Predefinição:Mbox }}{{#if: | | {{#ifexist::NumBlk/doc | [[Category:{{#switch: |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
This template creates a numbered block which is usually used to number mathematical formulae. This template can be used together with {{EquationRef}} and {{EquationNote}} to produce nicely formatted numbered equations if a back reference to an equation is wanted.
Índice
Parameters
Command: {{NumBlk|<1>|<2>|<3>|RawN=<>|LnSty=<>|Border=<>}}
Parameters {{{1}}}, {{{2}}}, and {{{3}}} of this template are required. In addition, there are three optional parameters {{{RawN}}}, {{{LnSty}}} and {{{Border}}}.
- {{{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.)
Examples
Equations may render HTML | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
Indentation | |||||||||||||||
|
{{#if:|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if:::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
Formatting of equation number | |||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
Line style | |||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
| ||||||||||||||
Border | |||||||||||||||
|
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
|
Positioning relative to surrounding images
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:
{{#if: | |+ '}}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. {{NumBlk|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.
{{#if: | |+ '}}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}} {{NumBlk|1=:|2= <math> P(a, b, \lambda) = P(a| \lambda) P(b | \lambda) P(\lambda)\, </math> ,|3='''Eq.(6)'''|RawN=.}} | |||||||
Renders as |
{{#if::|Erro de script: Nenhum módulo desse tipo "String".|}}
|
Table caveat
Because {{NumBlk}} is implemented as a table, putting {{NumBlk}} within a table yields a nested table. Due to a bug in MediaWiki's handling of nested tables, {{NumBlk}} must be used carefully in this case. In particular, when indentation for the outer table is desired, use explicit {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dl|dl}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close = {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dd|dd}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:dd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dd|!--|-->|</dd>}}
}}
|e|empty|s|single|v|void = />
|o|open = >{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dd|dd}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:dd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dd|!--|-->|</dd>}}
}}
|p|pair = {{#ifeq:dl|!--||>}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dd|dd}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:dd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dd|!--|-->|</dd>}}
}}
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dl|!--|-->|</dl>}}
}}
tags for indentation instead of a leading colon (:).
For example,
{{#if: | |+ '}}Markup | <source lang="xml"> <dl><dd> { | |||||||||||
Renders as |
|
which shows how the outer {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dl|dl}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close = {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dd|dd}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:dd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dd|!--|-->|</dd>}}
}}
|e|empty|s|single|v|void = />
|o|open = >{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dd|dd}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:dd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dd|!--|-->|</dd>}}
}}
|p|pair = {{#ifeq:dl|!--||>}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|dd|dd}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:dd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dd|!--|-->|</dd>}}
}}
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:dl|!--|-->|</dl>}}
}}
tags give the same indentation as a single colon (:) preceding the table should.
For another example,
{{#if: | |+ '}}Markup | <source lang="xml"> <dl><dd> <dl><dd> { | ||||||||||||||||||||||||||||||||||||
Renders as |
|
which uses two sets of explicit tags to give the same indentation as two colons (::).