Hi Hans, Thanks a lot for that! I confirm that these methods, along with the change in mlib-fnt.lmt you suggested, work perfectly.
Cheers, Florent Le jeu. 20 févr. 2025 à 08:42, Hans Hagen <j.ha...@xs4all.nl> a écrit : > On 2/19/2025 10:23 PM, Florent Michel wrote: > > Hi, > > When experimenting with outlinetext, I found it generally works well for > > both text and equations but seems to fail for fractions or square roots. > > The code below demonstrates the issue: > > ____________________________ > > \startMPpage > > draw outlinetext("$\frac{1}{\sqrt{2}}$"); > > \stopMPpage > > ____________________________ > > > > The ‘1’ and ‘2’ seem to be at the right positions, but the fraction bar > > and horizontal part of the radical are missing. > > Is there a different fonction I should use for getting the outlines of > > equations? > > In order to get rules you need this: > > \setupmathfractions[rule=yes] > \setupmathradical [rule=yes] > > I suppose this is something we can hook in automatically so we need to > discuss that in the cms. > > You can also do this: > > \disabledirectives [math.extensibles] > > In both cases there is a too large radical symbol so this fix is needed > in mlib-fnt.lmt (line 399): > > local s = 1000 > local sx = 1000 > local sy = 1000 > > After that it should be ok. I need to check the directive but might as > well just leave that as 'not worth the trouble' because going into an > assembled glyph is no fun. > > \starttext > > \startMPpage > draw lmt_outline [ > text = "$\frac{1}{\sqrt{2}}$" > ] ; > \stopMPpage > > \startTEXpage > $\frac{1}{\sqrt{2}}$ > \stopTEXpage > > \stoptext > > > > ----------------------------------------------------------------- > 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://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 ___________________________________________________________________________________