Changes

Jump to navigation Jump to search
209 bytes added ,  20:43, 3 March 2006
fixed typos
TeX was designed for ease of typesetting books that contained mathematics. As ConTeXt is built on top of TeX, it inherits all those features. In addition to these, ConTeXt adds lot of macros to make the typesetting of mathematics easier.
 
For typesetting of mathematics follows different rules than that of normal text, TeX uses something called "math mode" where some characters get a different meaning to enable a simple syntax for complicated formulas.
==Simple Math==
</context>
There are two ways of typing inline math. The TeX was way is to surround what you want to type within <code>$</code>...<code>$</code>. Thus, the above will be typed as
<texcode>
Pythagoras formula, stating $a^2 + b^2 = c^2$ was one of the first trignometric results
</texcode>
ConTeXt also provides an alternative way of typing the same result. Instead of dollars, you can write the material for maths inside <cmd>\mathematics</cmd>. Thus, an alternate way to type the above is,
<texcode>
Pythagoras formula, stating \mathematics{a^2 + b^2 = c^2} was one of the first trignometric results
</texcode>
Choose the method that suits your style. ((I do not know if there are pros and cons of $..$ vs \mathematics{}. If someone knows, then please elaborate -- aditya ))
Display math is enclosed in a <cmd>startformula</cmd> / <cmd>stopformula</cmd> pair. Thus
</td></tr></table>
== Numbering Formula Formulae ==
ConTeXt provides an easy way to number the display maths equations. Simply, put <cmd>placeformula</cmd> before <cmd>startformula</cmd> / <cmd>stopformula</cmd> pair and you will get numbered equations. Thus,
Note that both <cmd>formulanumber</cmd> and <cmd>subformulanumber</cmd> can be used within the same formula, and the formula number is incremented as expected. Also, if an optional argument is specified in both <cmd>placefigure</cmd> and <cmd>formulanumber</cmd>, the latter takes precedence.
 
----
<table width="100%" cols="2"><tr valign="top"><td width="50%">
<context>
\setuplayout[scale=0.8,width=8cm]
More examples for left-located equation numberno.:
\setupformulas[location=left]
\placeformula{d}
== Other Methods ==
* There are two different math modules on [http://dante.ctan.org/tex-archive/macros/context/contrib/maths/ CTAN], [[Math with nath|nath]] and [[Math with amsl|amsl]]. And there's a [[Math with newmat|new math]] module in the distribution.
* Context now has inbuilt support for [[Math_structures]]
* It is also possible to use most [[LaTeX Math in ConTeXt|LaTeX equations in ConTeXt]] with a relatively small set of supporting definitions.
* The "native" ConTeXt way of math is [[MathML]], an application of [[XML]] - rather verbose but mighty.
* And there's a [[Math with newmat|new math]] module in the distribution.
==Number Formatting==

Navigation menu