Changes

Jump to navigation Jump to search
656 bytes added ,  20:53, 28 April 2007
→‎Sub-Formula Numbering: New method also outlined
=Sub-Formula Numbering=
As mentioned above== Automatic Sub-Formula Numbering == To use subformula numbering, formulas you can be numbered using use <cmd>startsubformulas</cmd>/<cmd>stopsubformulas</cmd>. For example <table width="100%" cols="2"><tr valign="top"><td width="50%"><texcode>Examples:\startsubformulas[eq:1]\placeformula[eq:first]\startformula c^2 = a^2 + b^2\stopformula \placeformula[eq:second]\startformulac^2 = a^2 + b^2\stopformula\stopsubformulasFormula (\in[eq:1]) states the Pythagora's Theorem twice,once in (\in[eq:first]) and again in (\in[eq:second]).</texcode></td><td><context>\setuplayout[scale=0.8,width=8cm]Examples:\startsubformulas[eq:1]\placeformula[eq:first]\startformula c^2 = a^2 + b^2\stopformula \placeformula[eq:second]\startformulac^2 = a^2 + b^2\stopformula\stopsubformulasFormula (\in[eq:1]) states the Pythagora's Theorem twice, once in (\in[eq:first]) and again in (\in[eq:second]).</context></td></tr></table>  == The Manual Method == Sometimes, you need more fine grained control over numbering of subformulas. In that case one can make use of the optional agument of <cmd>placeformula</cmd> command. This (and the related <cmd>placesubformula</cmd> command have an optional argument commands which can be used to produce sub-formula numbering. For example:
<table width="100%" cols="2"><tr valign="top"><td width="50%">
<table width="100%" cols="2"><tr valign="top"><td width="50%">
<texcode>
Yet more examples:
\placeformula
\startformula
\eqalignno{ c^2 &= a^2 + b^2 &\formulanumber{a} \cr c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr a^2 + b^2 &= c^2 &\subformulanumber{c} \cr d^2 &= e^2 &\formulanumber\cr}
\stopformula
</texcode>
<context>
\setuplayout[scale=0.8,width=8cm]
Yet more examples:
\placeformula
\startformula
\eqalignno{ c^2 &= a^2 + b^2 &\formulanumber{a} \cr c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr a^2 + b^2 &= c^2 &\subformulanumber{c} \cr d^2 &= e^2 &\formulanumber\cr}
\stopformula
</context>
-- 23:46, 15 Aug 2005 (CEST) Prinse Wang
 
If you want named subformula with a reference see the solution proposed by Aditya Mahajan on the mailing-list [http://archive.contextgarden.net/message/20061029.063821.ba521b6c.en.html] (2006-10-29). This feature should be added to the core eventually.
=List of Formulas=

Navigation menu