Template:EquationRef

From OpenFOAMWiki


The pair of templates {{Template:EquationRef}} and {{Template:EquationNote}} is used for labeling equations in text.

For example, {{EquationRef|Eq. 1}}: <math>x^2+x+1=0</math> results in:

Eq. 1

x^2+x+1=0

Here, the identifier "Eq. 1" is a label which can be later referred to with a call to {{Template:EquationNote}}. That is, {{EquationNote|Eq. 1}} produces a link Eq. 1 to this equation.

Similarly, {{EquationRef|2|Eq. 2:}} <math>x^2-2x+1=0</math> results in:

Eq. 2:

x^2-2x+1=0

which can be referred to by {{EquationNote|2}} (i.e., 2 ) or even {{EquationNote|2|Equation 2}} (i.e., Equation 2 ).

This is a very static version of equation numbering. I've tried to us the <ref> tags, but until now without success:

x^2+x+1=0 [Eq. 1]

[Eq. 2]

x^2-2x+1=0 [Eq. 2]

[Eq. 1]

[Eq. 3]

x^2-2x+1=0 [Eq. 3]

[Eq. 3]

x^2-2x+1=0 Eq. 4

gl_4 gl_4


This has two drawbacks, first one has to number the cite tags by hand "-0","-1", "-2" and second one needs the <references group="Eq. "/> at the bottom of the page. If anybody has a new idea, please let me now.

Equations

This must be added, otherwise the ref's are not regenerated.

  1. 1.0 1.1 Eq. 10
  2. 2.0 2.1 Eq. 20
  3. 3.0 3.1 3.2 Eq.