Re: [NTG-context] Source Code with Bolded Keywords

2020-03-14 Thread Wolfgang Schuster
Yves Cloutier schrieb am 14.03.2020 um 16:54: Hello, I am trying to typeset source code for a custom programming language and would like to have the keywords in bold text. I tried following the example found here regarding verbatim displays: https://www.contextgarden.net/Verbatim_text#Displa

[NTG-context] Source Code with Bolded Keywords

2020-03-14 Thread Yves Cloutier
Hello, I am trying to typeset source code for a custom programming language and would like to have the keywords in bold text. I tried following the example found here regarding verbatim displays: https://www.contextgarden.net/Verbatim_text#Displayed_text Specifically the C example, however this

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

2020-03-14 Thread Gerben Wierda
Code:vardef Foo(expr w, h, lh) =   save pth; path pth;   save pthtwo; path pthtwo;   save pththree; path pththree;   save pic; picture pic;   pth = fullsquare xysized (w, h);   pthtwo = fullsquare xysized (2*lh, lh) shifted (-w/2, 2.5*lh);   pththree = fullsquare xysized (2*lh, lh) shifted (-w/2, l

Re: [NTG-context] Why does this METAPOST vardef 'save' statement fail?

2020-03-14 Thread Gerben Wierda
Answering myself: pth2 is not a valid variable name. Digits are not allowed. > On 14 Mar 2020, at 15:45, Gerben Wierda wrote: > > I have this vardef: > > vardef Foo(expr w, h) = >save pth; path pth; >%save pth2; path pth2; >save pic; picture pic; >pth = fullsquare xysized (w, h)

[NTG-context] Why does this METAPOST vardef 'save' statement fail?

2020-03-14 Thread Gerben Wierda
I have this vardef: vardef Foo(expr w, h) = save pth; path pth; %save pth2; path pth2; save pic; picture pic; pth = fullsquare xysized (w, h); %pth2 = fullsquare xysized (h/4, h/8) pic := image ( draw pth; %draw pth2 shifted (-w/2, -h/4); % all kind of stuff

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

2020-03-14 Thread Gerben Wierda
> On 13 Mar 2020, at 14:59, Hans Hagen wrote: > > On 3/13/2020 2:33 PM, Aditya Mahajan wrote: >> On Fri, 13 Mar 2020, Taco Hoekwater wrote: >>> Hi, >>> >>> >>> On 13 Mar 2020, at 12:53, Gerben Wierda wrote: Suppose I have this code: Can I reuse that varied a