[NTG-context] regular online meet-up

2024-01-06 Thread Henning Hraban Ramm

A happy & healthy new year!

You’re invited to the first online meet-up of the year, this upcoming 
Wednesday, January 10th, 19:00 CET (UTC+1)


at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Looking forward to seeing you,
Hraban


(Same blurb as every time:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button.
Beware there is only one presenter at a time, so don’t kill someone 
else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).
* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* Sometimes leaving and re-entering helps.
* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.
* BigBlueButton documentation applies: 
https://bigbluebutton.org/teachers/tutorials/


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...
___
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: Metapost: draw only subpath; changing thickness of line

2024-01-06 Thread Emanuel Han via ntg-context
Hi Taco,

thanks for your help. This works for me!
On Jan. 5 2024, at 2:13 pm, Taco Hoekwater  wrote:
> Hi,
>
> Here is 'a' way to draw the subpath, at least. I do not have time to come up 
> with a nice “thicker in the middle” solution.
> Best wishes,
> Taco
>
>
> \startMPcode
> numeric u; u=1cm;
> %equiangular spiral
> numeric a, k ;
> a = 2.3; %scaling factor
> k = 8.61722335;
> path S;
> S = right for t=1 upto 360: .. a ** (t/50.2) * dir (-k*t) endfor;
> draw S;
>
> z1 = 8 dir -14;
> path A; A = origin -- z1 scaled 0.7u ;% draw A;
> pair AEndPoint; AEndPoint = point 1 of A;
> pair gong[], times; numeric n; n = 0;
> numeric gongtimes[]; % new
> for i = 1 upto length(A):
> for j = 1 upto length(S):
> times := subpath (i-1,i) of A intersectiontimes subpath (j-1,j) of S;
> if xpart times > -1:
> gong[incr n] = 1[point xpart times of subpath (i-1,i) of A,
> point ypart times of subpath (j-1,j) of S];
> gongtimes[n] = j-1 + ypart times; % new
> fi
> endfor
> endfor
>
> % new
> path H; H = subpath(gongtimes[6],gongtimes[7]) of S;
> lH = length(H);
> for i = 1 upto 100:
> draw (subpath((i-1)/100*lH, i/100* lH) of H) withcolor red withpen (pencircle 
> scaled(abs(abs(i-50)-50)/10)) ;
> endfor;
>
> \stopMPcode
>
> > On 5 Jan 2024, at 09:56, Emanuel Han via ntg-context  
> > wrote:
> >
> > Hi all,
> >
> > I have this MWE. Now I want to draw only the subpath of S between gong6 and 
> > gong7 with a red line which is narrower at the two ends and thicker in the 
> > middle part. How to achieve this?
> >
> > Thanks!
> > Emanuel
> >
> > \setuppapersize[A4,landscape]
> >
> > \starttext
> >
> > \startMPcode
> > numeric u; u=1cm;
> > %equiangular spiral
> > numeric a, k ;
> > a = 2.3; %scaling factor
> > k = 8.61722335;
> > path S;
> > S = right for t=1 upto 360: .. a ** (t/50.2) * dir (-k*t) endfor;
> > draw S;
> >
> > z1 = 8 dir -14;
> > path A; A = origin -- z1 scaled 0.7u ; draw A;
> > pair AEndPoint; AEndPoint = point 1 of A;
> > pair gong[], times; numeric n; n = 0;
> > for i = 1 upto length(A):
> > for j = 1 upto length(S):
> > times := subpath (i-1,i) of A intersectiontimes subpath (j-1,j) of S;
> > if xpart times > -1:
> > gong[incr n] = 1/2[point xpart times of subpath (i-1,i) of A,
> > point ypart times of subpath (j-1,j) of S];
> > fi
> > endfor
> > endfor
> >
> > dotlabel.rt ("$gong6$", gong6);
> > dotlabel.rt ("$gong7$", gong7);
> >
> > %Now I want to draw only the subpath of S between gong6 and gong7 with a 
> > red line which is narrower at the two ends and thicker in the middle part
> >
> > \stopMPcode
> >
> > \stoptext
> > ___
> > 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
> > ___
>
> —
> Taco Hoekwater E: t...@bittext.nl
> genderfluid (all pronouns)
>

