Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Hans Hagen
On 12/9/2020 9:38 PM, Aditya Mahajan wrote: Or just redefine shortened to accept a pair! \startMPdefinitions primarydef p shortened d = reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart paired(d) ) enddef ; \stopMPdefinitions patched but then also: primarydef p

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Thanks Aditya! One can learn a lot with your answers ! In the Metafun manual I see enlonged but I did not know to use it. Best regards: Otared > On 9 Dec 2020, at 21:38, Aditya Mahajan wrote: > > On Wed, 9 Dec 2020, Otared Kavian wrote: > >> Hi Aditya, >> >> Thanks for the alternative

Re: [NTG-context] Automatically setting the value of list key in annotation module

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Wolfgang Schuster wrote: > > Actually, I cannot figure out how \writetolist works. According to > https://wiki.contextgarden.net/Command/writetolist, the 2nd argument is the > "number". But, for some reason, the list number doesn't show in placelist: > > > > > >

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Otared Kavian wrote: > Hi Aditya, > > Thanks for the alternative method, which comes handy if one wishes to extend > the straight line by a different amount at either end: > > \starttext > \startMPcode >z1 = (1cm,3cm) ; >z2 = (5cm, 9cm) ; >z3 = 1cm * dir(angle

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Aditya, Thanks for the alternative method, which comes handy if one wishes to extend the straight line by a different amount at either end: \starttext \startMPcode z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; z3 = 1cm * dir(angle (z2 - z1)) shifted z2 ; z4 = -.5cm*dir(angle(z2 - z1))

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Otared Kavian wrote: > Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is > ! Or, if you want to use high school algebra: \starttext \startMPcode z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; z3 = 1cm * dir(angle (z2 - z1)) shifted z2; draw

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Fabrice, Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is ! Best regards: Otared > On 9 Dec 2020, at 17:19, Fabrice L wrote: > > Hi, > >> Le 9 déc. 2020 à 10:57, Otared Kavian a écrit : >> >> Hi, >> >> I have a silly question: given two points in the plane

Re: [NTG-context] Automatically setting the value of list key in annotation module

2020-12-09 Thread Wolfgang Schuster
Aditya Mahajan schrieb am 08.12.2020 um 20:05: On Tue, 8 Dec 2020, Aditya Mahajan wrote: Hi, On Tue, 8 Dec 2020, Hans Hagen wrote: On 12/8/2020 8:47 AM, Aditya Mahajan wrote: \usemodule[annotation] \defineannotation[test][alternative=paragraph] \starttext \placelist[test][criterium=all]

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Fabrice L
Hi, > Le 9 déc. 2020 à 10:57, Otared Kavian a écrit : > > Hi, > > I have a silly question: given two points in the plane > z1 = (1cm,3cm) ; > z2 = (5cm, 9cm) ; > the command > draw z1 -- z2 withpen pencircle scaled .5pt ; > draws the line segment joining z1 and z2. How could

[NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi, I have a silly question: given two points in the plane z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; the command draw z1 -- z2 withpen pencircle scaled .5pt ; draws the line segment joining z1 and z2. How could I draw the line segment which goes a little further (say 1cm) than

Re: [NTG-context] image align in \clip

2020-12-09 Thread Pablo Rodriguez
On 12/9/20 9:38 AM, Jan U. Hasecke wrote: > Dear all, > > I use \clip to simplify working with images. Hi Jan-Ulrich, this command is really useful. > In my real document the clipped image is shifted to the right as if > indented by 1em or so. I have read that Hans solved your issue. I

Re: [NTG-context] image align in \clip

2020-12-09 Thread Jan U. Hasecke
Am 09.12.20 um 11:26 schrieb Hans Hagen: > what if you put \removeunwantedspaces in front of the clip The space vanishes when I put it right before \externalfigure. Thanks a lot, Hans! (Still, I would like to know how the space came up in the first place.) juh

[NTG-context] image align in \clip

2020-12-09 Thread Jan U. Hasecke
Dear all, I use \clip to simplify working with images. I have a problem that I am unable to reproduce in a MWE. \setupexternalfigure[location=default] \showframe \starttext \externalfigure[cow.pdf][width=\textwidth] \clip[height=50mm] {\externalfigure[cow.pdf][width=\textwidth]}

Re: [NTG-context] Quirk with \userpagenumber, datasets and the .tuc file

2020-12-09 Thread Hans Hagen
On 12/9/2020 1:08 PM, Bruce Horrocks wrote: Here's an odd quirk... I wanted to get at some of my dataset data for use outside of ConTeXt so I thought I would just extract it from the .tuc file. MWE: \definedataset [MyDS][delay=yes] \starttext \input tufte \setdataset [MyDS] [

Re: [NTG-context] image align in \clip

2020-12-09 Thread Hans Hagen
On 12/9/2020 12:08 PM, Jan U. Hasecke wrote: Am 09.12.20 um 11:26 schrieb Hans Hagen: what if you put \removeunwantedspaces in front of the clip The space vanishes when I put it right before \externalfigure. Thanks a lot, Hans! (Still, I would like to know how the space came up in the first

[NTG-context] Quirk with \userpagenumber, datasets and the .tuc file

2020-12-09 Thread Bruce Horrocks
Here's an odd quirk... I wanted to get at some of my dataset data for use outside of ConTeXt so I thought I would just extract it from the .tuc file. MWE: \definedataset [MyDS][delay=yes] \starttext \input tufte \setdataset [MyDS] [ title={Test title}, page={\userpagenumber},

Re: [NTG-context] image align in \clip

2020-12-09 Thread Hans Hagen
On 12/9/2020 9:38 AM, Jan U. Hasecke wrote: Dear all, I use \clip to simplify working with images. I have a problem that I am unable to reproduce in a MWE. \setupexternalfigure[location=default] \showframe \starttext \externalfigure[cow.pdf][width=\textwidth] \clip[height=50mm]

Re: [NTG-context] RE : not working command in LMTX

2020-12-09 Thread Hans Hagen
On 12/9/2020 9:27 AM, Joseph wrote: Unfortunately after running install.bat script, I see errors at the end of installation run : This is LuaMetaTeX, Version 2.05.01  (INITEX) strange indeed, i'll make a new install to be sure (no cleu where that bin comes from) Hans

[NTG-context] RE : not working command in LMTX

2020-12-09 Thread Joseph
Unfortunately after running install.bat script, I see errors at the end of installation run : This is LuaMetaTeX, Version 2.05.01  (INITEX)(D:/ConTeXt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-en.mkxl(context.mkxl! Undefined control sequence.l.31 \immutable \edef\contextformat