Changes

Jump to navigation Jump to search
1,168 bytes added ,  09:27, 29 November 2006
→‎Numbering Formulae: Added (basic) referencing to formulae
You can use <cmd>setupformulas</cmd> to change the format of numbers. For example to get bold numbers inside square brackets use
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%">
<texcode>
\setupformulas[left={[},right={]},numberstyle=bold]
To get alphabets instead of numbers, use
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%">
<texcode>
\setupformulas[conversion=Character]
</context>
</td></tr></table>
 
=== Referencing formulae ===
Equations can be referred to by simply adding a label to <cmd>placeformula</cmd> and using <cmd>ref</cmd> 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>
\setuplayout[scale=0.8,width=8cm]
The famous result (once more) is given by
\placeformula[formulalabel]
\startformula
c^2 = a^2 + b^2.
\stopformula
% number is added manually because otherwise only '??' appears:
And now we can refer to formula 1.
</context>
</td></tr></table>
 
By default, only the formula number appears as a reference. This can be changed by using <cmd>definereferenceformat</cmd>. 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</cmd>.
== Not so Simple Maths ==
23

edits

Navigation menu