___
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: multipage metapost output from ConTeXt

2024-01-06 Thread Emanuel Han via ntg-context
Hi Mikael,

with the solution provided by you, I could work on my graphic which grows from 
page to page. So far I have already 28 pages. Now I would like to go back to 
the summed graphic of p1 to p21 and add the coming p29, p30 etc. to only that 
(that means contents of p22 to p28 should not be visible on pages 29 and 
forward).
I don't bother you with my code which is too long. Let's use the mwe provided 
by you (I added it here for convenience), where we have 3 pages. How can I have 
the content of p2 not be added on page 3 and forward?
\startuseMPgraphic{base}
picture p[];
path TheFrame ;
TheFrame := fullsquare scaled 5in ;
z1 = (60,40);
z2 = (40,90);
z3 = (10,70);

p1:=image(
label("Word 1", z1);
);

p2:=image(
label("Mot 2", z2);
);

p3:=image(
label("Parola 3", z3);
);

\stopuseMPgraphic
\starttext
\dorecurse{3}{ % Frame
\startMPpage[pagestate=start]
\includeMPgraphic{base}
currentime := #1 ;
% Just for learning :
draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
draw textext("T="(currentime)) scaled 2 shifted(0,2in)
withcolor magenta ;
for k=1 upto currentime: addto currentpicture also p[k]; endfor
setbounds currentpicture to TheFrame ;

desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
currentpicture := currentpicture xysized (desiredformat ,desiredformat );
\stopMPpage
}

\stoptext
On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist  wrote:
> Hi,
>
> I don't know if \startMPinclusions \stopMPinclusions shall work with
> \startMPpage and \stopMPpage. In this case, one can use a separate
> graphics:
>
> \startuseMPgraphic{base}
> picture p[];
> path TheFrame ;
> TheFrame := fullsquare scaled 5in ;
> z1 = (60,40);
> z2 = (40,90);
> z3 = (10,70);
>
> p1:=image(
> label("Word 1", z1);
> );
>
> p2:=image(
> label("Mot 2", z2);
> );
>
> p3:=image(
> label("Parola 3", z3);
> );
>
> \stopuseMPgraphic
> \starttext
> \dorecurse{3}{ % Frame
> \startMPpage[pagestate=start]
> \includeMPgraphic{base}
> currentime := #1 ;
> % Just for learning :
> draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> draw textext("T="(currentime)) scaled 2 shifted(0,2in)
> withcolor magenta ;
> for k=1 upto currentime: addto currentpicture also p[k]; endfor
> setbounds currentpicture to TheFrame ;
>
> desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> currentpicture := currentpicture xysized (desiredformat ,desiredformat );
> \stopMPpage
> }
>
> \stoptext
> /Mikael
> On Sat, Dec 2, 2023 at 6:14 PM Emanuel Han via ntg-context
>  wrote:
> >
> > Hi Mikael,
> >
> > here's a very simple mwe for the label(textext()) issue. On page 1, the 
> > text "Word 1" should be drawn in position z1. On page 2, the same text in 
> > the same position should be visible, and the text "Mot 2" in position p2 
> > should be added. And so on.
> >
> > \startMPinclusions
> >
> > picture p[];
> > path TheFrame ;
> > TheFrame := fullsquare scaled 5in ;
> >
> > z1 = (60,40);
> > z2 = (40,90);
> > z3 = (10,70);
> >
> > p1:=image(
> > label(textext("Word 1"), z1);
> > );
> >
> > p2:=image(
> > label(textext("Mot 2"), z2);
> > );
> >
> > p3:=image(
> > label(textext("Parola 3"), z3);
> > );
> >
> > \stopMPinclusions
> >
> > \starttext
> >
> > \dorecurse{3}{ % Frame
> > \startMPpage[pagestate=start]
> > currentime := #1 ;
> > % Just for learning :
> > draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> > draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor 
> > magenta ;
> > for k=1 upto currentime: draw p[k]; endfor
> > setbounds currentpicture to TheFrame ;
> >
> > desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> > currentpicture := currentpicture xysized (desiredformat ,desiredformat );
> >
> > \stopMPpage
> > }
> >
> > \stoptext
> >
> > On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist  wrote:
> >
> > Hi Emanuel,
> >
> > I am not sure I understand your question, and since you use fonts that
> > i do not have, I cannot test your example as is. But, maybe, if you
> > want to redraw a picture, you can do
> >
> > addto currentpicture also p1;
> >
> > where you want it.
> >
> > /Mikael
> >
> > PS For the text thing, I did not get it. Could one have a _very
> > simple_ example showing only that problem and no other problem?
> >
> > On Sat, Dec 2, 2023 at 12:58 PM fv leung  wrote:
> > >
> > > You didn't specify the color of path A in p2 and p4. So it's drawn in 
> > > black.
> > > The other issue, I can't help.
> > >
> > > Emanuel Han via ntg-context  於 2023年12月2日 週六 下午7:23寫道:
> > >>
> > >> So is there a way to circumvent these issues? Or an explanation for this 
> > >> behavior, so that I can try to find a solution by myself?
> > >>
> > >> Thanks
> > >> Emanuel
> > >>
> > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context 
> > >>  wrote:
> > >>
> > >> Dear Aditya and Fabrice,
> > >> thanks for your responses.
> > >>
> > >> I included some of Fabrice's code into mine for testing purpose, and 
> > >> indeed the multipage works now.
> > >> 

