Changes

Jump to navigation Jump to search
added some links, corrected package=module
< [[Main Page]], | [[Math]]>
One of the barriers to using ConTeXt is that the equation syntax is quite different from LaTeX equation syntax. As a result, one cannot copy equations from LaTeX documents (whether existing documents, or articles for journals that request LaTeX submissions) into ConTeXt documents, or vice versa. Without some solution to this, producing a set of ConTeXt slides to go with a LaTeX article would require completely rewriting all of the equations.
</texcode>
Thus, a command such as <tt>\begin{array}</tt> in a LaTeX equation will simply call <ttcmd>\startarray</ttcmd>, and we can define all of the remaining compatibility macros as <tt>\start ... \stop</tt> pairs without needing to translate the equations manually to match. However, this does not work with all ConTeXt environments; a few of them require the literal string <tt>\stopenvironment</tt> at the end of the environment.
With that framework in mind, we can start duplicating some of the basic LaTeX equation environments. To start with, the <tt>equation</tt> environment itself, along with the <tt>equation*</tt> environment from AMSmath.
</texcode>
The <tt>array</tt> environment is a notably more complicated construction. Luckily, it's already been duplicated in Giuseppe Bilotta's <tt>t-[[Math with amsl.tex</tt> package|amsl]] module, so we don't have to rewrite it. (The spacing is somewhat tighter than LaTeX's <tt>array</tt>, though.) Using that simply requires the following line at the head of the ConTeXt document:
<texcode>
Once the package is loaded, you'll be able to use <tt>\startarray ... \stoparray</tt> in pretty much the same way as <tt>\begin{array} ... \end{array}</tt> was used in LaTeX.
The <tt>t-[[Math with amsl.tex</tt> package |amsl]] module also defines equivalents for AMSmath's <tt>align</tt> and <tt>gather</tt> macros (which provide an improved version of the <tt>eqnarray</tt> functionality, and you should translate your LaTeX eqnarrays to use them anyway!), but unfortunately they are examples of the rare ConTeXt macros that do not work with our <tt>\begin{} ... \end{}</tt> translation, at least in the version current as of 2004/08/02. The following versions do work, however:
<texcode>
----
I should also add: there's a set of code for bold math (text and symbols) in [http://www.ntg.nl/pipermail/ntg-context/2004/005314.html this message to the ConTeXt mailing list]and [http://www.ntg.nl/pipermail/ntg-context/2004/005315.html its followup here]. This matter is also discussed, perhaps more thoroughly, in [http://www.pragma-ade.com/general/magazines/mag-0005.pdf ConTeXt Magazine issue #5].

Navigation menu