* Placing number in \sqrt
@ 2020-05-04 6:47 context
2020-05-04 7:31 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: context @ 2020-05-04 6:47 UTC (permalink / raw)
To: ConTeXt
[-- Attachment #1: Type: text/plain, Size: 626 bytes --]
Hello,
compare placing "3" in the following examples:
----
\starttext
$\sqrt[3]{5}$ % (1)
\par
$\sqrt[3~]{5}$ % (2)
\stoptext
----
In the first case, the "3" is placed naturally by ConTeXt and placed
more in the centre of "V" part of the square sign.
In the second example, the "3" is shifted manually by adding "~" and the
final placement seems to me a bit better.
What is your opinion - is the case (1) OK/intended and user should avoid
any manual shifting?
Or manual shifting is OK? Or is there a way to affect this placement
globally in ConTeXt, e.g. setting an internal variable?
Best regards,
Lukas
[-- Attachment #2: Sqrt.mkiv --]
[-- Type: text/plain, Size: 66 bytes --]
\starttext
$\sqrt[3]{5}$
\par
$\sqrt[3~]{5}$
\stoptext
[-- Attachment #3: Sqrt.pdf --]
[-- Type: application/pdf, Size: 8007 bytes --]
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Placing number in \sqrt
2020-05-04 6:47 Placing number in \sqrt context
@ 2020-05-04 7:31 ` Hans Hagen
2020-05-04 8:42 ` Aditya Mahajan
2020-05-04 11:08 ` context
0 siblings, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2020-05-04 7:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 5/4/2020 8:47 AM, context@vivaldi.net wrote:
> Hello,
>
> compare placing "3" in the following examples:
>
> ----
> \starttext
> $\sqrt[3]{5}$ % (1)
> \par
> $\sqrt[3~]{5}$ % (2)
> \stoptext
> ----
>
> In the first case, the "3" is placed naturally by ConTeXt and placed
> more in the centre of "V" part of the square sign.
>
> In the second example, the "3" is shifted manually by adding "~" and the
> final placement seems to me a bit better.
>
> What is your opinion - is the case (1) OK/intended and user should avoid
> any manual shifting?
>
> Or manual shifting is OK? Or is there a way to affect this placement
> globally in ConTeXt, e.g. setting an internal variable?
The placement is driven by the font so kind of part of the design. There
is a whole bunch of parameters that drives placement and there is one
that deals with the spacing after the degree. Here are some examples.
\starttext
\def\R {\Umathradicaldegreeafter\textstyle0pt}
\def\RR{\Umathradicaldegreeafter\textstyle\dimexpr
\Umathradicaldegreeafter\textstyle+.1em\relax}
\def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr
\Umathradicaldegreeafter\textstyle+.2em\relax}
$ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
$ \sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
$ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
{\R $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par
{\RR $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par
{\RRR$\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par
\stoptext
Changing these parameters inside math is kind of pseudo global: the
value at the end of the first pass is used for the whole formula.
However, in lmtx you can cheat by using the \frozen prefix to make it
behave local.
If we can come up with a proper name for a parameter we can make it a
setting. One of these things that Aditya and I will to discuss when we
have time and are in math mood. (There is much more in math we could
control if needed, but often in the end that control is not that much
needed at all.)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Placing number in \sqrt
2020-05-04 7:31 ` Hans Hagen
@ 2020-05-04 8:42 ` Aditya Mahajan
2020-05-04 11:12 ` context
2020-05-04 11:08 ` context
1 sibling, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2020-05-04 8:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
On Mon, 4 May 2020, Hans Hagen wrote:
> On 5/4/2020 8:47 AM, context@vivaldi.net wrote:
>> Hello,
>>
>> compare placing "3" in the following examples:
>>
>> ----
>> \starttext
>> $\sqrt[3]{5}$ % (1)
>> \par
>> $\sqrt[3~]{5}$ % (2)
>> \stoptext
>> ----
>>
>> In the first case, the "3" is placed naturally by ConTeXt and placed
>> more in the centre of "V" part of the square sign.
>>
>> In the second example, the "3" is shifted manually by adding "~" and the
>> final placement seems to me a bit better.
>>
>> What is your opinion - is the case (1) OK/intended and user should avoid
>> any manual shifting?
>>
>> Or manual shifting is OK? Or is there a way to affect this placement
>> globally in ConTeXt, e.g. setting an internal variable?
>
> If we can come up with a proper name for a parameter we can make it a
> setting. One of these things that Aditya and I will to discuss when we
> have time and are in math mood. (There is much more in math we could
> control if needed, but often in the end that control is not that much
> needed at all.)
As an example, see this question about customized square root signed which was asked on TeX.SE a few years ago:
https://tex.stackexchange.com/a/406680/323
Aditya
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Placing number in \sqrt
2020-05-04 7:31 ` Hans Hagen
2020-05-04 8:42 ` Aditya Mahajan
@ 2020-05-04 11:08 ` context
1 sibling, 0 replies; 6+ messages in thread
From: context @ 2020-05-04 11:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello Hans,
On 2020-05-04 09:31, Hans Hagen wrote:
> On 5/4/2020 8:47 AM, context@vivaldi.net wrote:
>> Hello,
>>
>> compare placing "3" in the following examples:
>>
>> ----
>> \starttext
>> $\sqrt[3]{5}$ % (1)
>> \par
>> $\sqrt[3~]{5}$ % (2)
>> \stoptext
>> ----
>>
>> In the first case, the "3" is placed naturally by ConTeXt and placed
>> more in the centre of "V" part of the square sign.
>>
>> In the second example, the "3" is shifted manually by adding "~" and
>> the final placement seems to me a bit better.
>>
>> What is your opinion - is the case (1) OK/intended and user should
>> avoid any manual shifting?
>>
>> Or manual shifting is OK? Or is there a way to affect this placement
>> globally in ConTeXt, e.g. setting an internal variable?
>
> The placement is driven by the font so kind of part of the design.
> There is a whole bunch of parameters that drives placement and there
> is one that deals with the spacing after the degree. Here are some
> examples.
>
> \starttext
>
> \def\R {\Umathradicaldegreeafter\textstyle0pt}
> \def\RR{\Umathradicaldegreeafter\textstyle\dimexpr
> \Umathradicaldegreeafter\textstyle+.1em\relax}
> \def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr
> \Umathradicaldegreeafter\textstyle+.2em\relax}
>
> $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
> $ \sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
> $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
>
> {\R $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par
> {\RR $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par
> {\RRR$\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par
>
> \stoptext
>
> Changing these parameters inside math is kind of pseudo global: the
> value at the end of the first pass is used for the whole formula.
> However, in lmtx you can cheat by using the \frozen prefix to make it
> behave local.
>
> If we can come up with a proper name for a parameter we can make it a
> setting. One of these things that Aditya and I will to discuss when we
> have time and are in math mood. (There is much more in math we could
> control if needed, but often in the end that control is not that much
> needed at all.)
this helps me, thank you.
Best regards,
Lukas
> Hans
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Placing number in \sqrt
2020-05-04 8:42 ` Aditya Mahajan
@ 2020-05-04 11:12 ` context
2020-05-04 17:02 ` Aditya Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: context @ 2020-05-04 11:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello Aditya,
On 2020-05-04 10:42, Aditya Mahajan wrote:
> On Mon, 4 May 2020, Hans Hagen wrote:
>
>> On 5/4/2020 8:47 AM, context@vivaldi.net wrote:
>>> Hello,
>>>
>>> compare placing "3" in the following examples:
>>>
>>> ----
>>> \starttext
>>> $\sqrt[3]{5}$ % (1)
>>> \par
>>> $\sqrt[3~]{5}$ % (2)
>>> \stoptext
>>> ----
>>>
>>> In the first case, the "3" is placed naturally by ConTeXt and placed
>>> more in the centre of "V" part of the square sign.
>>>
>>> In the second example, the "3" is shifted manually by adding "~" and
>>> the final placement seems to me a bit better.
>>>
>>> What is your opinion - is the case (1) OK/intended and user should
>>> avoid any manual shifting?
>>>
>>> Or manual shifting is OK? Or is there a way to affect this placement
>>> globally in ConTeXt, e.g. setting an internal variable?
>>
>> If we can come up with a proper name for a parameter we can make it a
>> setting. One of these things that Aditya and I will to discuss when we
>> have time and are in math mood. (There is much more in math we could
>> control if needed, but often in the end that control is not that much
>> needed at all.)
>
> As an example, see this question about customized square root signed
> which was asked on TeX.SE a few years ago:
>
> https://tex.stackexchange.com/a/406680/323
I tried the code from the link above, but:
- I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic
-> \startuniqueMPgraphic and some others,
- there is still an error I'm not able to fix (see attachements).
Maybe your code is intented for Ctx LMTX, whilst I'm still working with
Ctx MkIV (which uses Lua 5.3; AFAIK, Lua 5.4 exists just in RC
versions).
But thank you anyway.
Best regards,
Lukas
> Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Placing number in \sqrt
2020-05-04 11:12 ` context
@ 2020-05-04 17:02 ` Aditya Mahajan
0 siblings, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2020-05-04 17:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]
On Mon, 4 May 2020, context@vivaldi.net wrote:
> Hello Aditya,
>
> On 2020-05-04 10:42, Aditya Mahajan wrote:
>> On Mon, 4 May 2020, Hans Hagen wrote:
>>
>>> On 5/4/2020 8:47 AM, context@vivaldi.net wrote:
>>>> Hello,
>>>>
>>>> compare placing "3" in the following examples:
>>>>
>>>> ----
>>>> \starttext
>>>> $\sqrt[3]{5}$ % (1)
>>>> \par
>>>> $\sqrt[3~]{5}$ % (2)
>>>> \stoptext
>>>> ----
>>>>
>>>> In the first case, the "3" is placed naturally by ConTeXt and placed
>>>> more in the centre of "V" part of the square sign.
>>>>
>>>> In the second example, the "3" is shifted manually by adding "~" and
>>>> the final placement seems to me a bit better.
>>>>
>>>> What is your opinion - is the case (1) OK/intended and user should
>>>> avoid any manual shifting?
>>>>
>>>> Or manual shifting is OK? Or is there a way to affect this placement
>>>> globally in ConTeXt, e.g. setting an internal variable?
>>>
>>> If we can come up with a proper name for a parameter we can make it a
>>> setting. One of these things that Aditya and I will to discuss when we
>>> have time and are in math mood. (There is much more in math we could
>>> control if needed, but often in the end that control is not that much
>>> needed at all.)
>>
>> As an example, see this question about customized square root signed
>> which was asked on TeX.SE a few years ago:
>>
>> https://tex.stackexchange.com/a/406680/323
>
> I tried the code from the link above, but:
>
> - I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic
> -> \startuniqueMPgraphic and some others,
>
> - there is still an error I'm not able to fix (see attachements).
I'll look into that..
> Maybe your code is intented for Ctx LMTX, whilst I'm still working with
> Ctx MkIV (which uses Lua 5.3; AFAIK, Lua 5.4 exists just in RC
> versions).
No. This feature works with MkIV as well. I posted that code in 2017, much before LTMX was released. The feature is much older than 2017, IIRC. Similar interfaces exist for delimiters, accents, and other artifact.
Aditya
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-04 17:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 6:47 Placing number in \sqrt context
2020-05-04 7:31 ` Hans Hagen
2020-05-04 8:42 ` Aditya Mahajan
2020-05-04 11:12 ` context
2020-05-04 17:02 ` Aditya Mahajan
2020-05-04 11:08 ` context
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).