Difference between revisions of "Math"

From Wiki
Jump to navigation Jump to search
m (Small changes to "simple math" example, added typeset output.)
m (Corrected typo.)
Line 32: Line 32:
 
</context>
 
</context>
  
The <cmd>\placeformula</cmd> command is optional, and produces the equation number; leaving it off produces an unnumbered equation.
+
The <cmd>placeformula</cmd> command is optional, and produces the equation number; leaving it off produces an unnumbered equation.
  
 
(Someone please add a sample that shows the most advanced possible math without modules.)
 
(Someone please add a sample that shows the most advanced possible math without modules.)

Revision as of 19:36, 9 July 2005

< Main Page | Math with newmat | MathML >

Many people start with TeX because they want to set formulae. Simple math typesetting exists since PlainTeX and these commands work in ConTeXt as in LaTeX. Advanced math was introduced to TeX by AMS (American Mathematical Society); nowadays AMSTeX and LaTeX are united. But how can one use advanced math with ConTeXt?

  • There are two different math modules on CTAN, nath and amsl.
  • It is also possible to use most 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 new math module in the distribution.

Simple Math

ConTeXt supports inline math (mathematical formulas set within ordinary paragraphs as part of the text) and display math (mathematics set on lines by themselves, often with equation numbers).

Inline math is set as $c^2 = a^2 + b^2$, and display math as
\placeformula
\startformula
c^2 = a^2 + b^2.
\stopformula

This, when typeset, produces the following:

The \placeformula command is optional, and produces the equation number; leaving it off produces an unnumbered equation.

(Someone please add a sample that shows the most advanced possible math without modules.)

Here you can try it "live" (PDF interface!).

Number Formatting

There's a special command, \digits, and a own manual about formatting numbers, see Pasting digits together

Math Fonts

Science

  • Esp. for physics there’s the units module.
  • Additions to MathML are PhysML and ChemML.
  • Chemistry
  • There's a module for chemical structure formulae: PPCHTeX (works also with LaTeX). It's based on Metapost and MetaFun.