[NTG-context] How to typeset differential (math)?

2015-06-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, how to typeset differential in math correctly? Here are my attempts: \definemathcommand[dif][nolop]{\mfunction{d}} % Based on http://wiki.contextgarden.net/Math/functions \starttext \startformula \sin x {\tf d} x \stopformula \startformula \sin x \dif x \stopformu

Re: [NTG-context] How to typeset differential (math)?

2015-06-17 Thread Manuel Blanco
The most common definition is \define\dif{\mathop{}\!\mfunction{d}} (I don't know enough of ConTeXt, so may be {\tf d} is better than \mfunction{d}). The important part is \mathop{}\! which will add the space on the left automatically when it's needed (for instance in \frac{\dif x}{\dif y}

[NTG-context] How to define a new environment / function?

2015-06-17 Thread Dr. Thomas Möbius
Dear list, having used ConTeXt for years now, I am the first time in need to, well, "programming" something. And I realised, I am a little bit lost. I have a rather long list of variable descriptions that I would like to typeset in a usable and readable way. It should look something like this: -

Re: [NTG-context] How to typeset differential (math)?

2015-06-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, thanks for the solution: \define\dif{\mathop{}\!\mfunction{d}} Some explanation for \mathop and \mfunction would be appreciated, and also explanation why \definemathcommand[dif][nolop]{\mfunction{d}} didn't work... But it is not urgent, just for perfection... Best regards, Lukas --

Re: [NTG-context] How to typeset differential (math)?

2015-06-17 Thread Manuel Blanco
The easy way to answer that: \definemathcommand[dif][nolop]{\mfunction{d}} didn't work because it's intended for log-like functions, and you don't want a log-like function, but a differential, which behaves differently (for instance, you *want* space between the function and the argument in `\sin x

Re: [NTG-context] How to typeset differential (math)?

2015-06-17 Thread Aditya Mahajan
On Wed, 17 Jun 2015, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, thanks for the solution: \define\dif{\mathop{}\!\mfunction{d}} Another alternative is (untested) \definemathcommand[dif][nolop]{\mfunction{d}\kern\zeropoint} Some explanation for \mathop and \mfunction would be appre

Re: [NTG-context] How to typeset differential (math)?

2015-06-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, On Wed, 17 Jun 2015 16:23:01 +0200, Manuel Blanco wrote: The easy way to answer that: \definemathcommand[dif][nolop]{\mfunction{d}} didn't work because it's intended for log-like functions, and you don't want a log-like function, but a differential, which behaves differently (for instan