[NTG-context] Re: vim syntax highlighting bug?

2024-01-06 Thread Christian Prim via ntg-context
Hello

on my installation, it's working:
[image: image.png]
But I'm on an old version on debian:
VIM - Vi IMproved 8.2 (2019 Dec 12 kompiliert am Oct 01 2021 01:51:08)
Inklusive der Patches: 1-2434
Extra Patches: 8.2.3402, 8.2.3403, 8.2.3409, 8.2.3428

Perhaps something has changed in version 9.0...

Hope it helps

Christian

Am Sa., 6. Jan. 2024 um 13:04 Uhr schrieb Damien Thiriet via ntg-context <
ntg-context@ntg.nl>:

> Hello,
>
>
> Happy New Year!
>
> I got into a bug in my Vim syntax highlighting version.
> Highlight stays in lua mode after ctxlua macro is closed.
> Here is a MWE, where «this should not be highlitghted as
> a comment indeed is.
>
> \starttext
>
> Hello!
> \ctxlua{context("does the parser work?")}
>
> -- this should not be highlighted as a comment
>
> \stoptext
>
> Do other Vim users come into this?
> Is my syntax file outdated?
>
> I am using this Vim version on OpenBSD 7.3 -stable:
> VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  6 2023 08:55:14)
> Included patches: 1-1876
>
> Best regards,
>
> Damien Thiriet
>
> ___
> 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] vim syntax highlighting bug?

2024-01-06 Thread Damien Thiriet via ntg-context

Hello,


Happy New Year!

I got into a bug in my Vim syntax highlighting version.
Highlight stays in lua mode after ctxlua macro is closed.
Here is a MWE, where «this should not be highlitghted as
a comment indeed is.

\starttext

Hello!
\ctxlua{context("does the parser work?")}

-- this should not be highlighted as a comment

\stoptext

Do other Vim users come into this?
Is my syntax file outdated?

I am using this Vim version on OpenBSD 7.3 -stable:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  6 2023 08:55:14)
Included patches: 1-1876

Best regards,

Damien Thiriet
___
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
___