[NTG-context] Math literal colon
Hans Hagen
pragma at wxs.nl
Fri Jul 24 10:30:52 CEST 2015
On 7/20/2015 6:06 PM, Hans Aberg wrote:
>
>> On 20 Jul 2015, at 16:40, Aditya Mahajan <adityam at umich.edu> wrote:
>>
>> On Mon, 20 Jul 2015, Hans Aberg wrote:
>>
>>> The LaTeX package unicode-math has an option colon=literal, which makes it behave as in math functions (as in example below). Has ConTeXt a similar option?
>>
>> No. You have to use \colon.
>
> It would be nice with such an option, as it helps the readability of the input files.
already for some years i'm thinking of something similar to openmath
dictionaries i.e. in many cases when one writes math it is in some field
that is consistent within a document, say logic or engineering
it is rather trivial to support something
\setupmathematics[domain=logic]
or so, where we automatically relate the math class with the symbols
used, something that becomes more important once we start coding in
unicode instead of using names
but ... in order to provide this, i need information about useful
categories
i had planned this for later this year but anyway uploaded a beta that
has an experimental feature (this is something to discuss at the
upcoming context meeting)
\startluacode
mathematics.registerdomain {
name = "foo",
parents = { "bar" },
characters = {
[0x3A] = {
char = 0x2236,
class = "inner"
}
}
}
\stopluacode
\startTEXpage
$a: b$\par
\setupmathematics[domain=foo]$a: b$\par
\mathematics[domain=foo]{a: b}\par
\definemathematics[foo][domain=foo]\mathematics[foo]{a: b}\par
\stopTEXpage
eventually we can consider a set of domains and a macro for defining a
set of them etc but it all depends on use ...
i'll upload a beta
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-context
mailing list