틀:NumBlk/설명문서 문서 원본 보기
←
틀: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. == Parameters == Command: <nowiki>{{NumBlk|<1>|<2>|<3>|RawN=<>|LnSty=<>|Border=<>}}</nowiki> 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>{{{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. :'''<nowiki>{{{3}}}</nowiki>''': Specify the block number. :'''<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 == <div align="center" style="padding:0 0 0 1em;"> {|class="wikitable" width="96%" !colspan="2"| === Equations may render HTML === |- |width="55%"| <syntaxhighlight lang="tex" inline>{{NumBlk|:|<math>y=ax+b</math>|Eq. 3}}</syntaxhighlight> |width="45%"| {{NumBlk|:|<math>y=ax+b</math>|Eq. 3}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|:|<math>ax^2+bx+c=0</math>|Eq. 3}}</syntaxhighlight> | {{NumBlk|:|<math>ax^2+bx+c=0</math>|Eq. 3}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|2}}</syntaxhighlight> | {{NumBlk|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|2}} |- !colspan="2"| === Indentation === |- | <syntaxhighlight lang="tex" inline>{{NumBlk||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}}</syntaxhighlight> | {{NumBlk||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}}</syntaxhighlight> | {{NumBlk|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}}</syntaxhighlight> | {{NumBlk|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}}</syntaxhighlight> | {{NumBlk|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}} |- !colspan="2"| === Formatting of equation number === |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}} |- | <syntaxhighlight lang="tex" inline>{{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5)</math>|RawN=.}}</syntaxhighlight> | {{NumBlk|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5) \,</math>|RawN=.}} |- !colspan="2"| === Line style === |- | <syntaxhighlight 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}}</syntaxhighlight> | {{NumBlk|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="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}}</syntaxhighlight> | {{NumBlk|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="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}}</syntaxhighlight> | {{NumBlk|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="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}}</syntaxhighlight> | {{NumBlk|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="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}}</syntaxhighlight> | {{NumBlk|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="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}}</syntaxhighlight> | {{NumBlk|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="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}}</syntaxhighlight> | {{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"| === Border === |- | <syntaxhighlight lang="tex" inline>{{NumBlk|:|<math>y=ax+b</math>|Eq. 3|Border=1}}</syntaxhighlight> | {{NumBlk|:|<math>y=ax+b</math>|Eq. 3|Border=1}} |} </div> === 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 {{tl|clear}}-like template. 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)]] <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=.}}</nowiki> |r= [[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=.}} }} {{clear}} 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)]] <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=.}}</nowiki> |r= [[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=.}} {{clear}} }} == Table caveat == Because <code>{{NumBlk}}</code> is implemented as a table, putting <code>{{NumBlk}}</code> 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, {{markupv|m=<syntaxhighlight lang="xml"> <dl><dd> {| |<math>(f * g)[n]\,</math> |{{NumBlk||<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> ([[Convolution#Commutativity|commutativity]]) |} </dd></dl> </syntaxhighlight> |r= <dl><dd> {{(}}{{!}} {{!}}<math>(f * g)[n]\,</math> {{!}}{{NumBlk||<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> ([[Convolution#Commutativity{{!}}commutativity]]) {{!}}{{)}} </dd></dl> }} 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, {| 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| <syntaxhighlight lang="xml"><dl><dd> <dl><dd> {| |- |The first parameter for indentation still works when used inside table. {{NumBlk|::::|<math>ax^2+bx+c=0</math>|Level 4}} {{NumBlk|:::|<math>ax^2+bx+c=0</math>|Level 3}} {{NumBlk|::|<math>ax^2+bx+c=0</math>|Level 2}} {{NumBlk|:|<math>ax^2+bx+c=0</math>|Level 1}} {{NumBlk||<math>ax^2+bx+c=0</math>|Level 0}} |- |} </dd></dl> </dd></dl></syntaxhighlight>|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"}} |- | 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> {| |- |The first parameter for indentation still works when used inside table. {{NumBlk|::::|<math>ax^2+bx+c=0</math>|Level 4}} {{NumBlk|:::|<math>ax^2+bx+c=0</math>|Level 3}} {{NumBlk|::|<math>ax^2+bx+c=0</math>|Level 2}} {{NumBlk|:|<math>ax^2+bx+c=0</math>|Level 1}} {{NumBlk||<math>ax^2+bx+c=0</math>|Level 0}} |- |} </dd></dl> </dd></dl> |} which uses two sets of explicit tags to give the same indentation as two colons (::). <includeonly>{{basepage subpage| [[분류:수학 양식 틀]] }}</includeonly>
이 문서에서 사용한 틀:
틀:Clear
(
원본 보기
)
틀:Markupv
(
원본 보기
)
틀:NumBlk
(
원본 보기
)
틀:Tag
(
원본 보기
)
틀:Tl
(
원본 보기
)
틀:설명문서 안내
(
원본 보기
)
틀:NumBlk/설명문서
문서로 돌아갑니다.
둘러보기 메뉴
개인 도구
로그인
이름공간
틀
토론
한국어
보기
읽기
원본 보기
역사 보기
더 보기
검색
둘러보기
대문
최근 바뀜
임의의 문서로
미디어위키 도움말
특수 문서 목록
도구
여기를 가리키는 문서
가리키는 글의 최근 바뀜
문서 정보