Template:DisplayEquation: Difference between revisions

From KBwiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
<noinclude>
<includeonly>
{|border="0" align="center"
|-
<!-- Spaces between braces are important in next line -->
|align="center" width="610"|{{#if:{{{eqn|}}}|{{#tag:math|\displaystyle{ {{{eqn}}} } }}|&nbsp;}}
|align="left" width="40"|{{#if:{{{no|}}}|{{#tag:math|\left({{{no}}}\right)}}|&nbsp;}}
|}
</includeonly><noinclude>
== Usage ==
== Usage ==
The template takes two named parameters, ''eqn'' and ''no'', being the LaTeX expression and
The template takes two named parameters, ''eqn'' and ''no'', being the LaTeX expression and
Line 17: Line 24:
<pre>{{DisplayEquation|no=\text{axiom }M3|eqn=\rho(a,c)\le\rho(a,b)+\rho(b,c)}}</pre>
<pre>{{DisplayEquation|no=\text{axiom }M3|eqn=\rho(a,c)\le\rho(a,b)+\rho(b,c)}}</pre>
{{DisplayEquation|no=\text{axiom }M3|eqn=\rho(a,c)\le\rho(a,b)+\rho(b,c)}}
{{DisplayEquation|no=\text{axiom }M3|eqn=\rho(a,c)\le\rho(a,b)+\rho(b,c)}}
==Code==
<pre>
{|border="0" align="center"
|-
<!-- Spaces between braces are important in next line -->
|align="center" width="610"|{{#if:{{{eqn|}}}|{{#tag:math|\displaystyle{ {{{eqn}}} } }}|&nbsp;}}
|align="left" width="40"|{{#if:{{{no|}}}|{{#tag:math|\left({{{no}}}\right)}}|&nbsp;}}
|}
</pre>
</noinclude>
</noinclude>
<includeonly>
{|border="0" align="center"
|-
<!-- Spaces between braces are important in next line -->
|align="center" width="610"|{{#if:{{{eqn|}}}|{{#tag:math|\displaystyle{ {{{eqn}}} } }}|&nbsp;}}
|align="left" width="40"|{{#if:{{{no|}}}|{{#tag:math|\left({{{no}}}\right)}}|&nbsp;}}
|}
</includeonly>

Revision as of 15:43, 10 May 2011

Usage

The template takes two named parameters, eqn and no, being the LaTeX expression and the equation number respectively. Both parameters are optional, but only two combinations are useful:

{{DisplayEquation|eqn=a^2+b^2=c^2}}
 
{{DisplayEquation|no=28|eqn=\frac{\partial\rho Y_k}{\partial t}
+\frac{\partial\rho u_iY_k}{\partial x_i}=
\frac{\partial}{\partial x_i}\left(\rho D_k\frac{\partial Y_k}{\partial x_i}\right)
+\dot{\omega}_k\qquad \text{for } k=1,2,\dots,N}}


Note that equation labelling is not restricted to numbers:

{{DisplayEquation|no=\text{axiom }M3|eqn=\rho(a,c)\le\rho(a,b)+\rho(b,c)}}