[NTG-context] Re: increase vertical between underbrace and equation
Hi, On Mon, Dec 18, 2023 at 6:57 PM Dean Hung wrote: > > Hi ConText friends, > > I am trying to increase the vertical distance between the underbrace and the > part of the equation above the underbrace. > > \startformula > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} > \stopformula > > I've tried using \blank and \vspace, but to no avail. For example: > > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} > ...does not work. > > The documentation on underbrace (and overbrace, underbracket, etc...) in the > ContextGarden wiki seems to be very limited, and I was not able to find any > user-supplied arguments for increasing this vertical distance. > > There are various solutions available for LaTex, and they require external > packages (e.g., BigStrut, vphantom) that redefine the strut height. > > I hope I'm missing something simple... Any help would be greatly appreciated! > > DY Hung One could enforce consistent spacing by doing (add \showstruts) \underbrace{x + y + z}_{\topstrut\mtext{my text here}} but it would perhaps make more sense to be able to do \underbrace[toptext=...,bottomtext=...]{x + y + z} with some mechanism that do not abuse the limits mechanism, or even to have some very general annotation mechanism, \mathannotation[toptext=...,bottomtext=...]{\underbrace{x + y + z}} So, can we please see some real examples of how this is supposed to be used? Best with some explanations on how and why the text below should be raised/lowered. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: increase vertical between underbrace and equation
Thank you, Wolfgang! On Mon, Dec 18, 2023 at 3:13 PM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Aditya Mahajan schrieb am 18.12.2023 um 21:55: > > On Mon, 18 Dec 2023, Aditya Mahajan wrote: > > > >> On Mon, 18 Dec 2023, Dean Hung wrote: > >> > >>> The documentation on underbrace (and overbrace, underbracket, etc...) > in > >>> the ContextGarden wiki seems to be very limited, and I was not able to > find > >>> any user-supplied arguments for increasing this vertical distance. > >>> > >>> There are various solutions available for LaTex, and they require > external > >>> packages (e.g., BigStrut, vphantom) that redefine the strut height. > >>> > >>> I hope I'm missing something simple... Any help would be greatly > >>> appreciated! > >> Hey, this is context. We don't need any packages for simple stuff: > >> > >> \startformula > >> \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}} > >> \stopformula > > Actually, realized that you want more distance in the other direction. > One option is to use \vrule. > > > > \underbrace{x+y+z}_{\vrule width 0pt height 1cm\relax\mathrm{my text > here}} > > > > You probably also want \text{...} instead of \mathrm{...}. > > \underbrace{x+y+z}_{\unframed[toffset=1cm]{my text here}} > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: increase vertical between underbrace and equation
Hi Aditya, Many thanks for the help! It works great! On Mon, Dec 18, 2023 at 2:41 PM Aditya Mahajan wrote: > On Mon, 18 Dec 2023, Dean Hung wrote: > > > Hi ConText friends, > > > > I am trying to increase the vertical distance between the underbrace and > > the part of the equation above the underbrace. > > > > \startformula > > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} > > \stopformula > > > > I've tried using \blank and \vspace, but to no avail. For example: > > > > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} > > ...does not work. > > > > The documentation on underbrace (and overbrace, underbracket, etc...) in > > the ContextGarden wiki seems to be very limited, and I was not able to > find > > any user-supplied arguments for increasing this vertical distance. > > > > There are various solutions available for LaTex, and they require > external > > packages (e.g., BigStrut, vphantom) that redefine the strut height. > > > > I hope I'm missing something simple... Any help would be greatly > > appreciated! > > Hey, this is context. We don't need any packages for simple stuff: > > \startformula > \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}} > \stopformula > > > Aditya > > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: increase vertical between underbrace and equation
Aditya Mahajan schrieb am 18.12.2023 um 21:55: On Mon, 18 Dec 2023, Aditya Mahajan wrote: On Mon, 18 Dec 2023, Dean Hung wrote: The documentation on underbrace (and overbrace, underbracket, etc...) in the ContextGarden wiki seems to be very limited, and I was not able to find any user-supplied arguments for increasing this vertical distance. There are various solutions available for LaTex, and they require external packages (e.g., BigStrut, vphantom) that redefine the strut height. I hope I'm missing something simple... Any help would be greatly appreciated! Hey, this is context. We don't need any packages for simple stuff: \startformula \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}} \stopformula Actually, realized that you want more distance in the other direction. One option is to use \vrule. \underbrace{x+y+z}_{\vrule width 0pt height 1cm\relax\mathrm{my text here}} You probably also want \text{...} instead of \mathrm{...}. \underbrace{x+y+z}_{\unframed[toffset=1cm]{my text here}} Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: increase vertical between underbrace and equation
On Mon, 18 Dec 2023, Aditya Mahajan wrote: > On Mon, 18 Dec 2023, Dean Hung wrote: > > > The documentation on underbrace (and overbrace, underbracket, etc...) in > > the ContextGarden wiki seems to be very limited, and I was not able to find > > any user-supplied arguments for increasing this vertical distance. > > > > There are various solutions available for LaTex, and they require external > > packages (e.g., BigStrut, vphantom) that redefine the strut height. > > > > I hope I'm missing something simple... Any help would be greatly > > appreciated! > > Hey, this is context. We don't need any packages for simple stuff: > > \startformula > \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}} > \stopformula Actually, realized that you want more distance in the other direction. One option is to use \vrule. \underbrace{x+y+z}_{\vrule width 0pt height 1cm\relax\mathrm{my text here}} You probably also want \text{...} instead of \mathrm{...}. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: increase vertical between underbrace and equation
On Mon, 18 Dec 2023, Dean Hung wrote: > Hi ConText friends, > > I am trying to increase the vertical distance between the underbrace and > the part of the equation above the underbrace. > > \startformula > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} > \stopformula > > I've tried using \blank and \vspace, but to no avail. For example: > > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} > ...does not work. > > The documentation on underbrace (and overbrace, underbracket, etc...) in > the ContextGarden wiki seems to be very limited, and I was not able to find > any user-supplied arguments for increasing this vertical distance. > > There are various solutions available for LaTex, and they require external > packages (e.g., BigStrut, vphantom) that redefine the strut height. > > I hope I'm missing something simple... Any help would be greatly > appreciated! Hey, this is context. We don't need any packages for simple stuff: \startformula \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}} \stopformula Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] increase vertical between underbrace and equation
Hi ConText friends, I am trying to increase the vertical distance between the underbrace and the part of the equation above the underbrace. \startformula \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} \stopformula I've tried using \blank and \vspace, but to no avail. For example: \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}} ...does not work. The documentation on underbrace (and overbrace, underbracket, etc...) in the ContextGarden wiki seems to be very limited, and I was not able to find any user-supplied arguments for increasing this vertical distance. There are various solutions available for LaTex, and they require external packages (e.g., BigStrut, vphantom) that redefine the strut height. I hope I'm missing something simple... Any help would be greatly appreciated! DY Hung ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why overbar is so big
Hi, On Sun, Aug 13, 2023 at 9:13 AM Xavier B. wrote: > > So, > > Finally is it a bug in MKIV? It seems you fix some kind of bug in your > messages. Is it true? > > > The output with Luametatex is correct but Luatex creates a raised bar > > (and different linebreaking). > > > > \showglyphs > > > > \startTEXpage[offset=1ex] > > \ruledhbox{$\overline{OA} = \overbar {OA} = 4.2$} > > \par > > \ruledhbox{$\underline {OA} = \underbar {OA} = 4.2$} > > \par > > \ruledhbox{$\widetilde {OA} = \widebar {OA} = 4.2$} > > \par > > \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$} > > \stopTEXpage > > > > I'll add a 'force fix in spite of extensible being present' in mkiv. In > > lmtx we always fix also because we drop in nicer shapes (watch the round > > tips in lm and fancy tips in antykwa) and concluded that fonts will > > remain as they are. > > > > Hans > > As you suggested, I will give a try to LMTX but be aware most user still use > MKIV until most distros upgrade the texlive version of context to LMTX. > > Regards, > Xavier One can also try to instead use the accent mechanism instead of a stacker: % engine=luatex \definemathtopaccent[widebar] ["0305] \startTEXpage[offset=3pt] $\overbar{OA}$ $\widebar{OA}$ \stopTEXpage The \widebar is defined (almost) like that in lmtx. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Why overbar is so big
On 8/13/2023 9:08 AM, Xavier B. wrote: So, Finally is it a bug in MKIV? It seems you fix some kind of bug in your messages. Is it true? Not really. It's a a bug in the fonts (that will stay if only for compaibility reasons). There is a catch in mkiv that compensates for it but only when characters are not there. So, for these two I now force the catch. In lmtx we have a bit different approach: we just assuem they are wrong in all fonts and fix them or replace them. We also have a more advanced math engine so we can control placement better. There are also 'font parameters' involved that can be bad (i guess that designers can't really test math font parameters). In lmtx we have more of them, beyond what opentype math provides. All of this is handled in goodie files. That mechanism is present in mkiv but no one ever bothered to spent time on it. That said: the last two years Mikeal and I spent a *lot* of time on math and we don't really look back at mkiv / mkii also because there is way more neat things now (most probably go unnoticed) ... you can read about it in some documents that come with context, articles in tugboat, and there are talks by Mikael at tug meetings on YT. The output with Luametatex is correct but Luatex creates a raised bar (and different linebreaking). \showglyphs \startTEXpage[offset=1ex] \ruledhbox{$\overline{OA} = \overbar {OA} = 4.2$} \par \ruledhbox{$\underline {OA} = \underbar {OA} = 4.2$} \par \ruledhbox{$\widetilde {OA} = \widebar {OA} = 4.2$} \par \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$} \stopTEXpage I'll add a 'force fix in spite of extensible being present' in mkiv. In lmtx we always fix also because we drop in nicer shapes (watch the round tips in lm and fancy tips in antykwa) and concluded that fonts will remain as they are. Hans As you suggested, I will give a try to LMTX but be aware most user still use MKIV until most distros upgrade the texlive version of context to LMTX. It's not that hard to install lmtx alongside. If distributions take from texlive then likely you also end up with files that are not needed (base package) and lack some fonts (esp math) by default. You'd also benefit from the last couple of years advancements. Keep in mind that for a long term tex (document) project a snapshot approach is healthy because you never know what a distribution adds / replaces (esp fonts can be a mess and you want to know what you use). 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Why overbar is so big
So, Finally is it a bug in MKIV? It seems you fix some kind of bug in your messages. Is it true? > The output with Luametatex is correct but Luatex creates a raised bar > (and different linebreaking). > > \showglyphs > > \startTEXpage[offset=1ex] > \ruledhbox{$\overline{OA} = \overbar {OA} = 4.2$} > \par > \ruledhbox{$\underline {OA} = \underbar {OA} = 4.2$} > \par > \ruledhbox{$\widetilde {OA} = \widebar {OA} = 4.2$} > \par > \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$} > \stopTEXpage > > I'll add a 'force fix in spite of extensible being present' in mkiv. In > lmtx we always fix also because we drop in nicer shapes (watch the round > tips in lm and fancy tips in antykwa) and concluded that fonts will > remain as they are. > > Hans As you suggested, I will give a try to LMTX but be aware most user still use MKIV until most distros upgrade the texlive version of context to LMTX. Regards, Xavier ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Why overbar is so big
On 8/12/2023 11:46 AM, Wolfgang Schuster wrote: Hans Hagen via ntg-context schrieb am 12.08.2023 um 11:13: On 8/12/2023 10:10 AM, Xavier B. wrote: The font is the default: \setupbodyfont [modern, 12pt] % modern o cmr, 11pt I use Linux (arch derivative). Looks ok here (see atached). Does the modern-math.lfg file have: AccentTopShiftUp = -60, FlattenedAccentTopShiftUp = -60, I assume it has the same lm math font as we use. Do you test with Luatex? Only when asked. The output with Luametatex is correct but Luatex creates a raised bar (and different linebreaking). \showglyphs \startTEXpage[offset=1ex] \ruledhbox{$\overline{OA} = \overbar {OA} = 4.2$} \par \ruledhbox{$\underline {OA} = \underbar {OA} = 4.2$} \par \ruledhbox{$\widetilde {OA} = \widebar {OA} = 4.2$} \par \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$} \stopTEXpage I'll add a 'force fix in spite of extensible being present' in mkiv. In lmtx we always fix also because we drop in nicer shapes (watch the round tips in lm and fancy tips in antykwa) and concluded that fonts will remain as they are. 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux
On Sun, Apr 02, 2023 at 10:41:53AM +0200, Hans Hagen via ntg-context wrote: > On 4/1/2023 11:21 PM, Carlos via ntg-context wrote: > > On Fri, Mar 31, 2023 at 10:22:49PM +0200, Hans Hagen via ntg-context wrote: > > > On 3/31/2023 10:08 PM, Carlos via ntg-context wrote: > > > > > > > > sure, why should it, you want lucida so better quit with an error than > > > > > kicking in some font; actually cmr math fonts have been obsoleted for > > > > > way > > > > > over a decade by latin modern math fonts in 32 bit font engines > > > > > > Font loading and processing time can be mosty neglected so these 16 > > > seconds > > > come from something else, maybe there are ways to trace file access. > > > Another > > > possibility is that your fonts are not cached in which case every run will > > > involve parsing the otf / ttf and producing whatever resources needed > > > (normally cached). > > > > interesting. Earlier as the output was showing > > > > > mkiv lua stats > loaded patterns: en::1, load time: 0.000 > > > mkiv lua stats > loaded fonts: 4 files: lucidabrightregular.otf, > > > lucidasansregular.otf, latinmodern-math.otf, lmroman10-regular.otf > > > > you asked > > > > > so why not use lucida math fonts? > > > > which is a valid question but nevertheless unsettling in that > > lmodern-regular may nat have been called out. I fully understand the > > inclusion of a latinmodern-math in it as a lucidamath was not previously > > available but I ponder at the idea and involuntary implementation of > > having lmroman along the pack. Why? If this is TeX doings, or misdoings > > (depending how one looks at it), it clearly shows to me that TeX also > > restricts my freedom to use whatever font I may deem necessary. Don't you > > think? You can probably disagree with me here, or anyone from the TeX > > community can, but the roman last was imposed deliberately upon. Someoe may > > also give a lengthy explanation but that would be just hogwash in thee very > > end . > > The fact that a file is loaded doesn't mean that it is used. In fact there > is some fallback loading going on because explaining when nothing gets > typeset or why \nullfont is used which results in missing chars messages is > a waste of time. > > It has nothing to do with restrictions: tex will load any font you want it. > But for instance when you turn on some tracing the macro package can load a > font it needs. Indirectly you get what you ask for. > You're right about that. My mistake. Somehow monospaced had been previously defined and I hadn't even noticed it . I think I got it (sort of) figured for what I want it so far. The latest stats are mkiv lua stats > loaded fonts: 5 files: latinmodern-math.otf, lucidabrightdemiitalic.otf, lucidabrightitalic.otf, lucidabrightregular.otf, lucidasansregular.otf mkiv lua stats > font engine: otf 3.133, afm 1.513, tfm 1.000, 17 instances, 10 shared in backend, 3 common vectors, 7 common hashes, load time 0.413 seconds mkiv lua stats > math tweaking time: 0.162 seconds, 24 math goodie tables which is pretty much what I was looking for, except the math font issue. Thank you! While I was trying to play with it a bit, I noticed a problem with the tfb and tfc resizing in math mode The only mention of anything similar happened back in 2009 (but then again this was with mkii). There may be more similar issues in the list. I just didn't have the time to look for it. https://www.mail-archive.com/ntg-context@ntg.nl/msg40224.html But anyhow, the following did the trick , which I found it convenient really. But I don't use math mode, although someone else might, it's intuitive, and does the job \startmidaligned $\tfc a + \overbracket{b + c} + \underbracket{d + e} + \doublebracket{f + g} + h$ \stopmidaligned \startformula \int_{\infty} \stopformula > I bet you didn't explicitly ask for e.g. english hyphentation patterns > either but still got them, but tex will happily let you use polish ones > instead. > > Of course the best remedy against any automatism is to just start with > initex and implement from scratch. > > In the above case: just add \type {foo} and you might see another font you > didn't ask for / set up. > > > > > I was actually thinking to ask you about that, and by falling back to > > > > cmr math font that perhaps would expedite loading time along the way. > > > > > > These fonts are small (only huge cjk fonts with tens of thousands of > > > glyphs > > > or fonts with hundreds of accumulated features
[NTG-context] Macro to write a vector with Metafun (again)
Hello Hans,The macro to draw a vector does not work even with the latest version of context standalone. Thank you Fabrice \useMPlibrary[mat] % will be in meta-imp-mat.mkiv \startMPextensions vardef math_stacker_arrow_shape = image ( drawarrow (OverlayWidth,OverlayOffset) -- (0,OverlayOffset) withcolor OverlayLineColor ; setbounds currentpicture to boundingbox currentpicture bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgraphic \startuniqueMPgraphic{math:stacker:\number"2192} math_stacker_draw(math_stacker_rightarrow_shape) ; \stopuniqueMPgraphic % so far \setupmathstackers [both] % vfenced] [color=darkred, alternative=mp] \setupmathstackers [top] [color=darkred, alternative=mp] \setupmathstackers [bottom] [color=darkred, alternative=mp] \starttext $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad \doublebracket{a+b+c+d}$ \blank $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad \doubleparent {a+b+c+d}$ \blank $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad \doublebrace {a+b+c+d}$ \blank $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad \doublebar{a+b+c+d}$ \blank $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank \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] Fwd: Macro to write a vector (Metafun) is broken
Hi Hans, No, I did not check this file but only update context Standalone. I guess this is not enough since the compilation does not work. Thank you Fabrice Running `ConTeXt Full' on `ntg80' with ``context --purgeall --nonstop ntg80.tex'' resolvers | trees | analyzing 'home:texmf' mtx-context | run 1: luatex --fmt="/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --interaction="nonstopmode" --jobname="ntg80" --lua="/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./ntg80.tex" --c:input="./ntg80.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:nonstopmode --c:purgeall "cont-yes.mkiv" This is LuaTeX, Version 1.07.0 (TeX Live 2018) system commands enabled. resolvers > trees > analyzing 'home:texmf' open source > level 1, order 1, name '/home/fab/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.03.16 22:20 MKIV beta fmt: 2018.3.20 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/home/fab/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' close source> level 2, order 2, name '/home/fab/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'ntg80', input './ntg80', result 'ntg80' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/home/fab/ntg80.tex' metapost> library 'mat' is loaded open source > level 3, order 4, name '/home/fab/context/tex/texmf-context/tex/context/base/mkiv/meta-imp-mat.mkiv' close source> level 3, order 4, name '/home/fab/context/tex/texmf-context/tex/context/base/mkiv/meta-imp-mat.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun' using format 'metafun' metapost> loading 'metafun' as '/home/fab/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost> initializing number mode 'scaled' tex error > mp error on line 61 in file /home/fab/ntg80.tex: >> math_stacker_draw ! Isolated expression. ( <*> math_stacker_draw( math_stacker_leftarrow_shape) ; ; I couldn't find an `=' or `:=' after the expression that is shown above this error message, so I guess I'll just ignore it and carry on. ! Extra tokens will be flushed. ( <*> math_stacker_draw( math_stacker_leftarrow_shape) ; ; I've just read as much of that statement as I could fathom, so a semicolon should have been next. It's very puzzling... but I'll try to get myself back together, by ignoring everything up to the next `;'. Please insert a semicolon now in front of anything that you don't want me to delete. (See Chapter 27 of The METAFONTbook for an example.) [1] 51 52 $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad 53 \doublebracket{a+b+c+d}$ \blank 54 $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad 55 \doubleparent {a+b+c+d}$ \blank 56 $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad 57 \doublebrace {a+b+c+d}$ \blank 58 $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad 59 \doublebar{a+b+c+d}$ \blank 60 61 >> $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank 62 $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank 63 64 \stoptext metapost> error: unknown, no error, terminal or log messages tex error > mp error on line 3 in file /home/fab/ntg80.tex: >> math_stacker_draw ! Isolated expression. ( <*> math_stacker_draw( math_stacker_leftarrow_shape) ; ; I couldn't find an `=' or `:=' after the expression that is shown above this error message, so I guess I'll just ignore it and carry on. ! Extra tokens will be flushed. ( <*> math_stacker_draw( math_stacker_leftarrow_shape) ; ; I've just read as much of that statement as I could fathom, so a semicolon should have been next. It's very puzzling... but I'll try to get myself back together, by ignoring everything up to the next `;'. Please insert a semicolon now in front of anything that you don't want me to delete. (See Chapter 27 of The METAFONTbook for an example.) [1] 1 2 \useMPlibrary[mat] 3 >> 4 % will be in meta-imp-mat.mkiv 5 6 \startMPextensions 7 vardef math_stacker_arrow_shape = 8 image ( 9 drawarrow 10 (OverlayWidth,OverlayOffset) -- (0,Over
Re: [NTG-context] Fwd: Macro to write a vector (Metafun) is broken
-- Forwarded message -- From: Fabrice Couvreur <fabrice1.couvr...@gmail.com> Date: Tue, Mar 20, 2018 at 4:29 PM Subject: [NTG-context] Macro to write a vector (Metafun) is broken To: mailing list for ConTeXt users <ntg-context@ntg.nl> Hello Hans, The macro you wrote to draw the arrows of the vectors does not seem to work anymore. Thank you Fabrice Did you check ou tthe latest meta-imp file? Alan and I added more and also changed the interface a little which might have consequences. \useMPlibrary[mat] % will be in meta-imp-mat.mkiv \startMPextensions vardef math_stacker_arrow_shape = image ( drawarrow (OverlayWidth,OverlayOffset) -- (0,OverlayOffset) withcolor OverlayLineColor ; setbounds currentpicture to boundingbox currentpicture bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgraphic \startuniqueMPgraphic{math:stacker:\number"2192} math_stacker_draw(math_stacker_rightarrow_shape) ; \stopuniqueMPgraphic % so far \setupmathstackers [both] % vfenced] [color=darkred, alternative=mp] \setupmathstackers [top] [color=darkred, alternative=mp] \setupmathstackers [bottom] [color=darkred, alternative=mp] \starttext $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad \doublebracket{a+b+c+d}$ \blank $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad \doubleparent {a+b+c+d}$ \blank $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad \doublebrace {a+b+c+d}$ \blank $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad \doublebar{a+b+c+d}$ \blank $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank \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 ___ -- - 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 ___
[NTG-context] Macro to write a vector (Metafun) is broken
Hello Hans, The macro you wrote to draw the arrows of the vectors does not seem to work anymore. Thank you Fabrice \useMPlibrary[mat] % will be in meta-imp-mat.mkiv \startMPextensions vardef math_stacker_arrow_shape = image ( drawarrow (OverlayWidth,OverlayOffset) -- (0,OverlayOffset) withcolor OverlayLineColor ; setbounds currentpicture to boundingbox currentpicture bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgraphic \startuniqueMPgraphic{math:stacker:\number"2192} math_stacker_draw(math_stacker_rightarrow_shape) ; \stopuniqueMPgraphic % so far \setupmathstackers [both] % vfenced] [color=darkred, alternative=mp] \setupmathstackers [top] [color=darkred, alternative=mp] \setupmathstackers [bottom] [color=darkred, alternative=mp] \starttext $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad \doublebracket{a+b+c+d}$ \blank $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad \doubleparent {a+b+c+d}$ \blank $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad \doublebrace {a+b+c+d}$ \blank $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad \doublebar{a+b+c+d}$ \blank $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank \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] Package esvect and Context
It's ok. Thanks, Fabrice 2016-06-15 14:58 GMT+02:00 Wolfgang Schuster <schuster.wolfg...@gmail.com>: > Fabrice Couvreur <fabrice1.couvr...@gmail.com> > 15. Juni 2016 um 14:48 > Hi Wolfgang, > what directory I put this file knowing that I installed the standalone > version in /home/fab/context > Fabrice > > The commend was meant for Hans, all *you* have to do is update your TeX > installation, afterwards you can try the following example: > > \useMPlibrary[mat] > > \setupmathstackers > [both] > [color=darkred, >alternative=mp] > > \setupmathstackers > [top] > [color=darkred, >alternative=mp] > > \setupmathstackers > [bottom] > [color=darkred, >alternative=mp] > > \starttext > > $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad > \doublebracket{a+b+c+d}$ \blank > $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad > \doubleparent {a+b+c+d}$ \blank > $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad > \doublebrace {a+b+c+d}$ \blank > $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad > \doublebar{a+b+c+d}$ \blank > > $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank > $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank > > \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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Package esvect and Context
Fabrice Couvreur <mailto:fabrice1.couvr...@gmail.com> 15. Juni 2016 um 14:48 Hi Wolfgang, what directory I put this file knowing that I installed the standalone version in /home/fab/context Fabrice The commend was meant for Hans, all *you* have to do is update your TeX installation, afterwards you can try the following example: \useMPlibrary[mat] \setupmathstackers [both] [color=darkred, alternative=mp] \setupmathstackers [top] [color=darkred, alternative=mp] \setupmathstackers [bottom] [color=darkred, alternative=mp] \starttext $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad \doublebracket{a+b+c+d}$ \blank $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad \doubleparent {a+b+c+d}$ \blank $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad \doublebrace {a+b+c+d}$ \blank $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad \doublebar{a+b+c+d}$ \blank $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Package esvect and Context
lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf mkiv lua stats > font engine: otf 3.022, afm 1.512, tfm 1.000, 4 instances, load time 0.149 seconds mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > luatex banner: this is luatex, version 0.95.0 (tex live 2016) mkiv lua stats > control sequences: 43841 of 65536 + 10 mkiv lua stats > lua properties: engine: lua, used memory: 59 MB (ctx: 58 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.551 seconds, 1 processed pages, 1 shipped pages, 1.815 pages/second system | total runtime: 0.784 seconds Thanks, Fabrice 2016-06-06 22:50 GMT+02:00 Hans Hagen <pra...@wxs.nl>: > On 6/6/2016 9:39 PM, Fabrice Couvreur wrote: > >> Hi Joseph, >> This is already the command I used, but I think the point of the too >> small arrow. >> > > If you really want to go over the top: > > \useMPlibrary[mat] > > % will be in meta-imp-mat.mkiv > > \startMPextensions > vardef math_stacker_arrow_shape = > image ( > drawarrow > (OverlayWidth,OverlayOffset) -- (0,OverlayOffset) > withcolor > OverlayLineColor ; > setbounds currentpicture to boundingbox currentpicture > bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ; > ) > enddef ; > vardef math_stacker_leftarrow_shape = > math_stacker_arrow_shape > enddef ; > vardef math_stacker_rightarrow_shape = > math_stacker_arrow_shape rotated 180 > enddef ; > \stopMPextensions > > \startuniqueMPgraphic{math:stacker:\number"2190} > math_stacker_draw(math_stacker_leftarrow_shape) ; > \stopuniqueMPgraphic > > \startuniqueMPgraphic{math:stacker:\number"2192} > math_stacker_draw(math_stacker_rightarrow_shape) ; > \stopuniqueMPgraphic > > % so far > > \setupmathstackers > [both] % vfenced] > [color=darkred, >alternative=mp] > > \setupmathstackers > [top] > [color=darkred, >alternative=mp] > > \setupmathstackers > [bottom] > [color=darkred, >alternative=mp] > > \starttext > > $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad > \doublebracket{a+b+c+d}$ \blank > $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad > \doubleparent {a+b+c+d}$ \blank > $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad > \doublebrace {a+b+c+d}$ \blank > $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad > \doublebar{a+b+c+d}$ \blank > > $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank > $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank > > \stoptext > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Package esvect and Context
On 6/6/2016 9:39 PM, Fabrice Couvreur wrote: Hi Joseph, This is already the command I used, but I think the point of the too small arrow. If you really want to go over the top: \useMPlibrary[mat] % will be in meta-imp-mat.mkiv \startMPextensions vardef math_stacker_arrow_shape = image ( drawarrow (OverlayWidth,OverlayOffset) -- (0,OverlayOffset) withcolor OverlayLineColor ; setbounds currentpicture to boundingbox currentpicture bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgraphic \startuniqueMPgraphic{math:stacker:\number"2192} math_stacker_draw(math_stacker_rightarrow_shape) ; \stopuniqueMPgraphic % so far \setupmathstackers [both] % vfenced] [color=darkred, alternative=mp] \setupmathstackers [top] [color=darkred, alternative=mp] \setupmathstackers [bottom] [color=darkred, alternative=mp] \starttext $\overbracket {a+b+c+d} \quad \underbracket{a+b+c+d} \quad \doublebracket{a+b+c+d}$ \blank $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad \doubleparent {a+b+c+d}$ \blank $\overbrace {a+b+c+d} \quad \underbrace {a+b+c+d} \quad \doublebrace {a+b+c+d}$ \blank $\overbar {a+b+c+d} \quad \underbar{a+b+c+d} \quad \doublebar{a+b+c+d}$ \blank $\overleftarrow {a+b+c+d} \quad \overrightarrow {a+b+c+d} $ \blank $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] underbraces slightly too narrow (with MkIV 2013.05.28)
On 7/10/2013 2:02 PM, Sanjoy Mahajan wrote: In certain cases, display-mathunderbraces are not quite wide enough. Here's a minimal example: === \starttext \placeformula\startformula \underbrace{15\,\tf cm}_{L} \stopformula \stoptext === Using 2013.05.28 00:36 MKIV (from vanilla TL2013), the left brace tip starts under the vertical bar of the 1, instead of enclosing the serif as well. The right brace tip ends between the last two tines of the m, instead of enclosing the whole m and its serifs. With 2013.04.09 10:38 MKII, the brace tips extend just slightly beyond the 15 cm, which is better. However, they seem slightly too close. As a test, I ran the comparable plain-TeX file through LuaTeX and PDFTeX. == $$ \underbrace{15\,\rm cm}_{L} $$ \bye == The gap between the right brace tip and the text is slightly greater (with either LuaTeX or PDFTeX), and it looks right. (With the 2012.05.30 MKIV on live.contextgarden.net, the result is similar to the Lua/PDFTeX versions, though not identical, and also looks reasonable.) it has to do with the fact that we have opentype math fonts now and these are not compatible what you observe is the fact that we have a discrete number of sizes till we run out of them and go stretchable anyhow, i've now defined then in a different way (ok, some more trickery had to be applied as it's one of these aspects of open type math that still inherits old stuff) so in a next version you can do this: \setupmathstackers[vfenced][hoffset=10pt] is it looks like these commands have built-in \limits, these are now set for \overbrace \overparent \overbracket \overbar \underbrace \underparent \underbracket \underbar \doublebrace \doubleparent \doublebracket \doublebar Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___