Open main menu

Changes

= Display Math math =
Display math is enclosed in a {{cmd|startformula}} / {{cmd|stopformula}} pair. Thus
<table widthcontext source="100%yes" colstext="2This, when typeset, produces the following:"><tr valign="top"><td width="50%"><texcode>
The famous result (once more) is given by
\startformula
c^2 = a^2 + b^2.
\stopformula
</texcodecontext></td><td>This, when typeset, produces the following:
== Numbering Formulae == ConTeXt provides an easy way to number the display maths equations. Simply, insert the {{cmd|startformula}} in the {{cmd|startplaceformula}} environment, and you will get numbered equations.  <contextsource="yes" text="This, when typeset, produces the following:">\setuppapersize[A5]\setuplayout[width=8cm]
The famous result (once more) is given by
\startplaceformula
\startformula
c^2 = a^2 + b^2.
\stopformula
\stopplaceformula
</context>
</td></tr></table>
The {{cmd|placeformula}} command is optional, and produces the equation number; leaving it off produces an unnumbered equation. = Numbering Formulae =Changing format of numbers ==You can use {{cmd|setupformulas}} to change the format of numbers. For example to get bold numbers inside square brackets use
ConTeXt provides an easy way to number the display maths equations. Simply, insert the formula in the {{cmd|startplaceformula}} environment, and you will get numbered equations. Thus,<table widthcontext source="100%yes" colstext="3This, when typeset, produces the following:"><tr valign="top"><td width="48%"><texcode>
The famous result (once more) is given by
\setupformulas
[left={[},
right={]},
numberstyle=bold]
 
\startplaceformula
\startformula
c^2 = a^2 + b^2.
\stopformula
\stopplaceformula
</texcodecontextTo get equations also numbered by section, use the command {{cmd|setupnumbering}} <tdcode>\setupnumbering[way=bysection]</tdcode>in the preamble of your document.This means that the section number preceeds the formula number.Add also {{cmd|setupnumber}} <td widthcode>\setupnumber[formula][way="48%"bysection]</code>This, when typeset, produces the following:to reset with each new section.
<contextsource="yes" text="This, when typeset, produces the following:">\setuppapersize[A5]\setuplayout[width=8cm]
The famous result (once more) is given by
\setupformulas
[left={[},
right={]},
numberstyle=bold]
 
\setupnumbering [way=bysection] % to add the section number to the formula number
\setupnumber [formula] [way=bysection] % to reset with each new section
 
\startsection[title=First title]
\startplaceformula
\startformula
c^2 = a^2 + b^2
\stopformula
\stopplaceformula
\stopsection
 
\startsection[title=Second title]
\startplaceformula
\startformula
c^2 = a^2 + b^2.
\stopformula
\stopplaceformula
\stopsection
</context>
</td></tr></table>
The To get alphabets instead of numbers, use again {{cmd|placeformulasetupformulas}} command is optional, and produces the equation number; leaving it off produces an unnumbered equation.
<context source="yes" text= Changing format of numbers =="This, when typeset, produces the following:">The famous result (once more) is given byYou can use {{cmd|\setupformulas}} to change the format of numbers. For example to get bold numbers inside square brackets use[numberconversion=Character]
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%"><texcode> \setupformulas[left={[},right={]},numberstyle=bold]</texcode></td> <td>which gives <context>\setuppapersize[A5]\setuplayout[width=8cm]\setupformulas[left={[},right={]},numberstyle=bold]The famous result (once more) is given by\placeformulastartplaceformula
\startformula
c^2 = a^2 + b^2.
\stopformula
</context></td></tr></table>\stopplaceformula
To get equations also numbered by section, add the command:<texcode> \setupnumbersetupformulas[formula][waynumberconversion=bysectioncharacter] </texcode>To the start of your document.
To get alphabets instead of numbers, use<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%"><texcode>\setupformulas[numberconversion=Character]</texcode></td><td>which gives<context>\setuppapersize[A5]\setuplayout[width=8cm]\setupformulas[numberconversion=Character]\placeformulastartplaceformula
\startformula
c^2 = a^2 + b^2
\stopformula
\stopplaceformula
</context>
</td></tr></table>
== Changing Formula alignment ==
1,047

edits