Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Taco Hoekwater
> On 15 Mar 2020, at 11:22, Gerben Wierda wrote: > > I would like a vardef macro to return the pair of a picture and a bounding > box. I don't want to use the setbound operator, because as soon as I do that, > I cannot access the components of the picture anymore with pathpart. > > I found

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Gerben Wierda
Hola! So, the arguments passed to macros are by reference and not by value? I could have known of course, they are simple expansions, but I’d like to be sure. IfI assign to a variable inside a vardef macro and that variable is not ’save’d I’m changing the original? G > On 16 Mar 2020, at

[NTG-context] Can is somehow inspect the intermediate results of an mtxrun?

2020-03-16 Thread Gerben Wierda
I have an mtxrun on a .tex file that has problems I need to debug. The .tex file handles well, but whenMETAPOST has a go, it crashes. But after the run, I cannot inspect what source was fed to METAPOST. Can I inspect that (outside of what the log tells me)? In this case, I know METAPOST is

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Hans Hagen
On 3/16/2020 10:23 AM, Taco Hoekwater wrote: On 16 Mar 2020, at 10:10, Taco Hoekwater wrote: On 16 Mar 2020, at 09:53, Gerben Wierda wrote: Hola! So, the arguments passed to macros are by reference and not by value? I could have known of course, they are simple expansions, but I’d

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Gerben Wierda
Maybe a nice little explanation (educational with good examples) of ‘how to use pass by reference’ and ‘building and using complex data structures’ would be useful for people. Say, some ‘patterns’. G > On 16 Mar 2020, at 10:38, Hans Hagen wrote: > > that said, after muy share of mp

Re: [NTG-context] Why do I see the outline of the green box in this METAPOST code?

2020-03-16 Thread Taco Hoekwater
Move the fills to within the image(), and build it up in stacking order. > On 14 Mar 2020, at 16:29, Gerben Wierda wrote: > > Code: > > vardef Foo(expr w, h, lh) = >save pth; path pth; >save pthtwo; path pthtwo; >save pththree; path pththree; >save pic; picture pic; >pth

Re: [NTG-context] Quizz

2020-03-16 Thread luigi scarso
On Mon, Mar 16, 2020 at 11:14 AM Hans Hagen wrote: > On 3/15/2020 10:34 AM, Fabrice Couvreur wrote: > > Hi, > > With the Coronavirus pandemic, my school will close like all the others. > > We chose to work with Microsoft Teams. I know how to file Math exercises > > written with ConteXt and

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Taco Hoekwater
> On 16 Mar 2020, at 10:10, Taco Hoekwater wrote: > > > >> On 16 Mar 2020, at 09:53, Gerben Wierda wrote: >> >> Hola! So, the arguments passed to macros are by reference and not by value? >> I could have known of course, they are simple expansions, but I’d like to be >> sure. IfI assign

Re: [NTG-context] Can is somehow inspect the intermediate results of an mtxrun?

