* Ignored spacings are ignored @ 2020-03-17 9:08 Henri Menke 2020-03-17 13:54 ` Hans Hagen 0 siblings, 1 reply; 4+ messages in thread From: Henri Menke @ 2020-03-17 9:08 UTC (permalink / raw) To: ntg-context Dear list, Sorry for the stupid title, I couldn't resist. :-) LuaTeX has the option to adjust spacing between different classes of math atoms. However, looking in the TeXbook, page 170, in the table for spacings between adjacent atoms, we find that some of those spacing are undefined (* in the table) and therefore, when TeX encounters this combination, spacing is just skipped. This also translates to the parameters in LuaTeX. For example the combination Open-Bin is skipped by TeX and therefore setting the corresponding parameter just does nothing. \Umathordrelspacing\textstyle=50mu \Umathopenbinspacing\textstyle=50mu $a = (-2)$ \bye So my question is, what is the point of the parameters that describe these skipped combinations? Shouldn't they just be deleted? Alternatively, they could actually be implemented to do something. More context: https://tex.stackexchange.com/questions/532758 Kind regards, Henri ___________________________________________________________________________________ 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] 4+ messages in thread
* Re: Ignored spacings are ignored 2020-03-17 9:08 Ignored spacings are ignored Henri Menke @ 2020-03-17 13:54 ` Hans Hagen 2020-03-17 15:52 ` Hans Hagen 0 siblings, 1 reply; 4+ messages in thread From: Hans Hagen @ 2020-03-17 13:54 UTC (permalink / raw) To: ntg-context On 3/17/2020 10:08 AM, Henri Menke wrote: > Dear list, > > Sorry for the stupid title, I couldn't resist. :-) > > LuaTeX has the option to adjust spacing between different classes of > math atoms. However, looking in the TeXbook, page 170, in the table for > spacings between adjacent atoms, we find that some of those spacing are > undefined (* in the table) and therefore, when TeX encounters this > combination, spacing is just skipped. > > This also translates to the parameters in LuaTeX. For example the > combination Open-Bin is skipped by TeX and therefore setting the > corresponding parameter just does nothing. > > \Umathordrelspacing\textstyle=50mu > \Umathopenbinspacing\textstyle=50mu > $a = (-2)$ > \bye > > So my question is, what is the point of the parameters that describe > these skipped combinations? Shouldn't they just be deleted? > Alternatively, they could actually be implemented to do something. When that system was set up we decided to keep these 'unused slots' becauseit makes the code nicer and also prevents errors in case one decided to implement some matrix like approach to settings. Making the engine bark on them would be comparable silly as having the empty slots that we now have in some unicode math alphabets (which forces all programs that do something with them to deal with the exceptions). Anyway, these parameters have their limitations anyway. Say that we have this: \def\whatevera {\Umathordrelspacing \textstyle=50mu \Umathopenbinspacing\textstyle=50mu} \def\whateverb {\Umathordrelspacing \textstyle=25mu \Umathopenbinspacing\textstyle=25mu} $\whatevera a = (-2)$ $\whateverb a = (-2)$ $ {\whatevera a = (-2)}\quad {\whateverb a = (-2)}\quad {\whatevera a = (-2)} $ I presume that you can predict what you get given your question. Now, to come to your question / remark, it is trivial to introduce a parameters, say \mathspacingmode, that obeys these spacing options (apart from possible weird side effects) but they are global. However, in luametatex we can do this: \def\whatevera {\frozen\Umathordrelspacing \textstyle=50mu \frozen\Umathopenbinspacing\textstyle=50mu} \def\whateverb {\frozen\Umathordrelspacing \textstyle=25mu \frozen\Umathopenbinspacing\textstyle=25mu} $\whatevera a = (-2)$ $\whateverb a = (-2)$ $ {\whatevera a = (-2)}\quad {\whateverb a = (-2)}\quad {\whatevera a = (-2)} $ Read: we can save the state of parameters. So, as a quick and dirty experiment I added a feature that controls the spacing, think of: $ {\whatevera a = ( -2)}\quad {\whateverb\frozen\Umathspacingmode\textstyle1 a = (-2)}\quad {\whatevera\frozen\Umathspacingmode\textstyle1 a = (-2)} $ But ... the mentioned \frozen parameter feature is experimental and awaiting decisions / comments / suggestions of usefullness by Aditya, who has no time, so no hurry with that. After all, given the always acclaimed perfect math in tex (okay, according to some persistent naratives, context can't do math) all such extensions are debatable anyway. One tricky part of these spacing issues is that these get applied selectively based on what goes left or right as well as circumstances. There's always the danger of 'fixing' this and a while later 'getting complains about some edge case that fails'. Which (I think) is why tex plays safe and assumes an occasional injected user space. There are a few more edge cases with spacing but for now I leave these to your imagination. 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] 4+ messages in thread
* Re: Ignored spacings are ignored 2020-03-17 13:54 ` Hans Hagen @ 2020-03-17 15:52 ` Hans Hagen 2020-03-18 22:13 ` Henri Menke 0 siblings, 1 reply; 4+ messages in thread From: Hans Hagen @ 2020-03-17 15:52 UTC (permalink / raw) To: ntg-context [-- Attachment #1: Type: text/plain, Size: 463 bytes --] Hi, I forgot to add an example (the \Umathspacingmode will be in the next lmtx upload, but I'm not sure when that is). 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 ----------------------------------------------------------------- [-- Attachment #2: todo-spacing.pdf --] [-- Type: application/pdf, Size: 19869 bytes --] [-- Attachment #3: 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] 4+ messages in thread
* Re: Ignored spacings are ignored 2020-03-17 15:52 ` Hans Hagen @ 2020-03-18 22:13 ` Henri Menke 0 siblings, 0 replies; 4+ messages in thread From: Henri Menke @ 2020-03-18 22:13 UTC (permalink / raw) To: ntg-context Dear Hans, Thank you for the examples. Usually glue is only set at the end of a list and the last active glue will be used, so the \frozen mechanism is a bit confusing maybe. Anyway, is there an ETA for the release of the luametatex source? I'd really like to see how \frozen is implemented. Kind regards, Henri On 17/03/20, 16:52, Hans Hagen wrote: > Hi, > > I forgot to add an example (the \Umathspacingmode will be in the next lmtx > upload, but I'm not sure when that is). > > 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] 4+ messages in thread
end of thread, other threads:[~2020-03-18 22:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-03-17 9:08 Ignored spacings are ignored Henri Menke 2020-03-17 13:54 ` Hans Hagen 2020-03-17 15:52 ` Hans Hagen 2020-03-18 22:13 ` Henri Menke
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).