Open main menu

Changes

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:
<contextsource="yes" text="This, when typeset, produces the following:">\setuppapersize[A5]\setuplayout[width=8cm]The famous result (and againonce more) is given by\placeformulastartplaceformula[formulalabelmyformularef]\startformulac^2 = a^2 + b^2.\stopformula\stopformulastopplaceformula
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.
1,005

edits