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
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 -----------------------------------------------------------------
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
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:
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
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:
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
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 ___________________________________________________________________________________
participants (3)
-
Aditya Mahajan
-
context@vivaldi.net
-
Hans Hagen