Re: [NTG-context] Problem with a macro

2018-02-25 Thread Fabrice Couvreur
Hi Wolfgang,
Thank you for your suggestion. I will now consider the following macro :

\setupmathematics[integral=nolimits]
\unexpanded\def\integ#1#2#3{\math{\int_{#1}^{#2}{#3}\,\diff x}}

\starttext

\startformula
\integ{0}{1}{g(x)}=1
\stopformula

\stoptext

Fabrice

2018-02-23 15:03 GMT+01:00 Wolfgang Schuster :

>
> Fabrice Couvreur 
> 22. Februar 2018 um 22:15
> Hi,
> How to make the numbers of the integral are on the right with the macro of
> Hans ?
>
> The position of the limits are fixed for the \autointegral command.
>
> Wolfgang
>
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-23 Thread Wolfgang Schuster



Fabrice Couvreur 
22. Februar 2018 um 22:15
Hi,
How to make the numbers of the integral are on the right with the 
macro of Hans ?



The position of the limits are fixed for the \autointegral command.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-22 Thread Fabrice Couvreur
Hi,
How to make the numbers of the integral are on the right with the macro of
Hans ?
Thanks
Fabrice

\setupmathdelimiter[integral][rightoffset=-3mu,exact=yes,factor=2]

\unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\,\diff x}}

\starttext

\setupmathematics[integral=nolimits]

\startformula
\int_{0}^{1} g(x)\,\diff x = 1
\stopformula

\startformula
\integ{1}{0}{g(x)}=1
\stopformula

\stoptext



2018-02-12 0:39 GMT+01:00 Wolfgang Schuster :

>
> Jeong Dal 
> 12. Februar 2018 um 00:31
> Dear Otared,
>
> All of your examples yield the same output in which the numbers locate at
> the top and at the bottom of the integral sign.
> Is it what you expected?
> I am looking for a way to place numbers at the right of the integral sign
> under the \startformula … \stopformula environment as the output of
> $\displaystyle\int_1^4 …$.
>
>
> \starttext
>
> \startformula
> \int_{0}^{1} g(x)\,\diff x = 1
> \stopformula
>
> \setupmathematics[integral=nolimits]
>
> \startformula
> \int_{0}^{1} g(x)\,\diff x = 1
> \stopformula
>
> \setupmathematics[integral=limits]
>
> \startformula
> \int_{0}^{1} g(x)\,\diff x = 1
> \stopformula
>
> \stoptext
>
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Wolfgang Schuster



Jeong Dal 
12. Februar 2018 um 00:31
Dear Otared,

All of your examples yield the same output in which the numbers locate 
at the top and at the bottom of the integral sign.

Is it what you expected?
I am looking for a way to place numbers at the right of the integral 
sign under the \startformula … \stopformula environment as the output 
of $\displaystyle\int_1^4 …$.


\starttext

\startformula
\int_{0}^{1} g(x)\,\diff x = 1
\stopformula

\setupmathematics[integral=nolimits]

\startformula
\int_{0}^{1} g(x)\,\diff x = 1
\stopformula

\setupmathematics[integral=limits]

\startformula
\int_{0}^{1} g(x)\,\diff x = 1
\stopformula

\stoptext


Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Jeong Dal
Dear Otared,

All of your examples yield the same output in which the numbers locate at the 
top and at the bottom of the integral sign.
Is it what you expected? 
I am looking for a way to place numbers at the right of the integral sign under 
the \startformula … \stopformula environment as the output of 
$\displaystyle\int_1^4 …$.

I am using the latest beta.

mtx-context | run 1: luatex 
--fmt="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
 --jobname="test" 
--lua="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
 --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" 
--c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall 
"cont-yes.mkiv"
This is LuaTeX, Version 1.05.0 (TeX Live 2017) 
 system commands enabled.
open source > level 1, order 1, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2018.02.09 00:04 MKIV beta  fmt: 2018.2.11  
int: english/english
system  > 

Thank you.

Best regards,

Dalyoung

 

> 2018. 2. 12. 오전 2:18, ntg-context-requ...@ntg.nl 작성:
> 
> You are right regarding the unnatural way of using \autointegral. An easy way 
> to use the \autointegral command in a more natural way is to define one’s own 
> macro, as in the following:
> 
> \setupmathdelimiter[integral][rightoffset=-3mu,exact=yes,factor=2]
> 
> \unexpanded\def\myint#1#2#3#4{\autointegral{#2}{#1}{#3(#4)}\,\diff #4}
> 
> \starttext
> $\myint{1}{4}{f}{x}$
> 
> \startformula
> \myint{0}{2\pi}{\cos(t)^2\sin}{t} = 0
> \stopformula
> And here is the classical \type{\int} command:
> \startformula
> \int_{0}^{1} g(x)\,\diff x = 1.
> \stopformula
> \stoptext
> 
> Best regards: OK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Otared Kavian
Hi Dalyoung,

You are right regarding the unnatural way of using \autointegral. An easy way 
to use the \autointegral command in a more natural way is to define one’s own 
macro, as in the following:

\setupmathdelimiter[integral][rightoffset=-3mu,exact=yes,factor=2]

\unexpanded\def\myint#1#2#3#4{\autointegral{#2}{#1}{#3(#4)}\,\diff #4}

\starttext
$\myint{1}{4}{f}{x}$

