Changes

Jump to navigation Jump to search
The {{cmd|placeformula}} command is optional, and produces the equation number; leaving it off produces an unnumbered equation.
 
== Referencing formulae ==
Equations can be referred to by simply adding a label to {{cmd|placeformula}} and using {{cmd|ref}} to create the reference:
 
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%">
<texcode>
The famous result (and again) is given by
\placeformula[formulalabel]
\startformula
c^2 = a^2 + b^2.
\stopformula
And now we can refer to formula \ref[][formulalabel].
</texcode>
</td><td>
This, when typeset, produces the following:
 
<context>
\setuppapersize[A5]
\setuplayout[width=8cm]
The famous result (and again) is given by
\placeformula[formulalabel]
\startformula
c^2 = a^2 + b^2.
\stopformula
 
And now we can refer to formula \ref[][formulalabel].
</context>
</td></tr></table>
 
Note, that {{cmd|ref}} expects two arguments, therefore you need the brackets twice.
 
By default, only the formula number appears as a reference. This can be changed by using {{cmd|definereferenceformat}}. For example, to create a command <code>\eqref</code> which shows the formula number in brackets, use
<texcode>
\definereferenceformat[eqref][left=(,right=)]
</texcode>
See [[References]] for more examples of {{cmd|definereferenceformat}}.
== Changing format of numbers ==
1,047

edits

Navigation menu