Open main menu

Changes

=== Inline math mode ===
There are four equivalent commands to get inline math mode:
<texcode>$ ... $ % TeX style.\mThere are four equivalent commands to get inline math mode: { ... } \math{ ... cmd|$} \mathematics{ ... }</texcode> Type , {{cmd|m}}, {{cmd|math}}, {{cmd|mathematics}} to get display inline math mode.
<context source="yes">
Demo:\parframed[align=normal,frame=off]{%
The famous result (once more) is given by $ c^2 = a^2 + b^2 $.\par % TeX style.
The famous result (once more) is given by \m{c^2 = a^2 + b^2}.\par
The famous result (once more) is given by \math{c^2 = a^2 + b^2}.\par
The famous result (once more) is given by \mathematics{c^2 = a^2 + b^2}.\par}
</context>
=== Note to Plain TeX Users ===
ConTeXt is plain TeX compatible. So, if you have any old document written in plain TeX, it will work with ConTeXt. This does not mean that you will get pixel by pixel identical output with ConTeXt. For inline math, everything that you learnt for plain TeX is also true for ConTeXt. However, display math is significantly different. '''Do not use <code>$$ .... $$</code>''' to write display math formulas in ConTeXt, since you will not get the correct spacing around the formulas. Instead use  <texcode>\{{cmd|startformula }} / {{cmd|stopformula}}... \stopformula</texcode>
See [[Math/Display]] for more details on how to use display math in ConTeXt.
1,005

edits