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 enlonged len =
begingroup
if len == 0 :
p
elseif pair p :
...

in order to save some energy when one is zero

Hans

-
  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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 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)) shifted z1 ;
>>   draw z1 -- z3 ; 
>>   draw z4 -- z1 ;
>>   draw z1 -- z2 withcolor red ;
>> \stopMPcode
>> \stoptext
> 
> 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
> 
> 
> 
> \starttext
> \startMPpage
> z1 = (1cm,3cm) ;
> z2 = (5cm, 9cm) ;
> draw (z1--z2) shortened (-1cm,-2cm)  withcolor blue ;
> draw (z1--z2) withcolor red ;
> 
> \stopMPpage
> \stoptext
> 
> Now that if you really want to shorten a path, then cutends works better than 
> shortened
> 
> \startMPdefinitions
> primarydef p shortened d =
>reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart 
> paired(d) )
> enddef ;
> \stopMPdefinitions
> 
> 
> \starttext
> \startMPpage
> z1 = (1cm,3cm) ;
> z2 = (5cm, 9cm) ;
> path p, q;
> p := z1 {up} .. {right} z2;
> q := p shifted (6cm, 0);
> 
> draw p withcolor red ;
> draw p shortened (1cm,2cm)  withcolor blue ;
> 
> draw q withcolor green ;
> draw q cutends (1cm,2cm)  withcolor blue ;
> 
> \stopMPpage
> \stoptext
> 
> Aditya
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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:
> >
> >
> > \definelist[test]
> >
> > \starttext
> >
> > \placelist[test][criterium=all, alternative=b]
> 
> Add "headnumber=always".

Thanks!

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 (z2 - z1)) shifted z2 ;
>z4 = -.5cm*dir(angle(z2 - z1)) shifted z1 ;
>draw z1 -- z3 ; 
>draw z4 -- z1 ;
>draw z1 -- z2 withcolor red ;
> \stopMPcode
> \stoptext

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



\starttext
\startMPpage
z1 = (1cm,3cm) ;
z2 = (5cm, 9cm) ;
draw (z1--z2) shortened (-1cm,-2cm)  withcolor blue ;
draw (z1--z2) withcolor red ;

\stopMPpage
\stoptext

Now that if you really want to shorten a path, then cutends works better than 
shortened

\startMPdefinitions
primarydef p shortened d =
reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart 
paired(d) )
enddef ;
\stopMPdefinitions


\starttext
\startMPpage
z1 = (1cm,3cm) ;
z2 = (5cm, 9cm) ;
path p, q;
p := z1 {up} .. {right} z2;
q := p shifted (6cm, 0);

draw p withcolor red ;
draw p shortened (1cm,2cm)  withcolor blue ;

draw q withcolor green ;
draw q cutends (1cm,2cm)  withcolor blue ;

\stopMPpage
\stoptext

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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)) shifted z1 ;
   draw z1 -- z3 ; 
   draw z4 -- z1 ;
   draw z1 -- z2 withcolor red ;
\stopMPcode
\stoptext

Best regards: Otared

> On 9 Dec 2020, at 18:37, Aditya Mahajan  wrote:
> 
> 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 z1 -- z3 ; 
>draw z1 -- z2 withcolor red;
> \stopMPcode
> \stoptext
> 
> Aditya
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 z1 -- z3 ; 
draw z1 -- z2 withcolor red;
\stopMPcode
\stoptext

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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
>>  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 both the end points of this 
>> segment (that is in this example, a point before z1 and a point after z2 on 
>> the straight line) .
>> Indeed it is possible to write the equation of the line and then compute by 
>> hand the coordinates of the new end points, but I think there is a simpler 
>> way in Metafun to do this.
> 
> The shortened operation is the solution ! See MetaFun manual section 1.18
> 
> \starttext
> \startMPpage
> z1 = (1cm,3cm) ;
> z2 = (5cm, 9cm) ;
> draw (z1--z2) shortened -1cm  withcolor blue ;
> draw (z1--z2) withcolor red ;
> 
> \stopMPpage
> \stoptext
>   
> Fabrice.
> 
>> 
>> Thanks for any help: Otared
>> 
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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]

\starttest[title={This is a title}]
\input ward
\stoptest

\starttest[title={This is another title}, list={This is in the 2nd list}]
\input ward
\stoptest

just cheat:

\starttest[title={This is another title}, list={This is in the 2nd
list},after={\writetolist[test]{1}{what a cheat}}]
   \input ward
\stoptest

I actually wanted it the other way round ... make sure that 
\starttest[test][title={...}] gets added to the list. Looking at the comments 
of the annotation module, I get the impression that this should work.