\startformula
\myint{0}{2\pi}{\cos(t)^2\sin}{t} = 0
\stopformula
And here is the classical \type{\int} command:
\startformula
\int_{0}^{1} g(x)\,\diff x = 1.
\stopformula
\stoptext

Best regards: OK

> On 11 Feb 2018, at 15:20, Jeong Dal  wrote:
> 
> Dear Otared,
> 
> As you said, it is working well.
> 
> However, the numbers 1, 4 located at the top and the bottom of the integral 
> sign which is not usual in math. 
> I have seen a discussion about such an output, but I may not see the result 
> which I want.
> 
> As you see in the following example, only the 1st and the 2nd  gave the 
> output which is usual in math.
> Is still there no way to make nice output  using “\startformula”?
> 
> Thank you.
> 
> Best regards,
> 
> Dalyoung
> 
> %%
> \unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}
> 
> \starttext
> \math{\int_1^4 f(x) \diff x}
> 
> \math{\displaystyle \int_1^4 f(x) \diff x}
> 
> \startformula
> \int_1^4 f(x) \diff x
> \stopformula
> 
> \integ{4}{1}{f(x)}
> \stoptext
> 
> 
>> If you remove the line
>>  \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]  
>> then your example typesets well with the last beta version 2018.02.09 00:04.
>> 
>> Best regards: OK
>> 
>>> On 11 Feb 2018, at 09:35, Fabrice Couvreur  
>>> wrote:
>>> 
>>> Hi Hans,
>>> The macro that you proposed me worked very well but since my update of 
>>> context standalone, it does not work any more.
>>> Thank you.
>>> Fabrice
>>> 
>>> \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]  
>>> 
>>> \unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}
>>> 
>>> \starttext
>>> \integ{4}{1}{f(x)}
>>> \stoptext
>>> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Wolfgang Schuster



Fabrice Couvreur 
11. Februar 2018 um 09:35
Hi Hans,
The macro that you proposed me worked very well but since my update of 
context standalone, it does not work any more.

Thank you.
Fabrice

\setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]


\setupmathdelimiter[integral][rightoffset=-3mu,exact=yes,factor=2]

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Jeong Dal
Dear Otared,

As you said, it is working well.

However, the numbers 1, 4 located at the top and the bottom of the integral 
sign which is not usual in math. 
I have seen a discussion about such an output, but I may not see the result 
which I want.

As you see in the following example, only the 1st and the 2nd  gave the output 
which is usual in math.
Is still there no way to make nice output  using “\startformula”?

Thank you.

Best regards,

Dalyoung

%%
\unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}

\starttext
\math{\int_1^4 f(x) \diff x}

\math{\displaystyle \int_1^4 f(x) \diff x}

\startformula
\int_1^4 f(x) \diff x
\stopformula

\integ{4}{1}{f(x)}
\stoptext


> If you remove the line
>   \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]  
> then your example typesets well with the last beta version 2018.02.09 00:04.
> 
> Best regards: OK
> 
>> On 11 Feb 2018, at 09:35, Fabrice Couvreur  
>> wrote:
>> 
>> Hi Hans,
>> The macro that you proposed me worked very well but since my update of 
>> context standalone, it does not work any more.
>> Thank you.
>> Fabrice
>> 
>> \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]  
>> 
>> \unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}
>> 
>> \starttext
>> \integ{4}{1}{f(x)}
>> \stoptext
>> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Fabrice Couvreur
Hi Otared,
I also found that by removing this line, it worked. However, if Hans
proposed this macro, this line should have utility no ?
Fabrice

2018-02-11 10:01 GMT+01:00 Otared Kavian :

> Hi Fabrice,
>
> If you remove the line
> \setupmathextensible[integral][rightoffset=-3mu,exact=yes,
> factor=2]
> then your example typesets well with the last beta version 2018.02.09 00
> :04.
>
> Best regards: OK
>
> > On 11 Feb 2018, at 09:35, Fabrice Couvreur 
> wrote:
> >
> > Hi Hans,
> > The macro that you proposed me worked very well but since my update of
> context standalone, it does not work any more.
> > Thank you.
> > Fabrice
> >
> > \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]
> >
> > \unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}
> >
> > \starttext
> > \integ{4}{1}{f(x)}
> > \stoptext
> > 
> ___
> > If your question is of interest to others as well, please add an entry
> to the Wiki!
> >
> > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > 
> ___
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with a macro

2018-02-11 Thread Otared Kavian
Hi Fabrice,

If you remove the line
\setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]  
then your example typesets well with the last beta version 2018.02.09 00:04.

Best regards: OK

> On 11 Feb 2018, at 09:35, Fabrice Couvreur  
> wrote:
> 
> Hi Hans,
> The macro that you proposed me worked very well but since my update of 
> context standalone, it does not work any more.
> Thank you.
> Fabrice
> 
> \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]  
> 
> \unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}
> 
> \starttext
> \integ{4}{1}{f(x)}
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Problem with a macro

2018-02-11 Thread Fabrice Couvreur
Hi Hans,
The macro that you proposed me worked very well but since my update of
context standalone, it does not work any more.
Thank you.
Fabrice

\setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]

\unexpanded\def\integ#1#2#3{\math{\autointegral{#1}{#2}{#3}\diff x}}

\starttext
\integ{4}{1}{f(x)}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___