Changes

Jump to navigation Jump to search
384 bytes added ,  16:29, 27 February 2017
no edit summary
< [[Math]]|  <div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><div style="fontsize: 1.3em; fontweight: bold">Warning!</div>If you consider using ConTeXt for a paper with a proper formula numbering please wait until it is implemented in mkiv. At the moment only a very limited formula numbering is possilbe:* number formula(s) with a plain number* number formula(s) with a subnumberNot possible is at the moment:* Table of formulas* Named subformulas* Mixure of formulas and subformulas in one block* Reference on a (sub-)formula without having it listed in the Table of formulasFor more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Summary of formula numbering problem].</div> 
= Display Math =
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%">
<texcode>
\setupformulas[conversionnumberconversion=Character]
</texcode>
</td>
\setuppapersize[A5]
\setuplayout[width=8cm]
\setupformulas[conversionnumberconversion=Character]
\placeformula
\startformula
(see also [[Framed]])
To highlight part of a formula, you can give it a gray background using {{cmd|mframed}}: the following is the code you can use in mkii (see below what one has to do in mkiv):
<context source="yes">
\ln (1+x) =\, \graymath{x - {x^2\over2}} \,+ {x^3\over3}-\cdots.
\stopformula
</context>
 
In mkiv the code is slightly different: one may define {{cmd|graymath}} directly using {{cmd|definemathframed}}
 
<texcode>
\setuppapersize[A5]
\definemathframed[graymath]
[
frame=off,
location=mathematics,
background=color,
backgroundcolor=lightgray,
backgroundoffset=2pt
]
\starttext
Since for $|x| < 1$ we have
\startformula
\log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots
\stopformula
we may write $\log(1+x) = x + O(x^2)$.
\stoptext
</texcode>
 
The result is shown below (possibly the framed part of the formula is not aligned correctly with the remainder of the formula because the mkiv engine on Context Garden is not up to date…).
 
<context mode=mkiv>
\setuppapersize[A5]
\definemathframed[graymath]
[
frame=off,
location=mathematics,
background=color,
backgroundcolor=lightgray,
backgroundoffset=2pt
]
 
Since for $|x| < 1$ we have
\startformula
\log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots
\stopformula
we may write $\log(1+x) = x + O(x^2)$.
</context>

Navigation menu