2020-03-16 Thread Hans Hagen
On 3/16/2020 10:16 AM, Gerben Wierda wrote: I have an mtxrun on a .tex file that has problems I need to debug. The .tex file handles well, but whenMETAPOST has a go, it crashes. But after the run, I cannot inspect what source was fed to METAPOST. Can I inspect that (outside of what the log

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Gerben Wierda
> On 16 Mar 2020, at 10:23, Taco Hoekwater wrote: > > > >> On 16 Mar 2020, at 10:10, Taco Hoekwater wrote: >> >> >> >>> On 16 Mar 2020, at 09:53, Gerben Wierda wrote: >>> >>> Hola! So, the arguments passed to macros are by reference and not by value? >>> I could have known of course,

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Pablo Rodriguez
On 3/15/20 10:56 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 15.03.2020 um 20:32: >> [...] >> Everthing is fine when italic fonts aren’t used. > > It can be fixed with a strut option for lists, e.g. > \setuplist[strut=no]. The problem in this case is that the ex-height for > the

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Taco Hoekwater
> On 16 Mar 2020, at 09:53, Gerben Wierda wrote: > > Hola! So, the arguments passed to macros are by reference and not by value? I > could have known of course, they are simple expansions, but I’d like to be > sure. IfI assign to a variable inside a vardef macro and that variable is not >

Re: [NTG-context] Quizz

2020-03-16 Thread Hans Hagen
On 3/15/2020 10:46 AM, Henning Hraban Ramm wrote: Am 15.03.20 um 10:34 schrieb Fabrice Couvreur: Hi, With the Coronavirus pandemic, my school will close like all the others. We chose to work with Microsoft Teams. I know how to file Math exercises written with ConteXt and export to pdf format.

Re: [NTG-context] Quizz

2020-03-16 Thread Hans Hagen
On 3/15/2020 10:34 AM, Fabrice Couvreur wrote: Hi, With the Coronavirus pandemic, my school will close like all the others. We chose to work with Microsoft Teams. I know how to file Math exercises written with ConteXt and export to pdf format. Is it possible with ConteXt to create interactive

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-16 Thread Gerben Wierda
This worked when I was just doing METAPOST. Now, I am using my lua code to produce the METAPOST code that produces the pictures. And the picture itself is put in a file for METAPOST as follows: File test4-mplib-run-001.mp: % begin graphic: n=0 ; beginfig(1) ;

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 16.03.2020 um 10:01: On 3/15/20 10:56 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 15.03.2020 um 20:32: [...] Everthing is fine when italic fonts aren’t used. It can be fixed with a strut option for lists, e.g. \setuplist[strut=no]. The problem in this

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Hans Hagen
On 3/16/2020 1:27 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 16.03.2020 um 10:01: On 3/15/20 10:56 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 15.03.2020 um 20:32: [...] Everthing is fine when italic fonts aren’t used. It can be fixed with a strut option for lists,

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Henning Hraban Ramm
> Am 2020-03-16 um 14:35 schrieb Hans Hagen : >> Yes, pagella is a extreme case but when you use bold text the vertical >> spacing is also messed up. You can avoid this when you use a fixed >> lineheight (e.g. \setupinterlinespace[line=14pt]) because the default >> distance is font dependant

Re: [NTG-context] Quizz

2020-03-16 Thread Fabrice Couvreur
Hi Hans, Thank you, I will try to use your file. Fabrice Le lun. 16 mars 2020 à 11:32, luigi scarso a écrit : > > > On Mon, Mar 16, 2020 at 11:14 AM Hans Hagen wrote: > >> On 3/15/2020 10:34 AM, Fabrice Couvreur wrote: >> > Hi, >> > With the Coronavirus pandemic, my school will close like all

Re: [NTG-context] Quizz

2020-03-16 Thread Otared Kavian
> On 16 Mar 2020, at 11:14, Hans Hagen wrote: > > On 3/15/2020 10:34 AM, Fabrice Couvreur wrote: >> […] > > there are some examples of form stuff in the test suite (widgets) > > i'll send you a file from 2000 that does some mpc magic (including feedback > and score calculations) but it's

Re: [NTG-context] Quizz

2020-03-16 Thread Hans Hagen
On 3/16/2020 4:26 PM, Fabrice Couvreur wrote: Thank you, I will try to use your file. i'll add a mkiv variant to the distribution (a few minor tweaks) Hans - Hans Hagen | PRAGMA ADE

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Wolfgang Schuster
Hans Hagen schrieb am 16.03.2020 um 18:42: On 3/16/2020 6:01 PM, Wolfgang Schuster wrote: Henning Hraban Ramm schrieb am 16.03.2020 um 15:42: Am 2020-03-16 um 14:35 schrieb Hans Hagen : Yes, pagella is a extreme case but when you use bold text the vertical spacing is also messed up. You

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 16.03.2020 um 15:42: Am 2020-03-16 um 14:35 schrieb Hans Hagen : Yes, pagella is a extreme case but when you use bold text the vertical spacing is also messed up. You can avoid this when you use a fixed lineheight (e.g. \setupinterlinespace[line=14pt])

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Hans Hagen
On 3/16/2020 6:01 PM, Wolfgang Schuster wrote: Henning Hraban Ramm schrieb am 16.03.2020 um 15:42: Am 2020-03-16 um 14:35 schrieb Hans Hagen : Yes, pagella is a extreme case but when you use bold text the vertical spacing is also messed up. You can avoid this when you use a fixed

Re: [NTG-context] (bug?) wrong interline in \placelist[alternative=d] with Pagella italics

2020-03-16 Thread Pablo Rodriguez
On 3/16/20 7:00 PM, Wolfgang Schuster wrote: > [...] > A way to fix the wrong spacing here is to add a strut option to > \setuplist (or use always the upright font to set the strut values). Any of these ones would be great to avoid the corner cases. Pablo -- http://www.ousia.tk

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-16 Thread Aditya Mahajan
On Mon, 16 Mar 2020, Gerben Wierda wrote: This worked when I was just doing METAPOST. Now, I am using my lua code to produce the METAPOST code that produces the pictures. And the picture itself is put in a file for METAPOST as follows: File test4-mplib-run-001.mp: % begin graphic: n=0 ;