I could do it manually by adding \writetolist as part of the renderingsetup, 
but there are already multiple \writetolist in the annotation module, so I 
think that I am missing a configuration option.

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:


\definelist[test]

\starttext

\placelist[test][criterium=all, alternative=b]


Add "headnumber=always".

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 I draw the line segment 
> which goes a little further (say 1cm) than both the end points of this 
> segment (that is in this example, a point before z1 and a point after z2 on 
> the straight line) .
> Indeed it is possible to write the equation of the line and then compute by 
> hand the coordinates of the new end points, but I think there is a simpler 
> way in Metafun to do this.

The shortened operation is the solution ! See MetaFun manual section 1.18

\starttext
\startMPpage
z1 = (1cm,3cm) ;
z2 = (5cm, 9cm) ;
draw (z1--z2) shortened -1cm  withcolor blue ;
draw (z1--z2) withcolor red ;

\stopMPpage
\stoptext

Fabrice.

> 
> Thanks for any help: Otared
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[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 both the end points of this segment 
(that is in this example, a point before z1 and a point after z2 on the 
straight line) .
Indeed it is possible to write the equation of the line and then compute by 
hand the coordinates of the new end points, but I think there is a simpler way 
in Metafun to do this.

Thanks for any help: Otared


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 thought of another approach (which isn’t your case):

  \showframe\showgrid
  \setupindenting[yes, always, big]
  \setupexternalfigure[location=default]
  \showframe
  \starttext
  \clip[height=50mm]
   {\externalfigure[cow.pdf][width=\textwidth]}

  \dontleavehmode
  \clip[height=50mm]
   {\externalfigure[cow.pdf][width=\textwidth]}

  \noindentation
  \dontleavehmode
  \clip[height=50mm]
   {\externalfigure[cow.pdf][width=\textwidth]}
  \stoptext

I thought that you had your image in horizontal mode (inside a
paragraph) and then the paragraph was indented.

Cheers

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[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]}
\stoptext

In my real document the clipped image is shifted to the right as if
indented by 1em or so.

Any hints where to look for the reason?

TIA
juh

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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]
 [ title={Test title},
   page={\userpagenumber},
 ]
   \stoptext

In the TUC file I get:

   utilitydata.job.datasets.collected={
["MyDS"]={
 {
  ["index"]=1,
  ["order"]=1,
  ["page"]="1\\relax ",
  ["realpage"]=1,
  ["title"]="Test title",
 },
},
   }

Note the \\relax following the page number. This isn't a problem for me at the 
moment but I wondered if it is something that needs to be looked at?

you ask for the "typeset number" while you want \pagenumber

-
  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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 place.)
hard to say without knowing what happens before you do the 
\externalfigure command


you can put

\tracingall

someplace before it and

\tracingnone

after the \removeunwantesspaces and then check the log and see where a 
space is injected


Hans

-
  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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[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},
]
  \stoptext

In the TUC file I get:

  utilitydata.job.datasets.collected={
   ["MyDS"]={
{
 ["index"]=1,
 ["order"]=1,
 ["page"]="1\\relax ",
 ["realpage"]=1,
 ["title"]="Test title",
},
   },
  }

Note the \\relax following the page number. This isn't a problem for me at the 
moment but I wondered if it is something that needs to be looked at?

--
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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]
  {\externalfigure[cow.pdf][width=\textwidth]}
\stoptext

In my real document the clipped image is shifted to the right as if
indented by 1em or so.

Any hints where to look for the reason?

what if you put \removeunwantedspaces in front of the clip

Hans

-
  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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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


-
  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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[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 {\jobname}! Undefined control sequence.l.32 \immutable \edef\contextversion{2020.12.08 18:43}etc… It seems that luametatex version is older than before. Thanks Joseph De : Pablo RodriguezEnvoyé le :mardi 8 décembre 2020 19:34À : ntg-context@ntg.nlObjet :Re: [NTG-context] not working command in LMTX On 12/8/20 5:56 PM, Hans Hagen wrote:> On 12/8/2020 4:59 PM, Pablo Rodriguez wrote:>> Dear list,>> >> I have the following sample:>> >>    \definecounter[minpagecounter][way=bypage]>>    \def\minipagecounter>>  {\incrementcounter[minpagecounter][1]>>   \rawcounter[minpagecounter]}>>    \starttext>>    \dontleavehmode\dorecurse{4}{\minipagecounter\\}>>    \stoptext>> >> LMTX gives only 0 as values. MkIV increments the counter.>> >> I know that something has changed in the command definition in LMTX, but>> I don’t know what I have to do to adapt it for this case.> fixed in next upload Many thanks for your fast fix, Hans. Pablo--http://www.ousia.tk___If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net___ 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___