[NTG-context] SimpleSlides and Visual counters

2021-11-15 Thread Otared Kavian via ntg-context
Hi all, in particular Aditya M. and Thomas A.S.,

It seems that the visual counter in  SimpleSlides module (the version I have 
from ConTeXt Garden is from 2014) does not work fine with the latest LMTX.
Is the issue is known ? If so, is there a new version of SimpleSlides in which 
the issue has been fixed ?

Best regards: 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] \externafigure and \at do not work together

2021-10-31 Thread Otared Kavian via ntg-context
Hi,

Your example has two issues, since you invoke \externalfigure before 
\starttext, and moreover you don’t use the place figure mechanism.
The following gives the result you want:

\setupinteraction[state=start]
\starttext
\startplacefigure[reference=clock]
\externalfigure[clock.jpg]
\stopplacefigure
In figure \at[clock] you see a clock
\page
In figure \at[clock] you see a clock. 

Or better: in \in{Figure}[clock] you see a clock.
\stoptext

Best regards: Otared

> On 31 Oct 2021, at 13:49, a badin via ntg-context  wrote:
> 
> The fix is not really a fix thought, as it makes the image of the
> figure disappear.
> Still don't know how to make a .jpg work with \at
> 
> On Sun, 31 Oct 2021 at 13:07, a badin  wrote:
>> 
>> Hello, perhaps this is how it is supposed to work, but:
>> 
>> \externalfigure[clock.jpg][clock]
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>> 
>> produces "?? refers to a clock", instead of "1 refers a clock" --- the
>> wiki of \at says, that labels of figures can be refered to. Is this a
>> bug, or can only some labels be refered to? I was able to fix it
>> using:
>> 
>> \reference[clock]{\externalfigure[clock.jpg]}
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>> 
>> and
>> 
>> \externalfigure[clock][]
>> \starttext
>> \at
>> \stoptext
>> 
>> produces an interesting artwork... so I thought maybe this could be a
>> bug. LMTX 2021.10.21
>> 
>> Best,
>> Andrej
> ___
> 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] Create an enumeration style

2021-08-11 Thread Otared Kavian via ntg-context
> On 11 Aug 2021, at 10:19, Thomas A. Schmitz via ntg-context 
>  wrote:
> 
> 
>> On 11. Aug 2021, at 10:09, Otared Kavian via ntg-context 
>>  wrote:
>> 
>> Thanks for the example and the fix, but I would rather think that the « 
>> french » part of ordinals should be
>> 
>>  french = function(n)
>>  if n == 1 then
>>  return « er"
>>  else
>>   return « ème"
>>  end
>>  end,
> 
> Except if you have something like “1ère image”… Ah, languages are so messy 
> (no pun with recent events in Paris intended).
> 
> Thomas

Sure… But then maybe it is possible to define one’s own « ordinals.french » for 
messy cases :-) 
___
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] Create an enumeration style

2021-08-11 Thread Otared Kavian via ntg-context


> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context 
>  wrote:
> (…)
> core-con.lua (line 1155):
> 
> local ordinals = {
> [...]
> french = function(n)
> if n == 1 then
> return "er"
> +   else
> +   return "e"
> end
> end,
> }

Hi Wolfgang,

Thanks for the example and the fix, but I would rather think that the « french 
» part of ordinals should be

french = function(n)
if n == 1 then
return « er"
else
 return « ème"
end
end,

Now if this were not accepted as a fix in core-con.lua, is there a way for a 
user to change the default to the above choice in his document ?

Best regards: 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] Strange new behaviour of the mailing list

2021-07-31 Thread Otared Kavian via ntg-context
> On 31 Jul 2021, at 00:05, Bruce Horrocks  wrote:
> […]
> I see the same thing, also on Macos. Looking at an older message, I see that 
> the Reply-To: header has changed from
> 
> Reply to: Bruce Horrocks ,
>  mailing list for ConTeXt users 
> 
> to
> 
> Reply to: mailing list for ConTeXt users 
> 
> 
> So I suggest that there is little you can do as it appears to be a 
> configuration change on the mailing list server; and Apple Mail doesn't have 
> the facilities to easily allow you to re-write that header

Hi Bruce,

Thanks for your reply. 
I don’t know what has triggered this change, which seems to me strange and 
inconvenient.

Best regards: 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] Strange new behaviour of the mailing list

2021-07-31 Thread Otared Kavian via ntg-context
> On 31 Jul 2021, at 00:47, Henning Hraban Ramm via ntg-context 
>  wrote:
>> […]
> 
> If you click on that name, you can see the actual address.
> 
> Hraban

Sure, but I don’t understand why the behaviour has changed. It seems to me a 
regression…

Best regards: 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
___


[NTG-context] Strange new behaviour of the mailing list

2021-07-30 Thread Otared Kavian via ntg-context
Hi all,

I noticed that beginning July 27th, the messages distributed by the ConTeXt 
mailing list appear to be from

Mailing list for ConTeXt users

without the actual name of the sender appearing. It may be dependent on the 
mail client I am using (Mail.app on MacOS 11.4), but I wonder whether something 
has changed on mailing list server, and whether if there is something I can do 
to have the old behaviour (which was convenient when one wanted to follow up 
mails from some specific contributors). 

Also has anybody else noticed this change?

Thanks in advance for any hint.
Best regards: 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] Metapost Animation of Sine

2021-07-22 Thread Otared Kavian
Hi Jeroen,

Unfortunately I am not familiar with Tikz, since all my documents use what is 
built-in ConTeXt and Metapost…
That being said I am sure someone on the list can help you with Tikz module.

Best regards: Otared

> On 22 Jul 2021, at 14:28, Jeroen  wrote:
> 
> Hi, both solutions are great! This is what I had in mind, a rolling sine. Is 
> there a way to get the same result with the Tikz module?
> 
> \usemodule[animation]
> \setupinteraction[state=start]
> 
> \starttext
> 
> \input tufte
> 
> \framed{
> \startanimation[menu=yes,framerate=40]
> \dorecurse{50}{\expanded
> {\startframe
> \startMPcode
> numeric u, omega, mylength, tt ;
> u := 2cm ;
> omega := 4 ;
> mylength := 3.141596 ;
> tt := \recurselevel ;
> path p ;
> p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 upto 100 : 
> .. (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) 
> endfor ;
> draw p withpen pencircle scaled .5pt withcolor darkred ;
> \stopMPcode
> \stopframe}
> }
> \stopanimation
> }
> 
> \stoptext
> 
> Op wo 21 jul. 2021 om 23:26 schreef Otared Kavian  <mailto:ota...@gmail.com>>:
> Hi, 
> 
> I wonder whether something like the following is what you are looking for:
> 
> % begin wave-sine.tex
> \usemodule[animation]
> \setupinteraction[state=start]
> \starttext
> \startTEXpage[offset=2pt]
> \startanimation[menu=yes,framerate=10]
> \dorecurse{100}{\expanded
> {\startframe
> \startMPcode
> numeric u, omega, mylength, tt ;
> u := 2cm ;
> omega := 4 ;
> mylength := 3.141596 ;
> tt := \recurselevel ;
> path p ;
> p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 
> upto 100 : 
> .. 
> (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) 
> endfor ;
> draw p withpen pencircle scaled .5pt withcolor 
> darkred ;
> \stopMPcode
> \stopframe}
> }
> \stopanimation
> \stopTEXpage
> \stoptext
> % end wave-sine.tex
> 
> Best regards: OK
> 
> > On 21 Jul 2021, at 19:44, Jeroen  > <mailto:context...@gmail.com>> wrote:
> > 
> > I am looking for a sine animation as the one file f.pdf on this site
> > 
> > http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm
> >  
> > <http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm>
> > 
> > Jeroen
> > 
> > Op wo 21 jul. 2021 om 17:54 schreef Fabrice L  > <mailto:fabrice.al...@gmail.com>>:
> > Hi,
> > 
> >> Le 21 juill. 2021 à 10:08, Jeroen  >> <mailto:context...@gmail.com>> a écrit :
> >> 
> >> I use this small animation to enlarge a circle
> >> 
> >> 
> >> \usemodule[animation]
> >> \setupinteraction[state=start]
> >> \starttext
> >> \startanimation[menu=yes,framerate=10]
> >> \dorecurse{7}{\expanded
> >>   {\startframe
> >> \startMPcode
> >> path p;
> >> numeric n, u;
> >> u := 1cm;
> >> n:=\recurselevel*u;
> >> p := fullcircle scaled n;
> >> draw p;
> >> \stopMPcode
> >>   \stopframe}}
> >> \stopanimation
> >> \stoptext
> >> 
> >> 
> >> This I use to draw a sine
> >> 
> >> 
> >> \starttext
> >> \startMPcode
> >>   draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> >> (i/360*1.5cm,0.9cm*(sind(i)))endfor;
> >> \stopMPcode
> >> \stoptext
> >> 
> >> 
> >> When I put it together to animate the sine as following, it does not 
> >> entirely create the sine animation I am looking for
> >> 
> >> 
> >> \usemodule[animation]
> >> \setupinteraction[state=start]
> >> \starttext
> >> \startanimation[menu=yes,framerate=10]
> >> \dorecurse{7}{\expanded
> >>   {\startframe
> >> \startMPcode
> >> path p;
> >> numeric n, u;
> >> u := 1cm;
> >> n:=\recurselevel*u;
> >> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> >> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> >> draw p;
> >> \stopMPcode
> >> \stopframe}}
> >> \stopanimation
> >> \stoptext

Re: [NTG-context] Metapost Animation of Sine

2021-07-21 Thread Otared Kavian
Hi,

Adding to my previous message, if you are looking for an animation of the wave 
equation for a string with fixed endpoints, one has to use something like the 
following:

% begin wave-sine-string.tex
\usemodule[animation]
\setupinteraction[state=start]
\starttext
\startTEXpage[offset=2pt]
\startanimation[menu=yes,framerate=10]
\dorecurse{101}{\expanded
{\startframe
\startMPcode
numeric u, omega, mylength, tt, N ;
u := 2cm ;
omega := 4 ;
mylength := 3.141596 ;
tt := \recurselevel - 1 ;
N := 500 ; % number of steps
path p ;
p := (0u,0u) for i = 1 upto N : 
-- 
(((mylength/N)*i)*u,cos(omega*(mylength/N)*tt)*sin(omega*(mylength/N)*i)*u) 
endfor ;
draw p withpen pencircle scaled .5pt withcolor darkred ;
\stopMPcode
\stopframe}
}
\stopanimation
\stopTEXpage
\stoptext
% end wave-sine-string.tex

Best regards: OK

> On 21 Jul 2021, at 19:44, Jeroen  wrote:
> 
> I am looking for a sine animation as the one file f.pdf on this site
> 
> http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm
> 
> Jeroen
> 
> Op wo 21 jul. 2021 om 17:54 schreef Fabrice L :
> Hi,
> 
>> Le 21 juill. 2021 à 10:08, Jeroen  a écrit :
>> 
>> I use this small animation to enlarge a circle
>> 
>> 
>> \usemodule[animation]
>> \setupinteraction[state=start]
>> \starttext
>> \startanimation[menu=yes,framerate=10]
>> \dorecurse{7}{\expanded
>>   {\startframe
>> \startMPcode
>> path p;
>> numeric n, u;
>> u := 1cm;
>> n:=\recurselevel*u;
>> p := fullcircle scaled n;
>> draw p;
>> \stopMPcode
>>   \stopframe}}
>> \stopanimation
>> \stoptext
>> 
>> 
>> This I use to draw a sine
>> 
>> 
>> \starttext
>> \startMPcode
>>   draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
>> (i/360*1.5cm,0.9cm*(sind(i)))endfor;
>> \stopMPcode
>> \stoptext
>> 
>> 
>> When I put it together to animate the sine as following, it does not 
>> entirely create the sine animation I am looking for
>> 
>> 
>> \usemodule[animation]
>> \setupinteraction[state=start]
>> \starttext
>> \startanimation[menu=yes,framerate=10]
>> \dorecurse{7}{\expanded
>>   {\startframe
>> \startMPcode
>> path p;
>> numeric n, u;
>> u := 1cm;
>> n:=\recurselevel*u;
>> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
>> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
>> draw p;
>> \stopMPcode
>> \stopframe}}
>> \stopanimation
>> \stoptext
>> 
>> 
>> What better way can I create a sine animation with Metapost?
>>  
>> 
> 
> Here is another way to do your animation. This is doing something, but I 
> guess not what you want. Could you describe what do you have in mind ?
> 
> \starttext
> \dorecurse{7}{ % 3180
> \startMPpage
>   myvariable := #1 ;
>   path p;
> numeric n, u;
> u := 1cm;
> n:=myvariable*u;
> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> draw p;
> \stopMPpage
> }
> \stoptext
> 
> Fabrice.
> 
> 
> ___
> 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] Metapost Animation of Sine

2021-07-21 Thread Otared Kavian
Hi, 

I wonder whether something like the following is what you are looking for:

% begin wave-sine.tex
\usemodule[animation]
\setupinteraction[state=start]
\starttext
\startTEXpage[offset=2pt]
\startanimation[menu=yes,framerate=10]
\dorecurse{100}{\expanded
{\startframe
\startMPcode
numeric u, omega, mylength, tt ;
u := 2cm ;
omega := 4 ;
mylength := 3.141596 ;
tt := \recurselevel ;
path p ;
p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 upto 
100 : 
.. 
(((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) 
endfor ;
draw p withpen pencircle scaled .5pt withcolor darkred ;
\stopMPcode
\stopframe}
}
\stopanimation
\stopTEXpage
\stoptext
% end wave-sine.tex

Best regards: OK

> On 21 Jul 2021, at 19:44, Jeroen  wrote:
> 
> I am looking for a sine animation as the one file f.pdf on this site
> 
> http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm
> 
> Jeroen
> 
> Op wo 21 jul. 2021 om 17:54 schreef Fabrice L :
> Hi,
> 
>> Le 21 juill. 2021 à 10:08, Jeroen  a écrit :
>> 
>> I use this small animation to enlarge a circle
>> 
>> 
>> \usemodule[animation]
>> \setupinteraction[state=start]
>> \starttext
>> \startanimation[menu=yes,framerate=10]
>> \dorecurse{7}{\expanded
>>   {\startframe
>> \startMPcode
>> path p;
>> numeric n, u;
>> u := 1cm;
>> n:=\recurselevel*u;
>> p := fullcircle scaled n;
>> draw p;
>> \stopMPcode
>>   \stopframe}}
>> \stopanimation
>> \stoptext
>> 
>> 
>> This I use to draw a sine
>> 
>> 
>> \starttext
>> \startMPcode
>>   draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
>> (i/360*1.5cm,0.9cm*(sind(i)))endfor;
>> \stopMPcode
>> \stoptext
>> 
>> 
>> When I put it together to animate the sine as following, it does not 
>> entirely create the sine animation I am looking for
>> 
>> 
>> \usemodule[animation]
>> \setupinteraction[state=start]
>> \starttext
>> \startanimation[menu=yes,framerate=10]
>> \dorecurse{7}{\expanded
>>   {\startframe
>> \startMPcode
>> path p;
>> numeric n, u;
>> u := 1cm;
>> n:=\recurselevel*u;
>> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
>> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
>> draw p;
>> \stopMPcode
>> \stopframe}}
>> \stopanimation
>> \stoptext
>> 
>> 
>> What better way can I create a sine animation with Metapost?
>>  
>> 
> 
> Here is another way to do your animation. This is doing something, but I 
> guess not what you want. Could you describe what do you have in mind ?
> 
> \starttext
> \dorecurse{7}{ % 3180
> \startMPpage
>   myvariable := #1 ;
>   path p;
> numeric n, u;
> u := 1cm;
> n:=myvariable*u;
> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> draw p;
> \stopMPpage
> }
> \stoptext
> 
> Fabrice.
> 
> 
> ___
> 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
___


[NTG-context] Hyphens broken with lucidaot

2021-06-30 Thread Otared Kavian
Hi Hans,

I noticed that with the recent LMTX version 2021.06.27 16:59 the hyphens do not 
show up correctly with lucidaot.
Here is a minimal example and the resulting PDF

\setupbodyfont[lucidaot,10pt]
\startTEXpage
c'est-à-dire

sous-ensemble

sous-préfet
\stopTEXpage

Best regards: Otared



hyphen-lucidaot.pdf
Description: Adobe PDF document
___
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] simplifying repeated macro calls in metafun

2021-06-22 Thread Otared Kavian
Dear Dalyoung, dear Mikael

Thank you both for your explanations: indeed this « whatever » command in 
MetaPost is magic and very useful (I am not sure whether it is a command only 
in MetaFun, or it exists also in the original MetaPost).

Regarding the way Aditya uses \startuseMPgraphic, it is also very instructive. 
Dalyoung, can you also share the animation example for the foldings ? I am sure 
we are a few on the list to learn something…

Best regards: Otared

> On 21 Jun 2021, at 23:50, Jeong Dal  wrote:
> 
> 
> Dear Otared,
> 
> I received list mail in condensed form, I didn’t see your mail before I sent 
> one.
> 
> As Mikael explained, “whatever” is very nice to find the intersection point 
> of two lines.
> You can see nice examples which use “whatever” in MetaFun manual.
> 
> In my code, the next point is the intersection point of the edge and the 
> folding line which bisect the angle of the former folding line [M,N].
> 
> H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
> 
> Enjoy the use of “whatever”!
> 
> I made an animation of the folding process using animation module and 
> \processMPbuffer.
> But Woldgang’s code showed a way to make it using \startuseMPgraphic.
> 
> 
> Best regards,
> 
> Dalyoung
> ___
> 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] simplifying repeated macro calls in metafun

2021-06-21 Thread Otared Kavian
Hi Mikael,

Thank you so much for the explanation: I am ashamed for not having read this in 
the MetaPost manual.

Just to make sure whether I am beginning to understand, in your example code

> z3 = whatever[z1,z2] = z0+whatever*dir(angle(z1-z0)+90));

should the second « whatever » be 

z0 + whatever*dir(angle(z2 - z1) + 90)) ;

or am I proving that I have not yet understood this wonderful command ?

Thanks again and best regards: Otared

> On 21 Jun 2021, at 14:21, Mikael Sundqvist  wrote:
> 
> Hi,
> 
> As is written in the MetaPost manual: Whatever generates a new
> anonymous variable each time it is used. It is very useful in cases
> where you are not interested in the value of a variable, but want to
> use it to (let MP) calculate something. Example
> 
> you have three points z0, z1, z2 forming a triangle, and you want to
> find where the altitude from z0 is intersecting the line between z1
> and z2. You can find that intersection z3 by writing
> 
> z3 = whatever[z1,z2] = z0+whatever*dir(angle(z1-z0)+90));
> 
> The first equality says only that z3 should be on the line between z1
> and z2, the second one says that z3 should be on the line through z0,
> perpendicular to the line between z1 and z2. Since MetaPost solves
> linear equations, this defines z3, and we need not to think more about
> the actual values of the "whatevers" (note that they are not in
> general equal in this example!).
> 
> Hope it helps!
> 
> /Mikael
> 
> 
> On Mon, Jun 21, 2021 at 2:07 PM Otared Kavian  wrote:
>> 
>> Hi Aditya,
>> 
>> Thanks for the detailed file you sent to answer Dalyoung’s question and 
>> file. And going through both files I have a question.
>> I see that both of you use a function « whatever » (but is it a function ?): 
>> what does this do and where can it be used (actually I have seen Hans using 
>> this expression, but I had always thought this is just a name…
>> 
>> Best regards: Otared
>> 
>>> On 21 Jun 2021, at 06:26, Aditya Mahajan  wrote:
>>> 
>>> On Mon, 21 Jun 2021, Jeong Dal wrote:
>>> 
>>>> 
>>>> Hi,
>>>> 
>>>> I defined a macro definition in metafun, and draw figures using 
>>>> \startbuffer[] … \stopbuffer and \processMPbuffer[].
>>>> As you see in the attached code, the same macro definition is used 
>>>> repeatedly by changing the numeric argument.
>>>> Is there a better way to simplify the code, for example, using \dorecurse 
>>>> and recurselevel?
>>> 
>>> See attached. The main idea is to store the repetitive bits in 
>>> \startuseMPgraphic{...} and then reuse them using \includeMPgraphic.
>>> 
>>> 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
>> ___
> ___
> 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] simplifying repeated macro calls in metafun

2021-06-21 Thread Otared Kavian
Hi Aditya,

Thanks for the detailed file you sent to answer Dalyoung’s question and file. 
And going through both files I have a question.
I see that both of you use a function « whatever » (but is it a function ?): 
what does this do and where can it be used (actually I have seen Hans using 
this expression, but I had always thought this is just a name…

Best regards: Otared

> On 21 Jun 2021, at 06:26, Aditya Mahajan  wrote:
> 
> On Mon, 21 Jun 2021, Jeong Dal wrote:
> 
>> 
>> Hi,
>> 
>> I defined a macro definition in metafun, and draw figures using 
>> \startbuffer[] … \stopbuffer and \processMPbuffer[].
>> As you see in the attached code, the same macro definition is used 
>> repeatedly by changing the numeric argument. 
>> Is there a better way to simplify the code, for example, using \dorecurse 
>> and recurselevel?
> 
> See attached. The main idea is to store the repetitive bits in 
> \startuseMPgraphic{...} and then reuse them using \includeMPgraphic. 
> 
> 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] Functionnames disappearing (sometimes)

2021-06-20 Thread Otared Kavian
Hi Hans,

Many thanks !
Yes the new engine fixes the issues.

Best regards: Otared

> On 19 Jun 2021, at 23:27, Hans Hagen  wrote:
> 
> On 6/19/2021 10:01 PM, Otared Kavian wrote:
>> Hi,
>> I don’t know whether the issue reported by Mikael S. is related to the 
>> following: since last week (I guess) some math sympbols are not shown 
>> either, such as \bigcap and \bigcup, even using version 2021.06.18 23:37. An 
>> example is:
>> \starttext
>> $A \cup B = X \cap Y$
>> \startformula
>> A \bigcup B = X \bigcap Y
>> \stopformula
>> \stoptext
> it's a bug i introduced in the engine .. you can try a newer bin from:
> 
> https://dl.contextgarden.net/build/luametatex/
> 
> 
> -
>  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] Functionnames disappearing (sometimes)

2021-06-19 Thread Otared Kavian
Hi,

I don’t know whether the issue reported by Mikael S. is related to the 
following: since last week (I guess) some math sympbols are not shown either, 
such as \bigcap and \bigcup, even using version 2021.06.18 23:37. An example is:

\starttext
$A \cup B = X \cap Y$
\startformula
A \bigcup B = X \bigcap Y
\stopformula
\stoptext

Best regards: Otared

> On 19 Jun 2021, at 13:12, Hans Hagen  wrote:
> 
> On 6/18/2021 1:27 PM, Mikael Sundqvist wrote:
>> Hi,
>> It seems that
>> \setupmathematics[
>> functionstyle=normal,
>> ]
>> is the problematic one here (it is needed(?) in the Neo Euler case to
>> have function names set upright). The following file shows the problem
>> as well:
>> %%%
>> \setupmathematics[
>> functionstyle=normal,
>> ]
>> \starttext
>> We have $\cos\alpha$, $\sin\alpha$, $\tan\alpha$,
>> \startformula
>> \cos\alpha=\frac{a}{c},\quad
>> \sin\alpha=\frac{b}{c},\quad
>> \tan\alpha=\frac{\sin\alpha}{\cos\alpha}=\frac{b}{a}.
>> \stopformula
>> \stoptext
>> %%%
>> I had a backup of the file I was working on, and the problem was not
>> present on june 13 (not sure I had a completely updated ConTeXt by
>> then).
> fixed in next upload (later today)
> 
> 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
> ___

___
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] mathfun

2021-05-21 Thread Otared Kavian
Hi Hans,

Thanks for the new features you have introduced in the module mathfun.
Actually I have been using commands such as the one mentioned by Aditya,
\ctxlua{myfunction(args)}
but for the formatting of the output, that is when one wants only 3 or four 
decimal digits, that approach is not very handy.
So I will use the new feature and I’ll put it on the wiki once I have a few 
interesting examples.
By the way, what does 

\complexexpr{123 + new(456,789)}

mean?

Best regards: Otared

> On 21 May 2021, at 17:06, Hans Hagen  wrote:
> 
> On 5/21/2021 4:37 PM, Aditya Mahajan wrote:
>> On Fri, 21 May 2021, Hans Hagen wrote:
>>> I uploaded an lmtx update (only m-mathfun added).
>>> 
>>> Attached a short description of this (windy stormy friday afternoon) math
>>> experiment. The question is, what similar features using this trickery come 
>>> to
>>> mind.
>> Personally, I can see occasionally making use of this instead of 
>> \ctxlua{myfunction(args)}. There is a similar library called pgfmath which 
>> is part of the tikz package, which is used quite heavily by the pgfplots 
>> package but also appears to be popular for other purposes:
>> https://tex.stackexchange.com/questions/tagged/pgfmath?tab=Votes
> I guessed right that you would be the first to to react! Anyway, I suppose 
> that you come up with additional demands like:
> 
>\permanent\protected\def\randomized{\thewithproperty\plustwo}
> 
> so that we can do:
> 
>$ \sin(x) = \randomized\sin{2pi} $
> 
> which i'm sure you can figure out by looking at the source.
> 
> 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
> ___

___
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] No math fonts in latest LMTX 2021.05.15 22:45

2021-05-20 Thread Otared Kavian
Thanks Hans ! Everything works fine again (regarding math fonts…).

Best regards: Otared

> On 20 May 2021, at 11:18, Hans Hagen  wrote:
> 
> Hi,
> 
> I uploaded a new version. Hopefully this one is complete.
> 
> 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
> ___

___
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] No math fonts in latest LMTX 2021.05.15 22:45

2021-05-20 Thread Otared Kavian
Hi,

After updating to LMTX version 2021.05.15 22:45 the following does not show any 
math italic font:

\starttext
Let $f(x) := \sin(x)$.
\stoptext

Please, can someone confirm this behavior ?

Many thanks in advance: 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
___


[NTG-context] Error when updating LMTX

2021-05-17 Thread Otared Kavian
Hi Hans,

I just tried to update LMTX, but at the end no format is made and I get the 
message:

error loading file: trac-set.lmt (aborting)resolvers

and I cannot anymore typeset any file.

Best regards: 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] Synctex broken in LMTX ?

2021-05-16 Thread Otared Kavian
Hi Hans and Nicola,

Thank you for your attention and your answers.

As a matter of fact I am aware that when using ConTeXt with TeXShop one has to 
add on the first line

% !TEX useOldSyncParser

and then setup synctex with

\setupsynctex[state=start,method=min]

(or method=max, or just ignoring that part). In the test file I sent this 
morning, I left out that « % !TEX useOldSyncParser » line, but on my machine, 
with or without it the situation does not change.

In fact a few years ago I was in touch with Richard Koch about the issue and we 
exchanged a few emails and testings, after which he added a Special Comment 
menu item for « % !TEX useOldSyncParser ». 
The ConTeXt code for synctex used to work fine, but beginning last year (if I 
remember well) the behaviour became somewhat unstable (again on my machine). It 
seems that the content which goes on the first page of the PDF file remains out 
of synctex when the file is typeset with LMTX. The same TeX file produces the 
correct synctex result when typeset with mkiv from TeXLive 2020 (version 
2020.03.10 14:44).

Indeed, one can compare the « filename.synctex » files obtained with LMTX and 
mkiv, to observe the differences, but I am unable to interpret why those 
differences are there. 
I am sending those files as well as the TeX and PDF files with this message. 
The PDF file I am sending is the one obtained with LMTX, and of course the 
syncing works fine when one uses the synctex file obtained with mkiv (upon 
renaming adequately that file)…

Best regards: Otared



test-synctex-1-lmtx.synctex
Description: Binary data



test-synctex-1-mkiv.synctex
Description: Binary data



test-synctex-1.pdf
Description: Adobe PDF document




test-synctex-1.synctex
Description: Binary data


> On 16 May 2021, at 16:53, Hans Hagen  wrote:
> 
> On 5/16/2021 2:52 PM, Otared Kavian wrote:
>> Hi Hans,
>> I have been noticing for some time that \setupsynctex does not work 
>> properly, at least in TeXShop on MacOS.
>> A « filename.synctex » file is created but on most occasions it does not 
>> contain many lines, and one cannot go from the PDF file to the right 
>> location in the source file.
>> Has something changed in the way synctex used to work ?
>> Below I am sending you a test file with its PDF and .synctex files, for you 
>> to see for yourself. Sorry for the disturbance…
> irr texshoip has soem setting for it (you need to check with Dick) which 
> relates to a change in synctex
> 
> anyway, this whole synctex thing is a mess ... it's rather bound to the way 
> latex does things and way to complex due to these heuristics so it could 
> never work well for context
> 
> the reason you see little in the .synctex file is that context doesn't use 
> the synctec library at all: i produce just what is needed directly, so we 
> have a way more compact output (and also better 'real file'
> tracking, plus avoiding generated stuff in the otr that makes no sense to 
> sync to because it has no file; we also protect styles from being accessed 
> that way)
> 
> now, in my opinion, the biggest drawback of synctex is that one needs to 
> compile it into the editor/viewer. Far better would have been to let the 
> viewer call out to an external program (configurable) that reports back the 
> file and line ... more flexible, better upward compatibility, no need to have 
> the synctex code on board, hardly any code and no fuzzy heuristics to fight
> 
> but I gave up communicating that because i cannot reason with the guy 
> (different wavelengths .. years ago already)
> 
> now, here is something to think about:
> 
> >mtxrun --script synctex --list
> mtx-synctex | invalid synctex log file %a
> 
> >mtxrun --script synctex --list synctex-broken.synctex
> mtx-synctex | begin page: 1
> mtx-synctex | end page: 1
> mtx-synctex | begin page: 2
> mtx-synctex |   [  71  135  177  149] : 9 : ./synctex-broken.tex
> mtx-synctex |   [ 181  135  224  149] : 2 : ./synctex-broken.tex
> mtx-synctex |   [  71  163  290  178] :14 : ./synctex-broken.tex
> mtx-synctex |   [  71  178  290  193] :17 : ./synctex-broken.tex
> mtx-synctex | end page: 2
> mtx-synctex | begin page: 3
> mtx-synctex |   [  71  135  496  149] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  149  496  164] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  163  496  178] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  178  496  193] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  192  496  207] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  207  496  222] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  221  462  236] :21 : ./synctex-broken.tex
> mtx-synctex | end pag

[NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Otared Kavian
Hi Hans,

I have been noticing for some time that \setupsynctex does not work properly, 
at least in TeXShop on MacOS. 
A « filename.synctex » file is created but on most occasions it does not 
contain many lines, and one cannot go from the PDF file to the right location 
in the source file.
Has something changed in the way synctex used to work ?

Below I am sending you a test file with its PDF and .synctex files, for you to 
see for yourself. Sorry for the disturbance…

Best regards: Otared




synctex-broken.synctex
Description: Binary data



synctex-broken.pdf
Description: Adobe PDF document



synctex-broken.tex
Description: Binary data
___
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] \prime is too high

2021-05-10 Thread Otared Kavian
Hi Jairo,

Indeed \prime seems a littl ebit too high, but using the apostrophe sign for 
derivation gives the expected result:


\starttext
$s''$ or $s’$ is fine but not $s^{\prime}$.
\stoptext

(Using LMTX version 2021.05.09 17:14).

Best regards: Otared


> On 9 May 2021, at 02:46, Jairo A. del Rio  wrote:
> 
> The following:
> 
> \starttext
> $s''$ %or $s^{\prime}$
> \stoptext
> 
> gives a too high symbol in ConTeXt LMTX 2021.05.06 23:35. ConTeXt MkIV isn't 
> affected for such an issue.
> 
> Jairo
> ___
> 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] custom zig zag sidebars

2021-04-29 Thread Otared Kavian
Hi Massi,

Thank you and Hans for this nice feature: is it going to be included in the 
built-in sidebar ?

Best regards: Otared

> On 29 Apr 2021, at 11:52, mf  wrote:
> 
> Il 28/04/21 17:53, Hans Hagen ha scritto:
>> On 4/28/2021 5:27 PM, mf wrote:
>>> Hello,
>>> 
>>> I made an experiment to add alternatives to sidebars (see attachment).
>>> 
>>> I discovered the sidebar is drawn by anch_sidebars_draw in 
>>> metapost/context/base/mpiv/mp-apos.mpiv.
>>> 
>>> I've redefined it locally to add alternatives.
>>> 
>>> To make fancy, zig zag bars I defined a macro, draw_pattern_bar, that draws 
>>> a bar repeating a pattern which is a path connecting (0,0) and (1,0).
>>> 
>>> The macro has 3 parameters (actually it has more params, but the remainder 
>>> are anch_sidebars_draw params):
>>> 
>>> - a pattern, which is a path from (0,0) to (1,0) that should have a 
>>> vertical size = 1; it's a sort of waveform
>>> 
>>> - a pattern length, by which the pattern is xsized
>>> 
>>> - a pattern width, by which the pattern is ysized
>>> 
>>> Then the pattern is rotated along the bar direction (so -90 degrees) and 
>>> drawn many times until it covers the bar length.
>>> 
>>> A proposal and a question:
>>> 
>>> - patternlength and patternwidth could become \setupsidebar params; 
>>> alternative (=2,3,4...) could be used to specify the pattern (a sort of 
>>> waveform); currently alternative=0 is a solid bar and alternative=1 is a 
>>> dashed one
>>> 
>>> - in case of long patterns (a patternlength spanning more lines of text) 
>>> the last replica of the pattern should be clipped not to exceed the last 
>>> line of the sidebarred text (see the last example): how can that be done?
>> how about
>> def draw_pattern_bar(expr a, b, pattern, patternlength, patternheight, 
>> linewidth, linecolor) =
>>draw image (
>>begingroup ;
>>save p, q, stp ;
>>pair p, q, stp ;
>>stp := ( ( b - a ) / arclength( a -- b ) ) * patternlength ;
>>path q ; q := pattern xscaled patternlength yscaled patternheight 
>> rotated (angle(stp)) ;
>>p := a ;
>>forever :
>>draw
>>q shifted p
>>withpen pencircle scaled linewidth
>>withcolor linecolor ;
>>p := p + stp ;
>>exitif arclength( a -- p ) > arclength( a -- b ) ;
>>endfor ;
>>endgroup ;
>>clip currentpicture to
>>(xpart llcorner currentpicture, ypart b) --
>>(xpart lrcorner currentpicture, ypart b) --
>>(xpart urcorner currentpicture, ypart a) --
>>(xpart ulcorner currentpicture, ypart a) -- cycle ;
>>) ;
>> enddef ;
> Thank you, Hans.
> 
> To save this example, I wikified \setupsidebar, \definesidebar and 
> \startsidebar...\stopsidebar.
> 
> If you do something on alternatives, let me know.
> 
> Massi
> ___
> 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] arm osx

2021-04-11 Thread Otared Kavian
Hi,

Thank you Mojca and Hans for the new binary for MacOS ARM: yesterday I 
installed it on my new MacBook Pro ARM and everything works like a charm.

Just for the persons who run into difficulties when running
sh install.sh
and see that MacOS 11 prevents mtxrun to run properly, in the Finder you should 
find the file

context-osx-arm64/bin/mtxrun

and then you press Control while clicking on it. You’ll see a pop up window, 
and you choose Open, and when the Finder tells you whether you really want to 
open that file, you say YES…
After this, the install script does what it has to do and you don’t need 
anymore to authorize mtxrun to run.

Best regards: Otared

> On 10 Apr 2021, at 17:21, Hans Hagen  wrote:
> 
> Hi,
> 
> Thanks to Mojca's persistent efforts we now generate arm osx binaries on the 
> build infrastructure, so lmtx now ships native arm bins for apples. There are 
> also intel solaris builds now but no installers for those platforms (yet).
> 
> 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
> ___

___
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] lmtx update / teaser

2021-03-01 Thread Otared Kavian
Hi Hans,

Thank you for the new upload.

The teaser examples work fine, many thanks !
I have a question though: how can one center within a page a text, for example 
typeset in a circular shape? I tried with \startalignment, and also with 
\startplacefigure but none of these gives a centered circular shape.

Also I noticed that if one removes the comment at the end of 
\startshapedparagraph, or add a blank line after that, then the circular shape 
is destroyed: is this on purpose ?

Best regards: Otared

% begin example-circular-shape.tex
\starttext

%\startuseMPgraphic{circle}
%   lmt_parshape [
%   path   = fullcircle scaled 136mm,
%   offset = 2mm,
%   bottomskip = - 1.5LineHeight,
%   ] ;
%\stopuseMPgraphic

\startuseMPgraphic{circleBis}
lmt_parshape [
path   = fullcircle scaled 90mm,
offset = 2mm,
bottomskip = - 1.5LineHeight,
] ;
\stopuseMPgraphic

\startalignment[middle]
%\startplacefigure[align=middle,number=no]
\start
\startshapedparagraph[list=circle,mp=circleBis,repeat=yes,method=repeat]%
\setupalign[verytolerant,stretch,last]
\dontcomplain
{\darkred \samplefile{thuan}}
\stopshapedparagraph
\stop
%\stopplacefigure
\stopalignment 

\stoptext
% end example-circular-shape.tex

> On 1 Mar 2021, at 15:44, Hans Hagen  wrote:
> 
> Hi,
> 
> I uploaded a new lmtx. As I'm currently going through the metafun todo files 
> I ended up at the fancy shape part (parshapes) running over multiple 
> paragraphs and decided to provide a (kind of low level) interface that 
> integrates that. The example code is a few decades old but still works ok (i 
> might try to improve them a bit some day). Anyway, here is a teaser:
> 
> \starttext
> 
> \startuseMPgraphic{circle}
>lmt_parshape [
>path   = fullcircle scaled 136mm,
>offset = 2mm,
>bottomskip = - 1.5LineHeight,
>] ;
> \stopuseMPgraphic
> 
> \start
> \startshapedparagraph[list=circle,mp=circle,repeat=yes,method=cycle]%
>\setupalign[verytolerant,stretch,last]\dontcomplain
>{\darkred \samplefile{tufte}}\par
>{\darkgreen   \samplefile{tufte}}\par
>{\darkblue\samplefile{tufte}}\par
>{\darkcyan\samplefile{tufte}}\par
>{\darkmagenta \samplefile{tufte}}\par
> \stopshapedparagraph
> \stop
> 
> \page
> 
> \start
> \startshapedparagraph[list=circle,mp=circle,repeat=yes,method=repeat]%
>\setupalign[verytolerant,stretch,last]\dontcomplain
>{\darkred \samplefile{tufte}}
>{\darkgreen   \samplefile{tufte}}
>{\darkblue\samplefile{tufte}}
>{\darkcyan\samplefile{tufte}}
>{\darkmagenta \samplefile{tufte}}
> \stopshapedparagraph
> \stop
> 
> \stoptext
> 
> The interface is still somewhat rough (no grouping for instance, not a real 
> envrionment so that might change) but seems to work ok. One can also go the 
> tex route and say:
> 
> \startparagraphshape[test]
>left 1mm right 1mm
>left 2mm right 2mm
>left 3mm right 3mm
>copy 8
>left 4mm right 4mm
>left 5mm right 5mm
>left 5mm hsize 10cm
> \stopparagraphshape
> 
> or
> 
> \startparagraphshape[test]
>left 1mm right 1mm
>right 3mm
>left 5mm right 5mm
>repeat
> \stopparagraphshape
> 
> or
> 
> \startparagraphshape[test]
>both 1mm both 2mm both 3mm both 4mm both 5mm both 6mm
>both 7mm both 6mm both 5mm both 4mm both 3mm both 2mm
> \stopparagraphshape
> 
> or
> 
> \startparagraphshape[test-repeat]
>both 1mm both 2mm both 3mm both 4mm both 5mm both 6mm
>both 7mm both 6mm both 5mm both 4mm both 3mm both 2mm
>repeat
> \stopparagraphshape
> 
> and use that with:
> 
> \startshapedparagraph[list=test]
>\dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
> \stopshapedparagraph
> 
> or
> 
> \startshapedparagraph[list=test-repeat]
>\dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
> \stopshapedparagraph
> 
> Some more info is in the lowlevel-paragrsph document (part of the low level 
> series).
> 
> This kind of features falls into the category 'fancy' (no one reqtested it), 
> nice for posters and covers. It might evolve depending on needs for fancy 
> features, but as said, it's currently a side track of metafun, so it's also 
> in the category 'fun'. It's code for 'controlled' usage.
> 
> 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  : 

Re: [NTG-context] \blackrule and margin

2021-02-23 Thread Otared Kavian
Sorry, I didn't send the correct example…

\setuppapersize[A8,landscape]
\setuplayout[leftmargin=2.5cm,
 leftmargindistance=0.2cm,
 backspace=2.9cm,
 width=4cm]
\showframe
\starttext
\margintext{\hairline}\dontleavehmode\hairline

\startformula
\margintext{Me}
a^n + b^n = c^n.
\stopformula
\stoptext

> On 23 Feb 2021, at 11:28, Ursula Hermann  wrote:
> 
> Dear Pablo!
> 
> I have done some changes. How can I get both hairlines in the same height: 
> 
> \setuppapersize[A8,landscape]
> \setuplayout[leftmargin=2.5cm,
>  leftmargindistance=0.2cm,
>  backspace=2.9cm,
>  width=4cm]
> \showframe
> \starttext
> \margintext{\hairline\\{Me}}
> \hairline
> \startformula
> a^n + b^n = c^n.
> \stopformula
> \stoptext
> 
> Thank you
> Uschi 
> 
> 
> 
> Von: ntg-context  im Auftrag von Pablo Rodriguez 
> 
> Gesendet: Freitag, 19. Februar 2021 16:41
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] \blackrule and margin
>  
> On 2/19/21 4:02 PM, Ursula Hermann wrote:
> > Dear List, 
> > i have the little following example: 
> >
> > \setuppapersize[A8,landscape]
> > \setuplayout[leftmargin=2.5cm,
> >  leftmargindistance=0.2cm,
> >  backspace=2.9cm,
> >  width=4cm]
> > \showframe
> > \starttext
> > \blackrule
> > \margintext{Me}
> > \blackrule[color=black, height=0.5ex, width=1cm]
> > \stoptext
> > \startformula
> > a^n + b^n = c^n.
> > \stopformula
> > \stoptext 
> > What i want is a\blackrule over the margintext, but i do not get what I
> > wantend. 
> 
> Hi Uschi,
> 
> I don’t know whether this is similar to whay you might intend:
> 
> \setuppapersize[A8,landscape]
> \setuplayout[leftmargin=2.5cm,
>  leftmargindistance=0.2cm,
>  backspace=2.9cm,
>  width=4cm]
> \showframe
> \starttext
> \blackrule
> \margintext{\blackrule[color=black, height=0.5ex, width=1cm]\\Me}
> \startformula
> a^n + b^n = c^n.
> \stopformula
> \stoptext
> 
> BTW, it isn’t also clear to me whether the formula is part of your
> document or not.
> 
> Just in case it helps,
> 
> 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
> ___
> ___
> 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] \blackrule and margin

2021-02-23 Thread Otared Kavian
Hi Uschi,

You may add \dontleavehmode at the right place as in the following:

\setuppapersize[A8,landscape]
\setuplayout[leftmargin=2.5cm,
 leftmargindistance=0.2cm,
 backspace=2.9cm,
 width=4cm]
\showframe
\starttext
\margintext{\hairline\\{Me}}\dontleavehmode\hairline
\startformula
a^n + b^n = c^n.
\stopformula
\stoptext

Best regards: Otared

> On 23 Feb 2021, at 11:28, Ursula Hermann  wrote:
> 
> Dear Pablo!
> 
> I have done some changes. How can I get both hairlines in the same height: 
> 
> \setuppapersize[A8,landscape]
> \setuplayout[leftmargin=2.5cm,
>  leftmargindistance=0.2cm,
>  backspace=2.9cm,
>  width=4cm]
> \showframe
> \starttext
> \margintext{\hairline\\{Me}}
> \hairline
> \startformula
> a^n + b^n = c^n.
> \stopformula
> \stoptext
> 
> Thank you
> Uschi 
> 
> 
> 
> Von: ntg-context  im Auftrag von Pablo Rodriguez 
> 
> Gesendet: Freitag, 19. Februar 2021 16:41
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] \blackrule and margin
>  
> On 2/19/21 4:02 PM, Ursula Hermann wrote:
> > Dear List, 
> > i have the little following example: 
> >
> > \setuppapersize[A8,landscape]
> > \setuplayout[leftmargin=2.5cm,
> >  leftmargindistance=0.2cm,
> >  backspace=2.9cm,
> >  width=4cm]
> > \showframe
> > \starttext
> > \blackrule
> > \margintext{Me}
> > \blackrule[color=black, height=0.5ex, width=1cm]
> > \stoptext
> > \startformula
> > a^n + b^n = c^n.
> > \stopformula
> > \stoptext 
> > What i want is a\blackrule over the margintext, but i do not get what I
> > wantend. 
> 
> Hi Uschi,
> 
> I don’t know whether this is similar to whay you might intend:
> 
> \setuppapersize[A8,landscape]
> \setuplayout[leftmargin=2.5cm,
>  leftmargindistance=0.2cm,
>  backspace=2.9cm,
>  width=4cm]
> \showframe
> \starttext
> \blackrule
> \margintext{\blackrule[color=black, height=0.5ex, width=1cm]\\Me}
> \startformula
> a^n + b^n = c^n.
> \stopformula
> \stoptext
> 
> BTW, it isn’t also clear to me whether the formula is part of your
> document or not.
> 
> Just in case it helps,
> 
> 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
> ___
> ___
> 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

2021-02-20 Thread Otared Kavian
Hi Hans,

Thanks for the new upload.

For your information, I would like to report that the metafun.tex file typesets 
almost corretly (actually I often typeset it for testing a new upload…) but I 
get a PDF with 400 pages instead the 448 you are mentionning…
The issues are typically some figures not showing up (for instance figures 13.1 
upto 13.13 in chapter 13).

If you think this may be useful for you, I can send you off list the PDF I get 
on MacOS 10.14.6 and today's release of LMTX.

Best regards: Otared

> On 20 Feb 2021, at 17:27, Hans Hagen  wrote:
> 
> Hi,
> 
> When making sure that the metafun manual processes with lmtx (where we have 
> sometimes different implementations of macros) I also checked performance.
> 
> When we started with this manual, it was still MKII time so we either had 
> direct calls or inbetween calls. Especially multiple runs could take a while 
> (many minutes, iir some 15 depending on how it was run). That was no fun.
> 
> In mkiv with luatex and the built in mp library this dramatically went down 
> to 18.1 seconds for one run and 14.2 seconds for luajittex, for 428
> pages.
> 
> This not bad considering that a lots of features are used: thousands of mp 
> images, a bunch of external images, many fonts, plenty of buffers, 
> positioning, color, hyperlinks, backgrounds etc. This document uses plenty of 
> lua so that is why we gain a lot with luajittex.
> 
> In lmtx where we dropped jit and have a less performing backend we expect to 
> need more runtime but in the meantime we're quite okay. Not only the engine 
> is faster, but also some low level macros benefit a bit from new features. I 
> don't know how much lua speedup plays a role but probably not that much. For 
> 448 pages (some 20 more than we had before) we now need 16.5 seconds and 15.7 
> when we use the compact font mode. So we're halfway between luatex and 
> luajittex now. More than 3 seconds of the runtime is for metapost. (I use the 
>  machine as before.)
> 
> Hans
> 
> PS. If all the stories are true is should be 1 second on a modern apple at 
> which point differences in measurements become noise but I cannot check that. 
> Some day I might check it on a rpi 4.
> 
> -
>  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
> ___

___
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] \showmathcharacters, mk ii, how can I get the list, is not working!!

2021-02-16 Thread Otared Kavian
Hi Uschi,

Maybe you need to get all math commands which result in a special character: in 
this case you may use the following, and uncomment other commands below to see 
what they give you.

\usemodule[s-math-coverage]
% \setupbodyfont[lucidaot] % Put here the font you are going to use

\starttext

% \showmathalphabets  \page
% \showmathcharacters \page
% \showmathscripts\page
% \showmathbold   \page

\showmathentities   \page

\stoptext

Best regards: Otared

> On 16 Feb 2021, at 15:07, Ursula Hermann  wrote:
> 
> Dear List, 
> I would like to know, what i can do, to geht all Math macros with MkII : 
> \showmathcharacters in my Editor: WinEdt. I tried to compile it, but there is 
> a mistake. I tried with \starttext and \stoptext, didn't work. 
> 
> Command Line:   context.exe --synctex=-1 "Math 2.tex"
> Startup Folder: C:\Users\Administrator
> resolvers   | formats | executing runner 'run luatex format': 
> C:/texlive/2020/bin/win32/luatex --jobname="Math 2" 
> --fmt=C:/texlive/2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.fmt
>  
> --lua=C:/texlive/2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui
>  cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./Math 2.tex" 
> --c:input="./Math 2.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:synctex="-1" 
> --c:texmfbinpath="C:/texlive/2020/bin/win32"
> This is LuaTeX, Version 1.12.0 (TeX Live 2020/W32TeX) 
>  system commands enabled.
> open source > level 1, order 1, name 
> 'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
> system  > 
> system  > ConTeXt  ver: 2020.03.10 14:44 MKIV beta  fmt: 2021.1.18  
> int: english/english
> system  > 
> system  > 'cont-new.mkiv' loaded
> open source > level 2, order 2, name 
> 'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
> system  > beware: some patches loaded from cont-new.mkiv
> close source> level 2, order 2, name 
> 'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
> system  > files > jobname 'Math 2', input './Math 2', result 'Math 2'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> system  > synctex functionality is enabled, expect 5-10 pct runtime 
> overhead!
> open source > level 2, order 3, name 'C:/Users/Administrator/Math 2.tex'
> 
> tex error   > tex error on line 1 in file C:/Users/Administrator/Math 
> 2.tex: ! Undefined control sequence
> 
> l.1 \showmathcharacters
>  
> 
> 1 >>  \showmathcharacters 
> 
> mtx-context | fatal error: return code: 1
> 
> 
> _
> 
>  ConTeXt Compilation Report (Pages: 0)
> 
>  Errors: 1   Warnings: 0   Bad Boxes: 0
> ___
> 
> Many thanks
> Uschi Hermann 
> ___
> 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] composing commands

2021-02-09 Thread Otared Kavian
Hi Hans,

Thanks for the new composing commands. I made several tests and everything 
works great.
I guess when you say something like

> \withgrave   {a} == \\`{a}

you mean

\withgrave   {a} == \`{a}

(this is what I tested…).
Regarding the characters æ and œ, the command \chr produces them correctly, 
that is

\chr{ae} \chr{AE}
\chr{oe} \chr{OE}

produce

æ Æ
œ Œ

as expected.
If you think these commands are to stay, please tell me if they have to be on 
the wiki.

Best regards: Otared

> On 8 Feb 2021, at 10:53, Hans Hagen  wrote:
> 
> On 2/6/2021 11:41 PM, T. Kurt Bond wrote:
> 
>> I think that it would be useful.  I use Unicode characters extensively in my 
>> ConTeXt input, but only because I edit it in Emacs and can set up keymaps 
>> that map to the Unicode characters in a way that I can actually remember.  I 
>> think that this would add an easily remembered way for people to add 
>> combining characters to their documents.  Sometimes a slightly more verbose 
>> way to do something is helpful when it is more easily remembered.  
>> (Honestly, I can't remember the hex codes for any Unicode characters after 
>> you get out of the range that maps to plain ASCII
> I anyway uprgade this mechanism. First of all, the short commands will be 
> equivalents to more verbose ones.
> 
> \withgrave   {a} == \\`{a}
> \withacute   {a} == \\'{a}
> \withcircumflex  {a} == \\^{a}
> \withtilde   {a} == \\~{a}
> \withmacron  {a} == \\={a}
> \withbreve   {e} == \\u{e}
> \withdot {c} == \\.{c}
> \withdieresis{e} == \\"{e}
> \withring{u} == \\r{u}
> \withhungarumlaut{u} == \\H{u}
> \withcaron   {e} == \\v{e}
> \withcedilla {e} == \\c{e}
> \withogonek  {e} == \\k{e}
> 
> Did I miss one?
> 
> Then we can deprecate the short ones (keep them a low profile, with 
> permission to overload). After all, I don't expect someone who needs lots of 
> them to use these commands, so more verbose is better then. Aas I already 
> mentioned, in bib files they are treated differently already.
> 
> The low level helper is \chr, that can be used as
> 
> \chr {à} \chr {á} \chr {ä}
> \chr {`a} \chr {'a} \chr {"a}
> \chr {a acute} \chr {a grave} \chr {a umlaut}
> \chr {aacute}  \chr {agrave}  \chr {aumlaut}
> 
> (I can add more of the verbose, like {cyrillic a} if really needed. It means 
> that we can declare \eacute etc also depricated (these verbose names date 
> from \MKII, encoding neutral labels, utf handling, remapping to backend 
> encodings etc but we don't need that and I'm not sure if anyone ever used 
> those long names. Again, depricated, not removed (yet).)
> 
> Then there is the question what to do with \AE and \ij and such ... these 
> were used to enforce specific ligatures into a file assuming that f ont has 
> them but nowadays that's the job of a font handler (script language control). 
> We can keep them but assume them legacy. They normally don't belong in input. 
> (Being Dutch I actually never used \IJ or \ij).
> 
> Now, we can assume that when your languages needs characters with accents 
> that you use a font that has them. In MKIV and LMTX one can
> enable a checker
> 
> \enabletrackers[fonts.missing]
> \enabletrackers[fonts.missing=replace]
> \enabletrackers[fonts.missing=remove]
> 
> but in LMTX it's upgraded with more clever replacements (Jano will document 
> that + more about checking missing stuff in the wiki).
> 
> So, in LMTX we have more options (maybe I'll backport that to MKIV)
> 
> \checkmissingcharacters   \enabletrackers[fonts.missing]
> \removemissingcharacters  \enabletrackers[fonts.missing=remove]
> \replacemissingcharacters \enabletrackers[fonts.missing=replace]
> \handlemissingcharacters  \enabletrackers[fonts.missing={decompose,replace}]
> 
> the last one will inject decomposed characters into the list when font lacks 
> the real thing. The replacements visualize similar to MKIV but adapt to the 
> style.
> 
> Hans
> 
> (no upload yet)
> 
> -
>  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
> ___

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

Re: [NTG-context] composing commands

2021-02-05 Thread Otared Kavian
On 5 Feb 2021, at 22:30, Hans Hagen  wrote:
> […]
> Is this ok for you?
> 
> tex error   > tex error on line 6 in file ./oeps.tex: Undefined control 
> sequence
> 
>  \v
> 
> 4
> 5 \starttext
> 6 >>  \v
> 7 \stoptext
> 8

In that case the error message could say 

tex error   > tex error on line 6 in file ./oeps.tex: Undefined control 
sequence: if you really mean it, then
tex error   > add \usemodule[oldschool] at the begiining of your file…

 \v
___
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] composing commands

2021-02-05 Thread Otared Kavian
Hi Hans,

I agree that nowadays most composed characters can be input directly from the 
keyboard (at least judging from my experience with MacOS), but nevertheless it 
may happen that one uses an old file used as an input source file (for instance 
extracting a math exercise from a database) in which there are old fashion 
composed characters. It would be hard to go back and replace those characters 
in each file.
Besides, with the traditional plain TeX composed characters something like

\"c

would give a correct result (the character c with a kind of umlaut on top of 
it), but this cannot be input from the keyboard (and maybe it does not exist at 
all in UTF…). (Actually I just tried \"c with LMTX and mkiv and it does not 
give what is expected from TeX… I am sure it did work some years ago :-) )

If, as you suggest, such composed characters maybe used at the cost of saying 
at the beginning of one's file:
\usemodule[oldschool]
then there is no real harm in removing composing commands, although I am not an 
enthusiastic supporter of removing them.

Best regards: Otared K.

> On 5 Feb 2021, at 17:38, Hans Hagen  wrote:
> 
> Hi,
> 
> As I'm going over the commands in lmtx, I wonder if we should keep
> 
> \c
> \d
> \k
> \r
> \u
> \v
> 
> \"
> \'
> \`
> \^
> 
> etc ... the ones that make 'composed characters'. I think that anyone who 
> needs them uses utf . They can be in (say) m-oldschool.mkxl or so.
> 
> Objections? Hurt feelings? Sentiments?
> 
> 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
> ___

___
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] code 139

2021-01-29 Thread Otared Kavian
Hi Thomas,

Out of curiosity I tested your MWE and I get 

mtx-context | fatal error: return code: 11

with LMTX (version 2021.01.28 18:22), while with mkiv it typesets correctly.

Best regards: Otared

> On 29 Jan 2021, at 14:42, Thomas A. Schmitz  
> wrote:
> 
> 
> On 1/29/21 12:56 PM, Hans Hagen wrote:
>> Hard to say (probably some mem/stack issue) ... you can add a \tracingall 
>> around the place where the last message to the console happens ... i need to 
>> know where it happens (or you can themn make a mwe of that bit).
> 
> OK, here's a minimal example. I defined this environment some years ago and 
> have no clue why I did it this particular way (there must have been a 
> reason), so don't ask me. But it gives the "return code: 139."
> 
> \define[1]\italianpoetry%
> {\framed[frame=off,offset=0pt,strut=no,width=10cm]{\framed[frame=off,strut=no,offset=0pt,width=fit,align=right]{\em
>  #1}}}
> 
> \starttext
> 
> \italianpoetry{
>   Morremo. Il velo indegno a terra sparto,
> }
> 
> \stoptext
> 
> Thomas
> ___
> 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] LMTX isn't typesetting math correctly with Pagella

2021-01-15 Thread Otared Kavian
Hi Jack,I tested your example both with Pagella and Lucida OT: indeed typesetting with the latest LMTX, with Pagella the math italic « f » runs into the right bar of « |f| ».However the result with mkiv is correct.I am attaching the PDF output with LMTX.Best regards: Otared

bar-distance-f.pdf
Description: Adobe PDF document
On 15 Jan 2021, at 13:33, Jack Hill  wrote:
  


  
  Hi,I've been having some trouble with ConTeXt not typesetting math
  correctly when using the Pagella font (I do not know if the same
  issue occurs with other fonts as I haven't tested them).If I compile with LMTX, the spacing between letters becomes very
  small so that when I type "|f|", for example, the second "|"
  intersects the f and looks rather ugly. However, compiling with
  the --luatex switch fixes these issues and the math looks nice
  again.Can anybody else replicate this issue, and does anybody know why
  it is happening?This the code I used to test:

\setupbodyfont[pagella]

\starttext
\startformula
|f| = \sqrt{\int_0^1 |f(t)|^2 \text{d}t}
\stopformula
\stoptext
Jack

  

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


Re: [NTG-context] Randomize order of blocks

2021-01-06 Thread Otared Kavian
Following up my previous message, here is an example:

%% begin shuffled list of exercises
\setuprandomize[2021]

\startluacode
function shuffle(tableau)
local maxsize, t, tt
maxsize = #tableau
tt = {}
t = {}
for i = 1, maxsize do
t[i] = {}
t[i]["columnOne"] = tableau[i]
t[i]["columnTwo"] = math.random(1,100*maxsize)
end
table.sort(t, function(a,b) return a.columnTwo < b.columnTwo 
end)
for i = 1, maxsize do
tt[i] = t[i]["columnOne"]
end
return tt
end
\stopluacode

% We define three arrays
% with the names, the functions and their derivatives
% One could also add a ListOfVariables...

\startluacode

ListOfNames = {
"f",
"g",
"h",
"u",
"v",
"F",
"G",
"H",
}

ListOfFunctions = {
"\\cos(x^2)",
"x\\sin(x)",
"\\tan(x)",
"x^3 - 3x^2 + 1",
"\\frac{1}{1 + x^2}",
"\\sin(\\log(x))",
}

ListOfDerivatives = {
"-2x\\sin(x^2)",
"x\\cos(x) + \\sin(x)",
"1 + \\tan(x)^2",
"3x^2 - 6x",
"\\frac{-2x}{(1 + x^2)^2}",
"\\frac{\\cos(\\log(x))}{x}",
}

\stopluacode

\starttext

% We define a buffer and a shuffled list of integers

\startbuffer[test-derivatives]
\startluacode
ShuffledList = shuffle({1,2,3,4,5,6})
\stopluacode

Let $\cldcontext{ListOfNames[ShuffledList[\recurselevel]]}(x) := 
\cldcontext{ListOfFunctions[ShuffledList[\recurselevel]]}$. Prove that
\startformula
\cldcontext{ListOfNames[ShuffledList[\recurselevel]]}'(x) = 
\cldcontext{ListOfDerivatives[ShuffledList[\recurselevel]]}
\stopformula
\stopbuffer

\dorecurse{6}{\blank[medium]{\bf Exercise #1.}
\getbuffer[test-derivatives]
}

\stoptext

%% end shuffled list of exercises


> On 6 Jan 2021, at 09:41, Otared Kavian  wrote:
> 
> Hi Jairo,
> 
> One can indeed make quizzes and exams with randomized order of problems, 
> randomized values and even randomized names of functions and variables.
> I have some examples which I have been using for several years (they are 
> useful especially in these days of giving exams online…): I can send them to 
> you as they are, or if you tell me what kind of problems you want, then I can 
> adapt my examples before sending them to you.
> 
> Best regards: Otared 
> 
>> On 5 Jan 2021, at 17:18, Jairo A. del Rio  wrote:
>> 
>> Hi, list.
>> 
>> Some time ago I realized ConTeXt has "blocks" which allow one to make 
>> quizzes, exams and related with ease. However, I want to know if there's an 
>> option to randomize their order when printed. Thank you in advance.
>> 
>> Jairo
>> ___
>> 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] Randomize order of blocks

2021-01-06 Thread Otared Kavian
Hi Jairo,

One can indeed make quizzes and exams with randomized order of problems, 
randomized values and even randomized names of functions and variables.
I have some examples which I have been using for several years (they are useful 
especially in these days of giving exams online…): I can send them to you as 
they are, or if you tell me what kind of problems you want, then I can adapt my 
examples before sending them to you.

Best regards: Otared 

> On 5 Jan 2021, at 17:18, Jairo A. del Rio  wrote:
> 
> Hi, list.
> 
> Some time ago I realized ConTeXt has "blocks" which allow one to make 
> quizzes, exams and related with ease. However, I want to know if there's an 
> option to randomize their order when printed. Thank you in advance.
> 
> Jairo
> ___
> 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] dutch calendars 3 months

2021-01-05 Thread Otared Kavian
Best wishes for the new year !

Talking of calendars, this one is even more compact: each year is shown on one 
page, and when changing the year only the three lines where the months are 
shown will change:

http://www.professores.im-uff.mat.br/hjbortol/c1p/?fbclid=IwAR3EkoYjcxA2MCkfWU8J-KqaEReMluNaQ1DPkDNM8dxtWEwnGZ0mXsvQ640

Best regards: Otared

> On 5 Jan 2021, at 11:46, luigi scarso  wrote:
> 
> I guess this is a challenge for Willi :
> a module to typeset "dutch calendars"
> as in 
> https://www.calendari.it/ 
> (I am not involved at all with the site, it's the first I have found )
> 
> I like the slim version, with 3 months, the saint(s) of the day, the moon 
> phases, the week number,
> the day from the beginning and to the end of the year 
> 
> 
> -- 
> luigi
> ___
> 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] Math align not working

2020-12-29 Thread Otared Kavian
Hi Johann,

The example you sent works fine here with LMTX version 2020.12.28 01:41.
Which version of ConTeXt are you using ?

Best regards: Otared

> On 29 Dec 2020, at 14:36, Johann Birnick  wrote:
> 
> Hi there,
> 
> I noticed that Math align is not working properly. In particular I mean the
> alignment. For example, the following code
> 
> 
> \starttext
>  
> 
> \startformula \startalign[m=2,distance=8em,n=5,
> align={right,middle,middle,middle,left}]
> \NC 0 \NC < \NC 2x + 5y \NC < \NC 10
> \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
> \NC 3 \NC < \NC 2y + 3z \NC < \NC 15
> \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
> \stopalign \stopformula
> 
> \stoptext
> 
> 
> is copied from https://dl.contextgarden.net/myway/mathalign.pdf but doesn't
> produce the intended result.
> 
> What's wrong?
> 
> Best regards,
> Johann
> 
> ___
> 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: dotlabel issue in latest LMTX

2020-12-27 Thread Otared Kavian
Hi Hans,

The following (due to you and Aditya, discussed a few days ago) used to work 
with LMTX until version 2020-12-10, but it does not work anymore with LMTX 
version 2020-12-24 17:30. I wonder whether this is due to some changes you have 
made recently.

%% begin squaredot-test.tex
\startMPdefinitions
newpath mydotlabelshape ;
mydotlabelshape := fullcircle ;
mydotlabeldiam := 12 pt ;

vardef mydotlabel@#(expr s,z) text t_ =
label@#(s,z) t_ ;
fill (mydotlabelshape scaled 2mydotlabeldiam) shifted z t_;
enddef ;
\stopMPdefinitions

\starttext
\startMPcode
newpath p ; 
p := (2cm, 3cm) -- (3cm, 5cm);

mydotlabeldiam := 15pt;
mydotlabelshape := fullsquare ;

draw p ;

mydotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
withcolor transparent("exclusion",.5,red) ;
mydotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
withcolor transparent("exclusion",.5,red) ;

\stopMPcode
\stoptext
%% end squaredot-test.tex

I get an error message, which is obscure to me, saying:

%-- begin error message excerpt

metafun > log > error: Isolated expression
metafun > log >
metapost> log > 
metapost> log >  
metapost> log >;
metapost> log > <*> newpath mydotlabelshape ;
metafun > log >
metafun > log > I couldn't find an '=' or ':=' after the expression 
that is shown above this
error message, so I guess I'll just ignore it and carry on.
metafun > log >
metapost> log >   mydotlabelshape := 
fullcircle ; mydotlabeldiam := 12 pt ; vardef mydotlabel@##(expr s,z) text t_ = 
label@##(s,z) t_ ; fill (mydotlabelshape scaled 2mydotlabeldiam) shi...

%-- end error message excerpt

Best regards: 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
___


[NTG-context] freedotlabel not defined in LMTX ?

2020-12-26 Thread Otared Kavian
Hi Hans,

When I was testing your example with freelabel in another thread, I noticed 
that freedotlabel does not work in LMTX.
Here is the code from the Metafun manual which works with ConTeXt version 
2020.06.25 10:55 MKIV, but not with ConTeXt version 2020.12.24 17:30 LMTX.

%% begin freedotlabel.tex
\setupbodyfont[pagella]

\starttext

\startMPcode
pair destination ;
for whereto = "up", "down", "left", "right" :
destination := scantokens(whereto) * 1cm ;
freedotlabel(whereto, destination, origin) ;
drawarrow origin -- destination
withpen pencircle scaled .25mm withcolor .625 red ;
endfor ;
\stopMPcode

\stoptext
%% end freedotlabel.tex

Best regards: 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] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Otared Kavian
Hi Garulfo,

Thank you for sharing your nice example: it typesets correctly with mkiv, but 
it seems to me that with LMTX the text does not appear (at least on my 
installation of the latest LMTX).

Best regards: Otared

> On 24 Dec 2020, at 00:14, Garulfo  wrote:
> 
> Thanks Taco,
> 
> I made some progress :
> https://wiki.contextgarden.net/Talk:Cover_Pages
> 
> I now have two additional questions ... ;-)
> 
> - How can I deal with "space" characters (because current solution
>  requires to explicitly add the ~ character)
> 
> - What would be the work to do in order to make this mechanism directly
>  usable in metapost / metafun, within \startMPpage \stopMPpage,
>  - to avoid switching between \start\stopMPdrawing and TeX
>  - to have something like "draw followtext" in mp-blob.mpiv ?
> 
> 
> 
> %--
> 
> \setuppapersize  [A4]
> 
> %--
> 
> \def\MyFont{\definedfont[name:%
> texgyrepagellabold%
> %exo2black%
> %agaramondprobold%
> *default at 55pt]}
> 
> %--
> 
> \startluacode
> 
> function document.outlinepaths(character)
>local chardata  = fonts.hashes.characters[true] -- by unicode
>local shapedata = fonts.hashes.shapes[true] -- by index
>local c = chardata[character]
>if c and c.index and shapedata then
>local shapeglyphs = shapedata.glyphs or { }
>local glyph   = shapeglyphs[c.index]
>if glyph and (glyph.segments or glyph.sequence) then
>local units  = shapedata.units or 1000
>local factor = 100/units
>return fonts.metapost.paths(glyph,factor)
>end
>end
>return { }
> end
> 
> function document.defineoutline(char,target)
>local outlines = document.outlinepaths(char)
>local nofpaths = #outlines
>context("\\startMPdrawing") -- ADDED by garulfo
>context("path %s[] ;",target)
>context("numeric %sn ; %sn := %s ;",target,target,nofpaths)
>for i=1,nofpaths do
>context("%s[%i] := %s ; ",target,i,outlines[i])
>end
>context("\\stopMPdrawing")  -- ADDED by garulfo
> end
> 
> \stopluacode
> 
> %--
> 
> \def\mpdefineoutlines#1#2{\ctxlua{document.defineoutline(\number`#1,"#2")}}
> 
> %--
> 
> \def\EmptyLetters#1%
> {%
> \resetMPdrawing
> \MPtoks={}
> %
> \startMPdrawing
>  picture pic[], pictA ;
>  numeric wid[], len[], pos[], n ;
>  wid[0] := len[0] := pos[0] := n := 0 ;
>  numeric scaling;
>  path pictB , frame ;
>  pair shiftB ;
>  picture monImageA; monImageA := nullpicture;
>  picture monImageB; monImageB := nullpicture;
>  color colorframe;  colorframe := 0.6white;
> %
> \stopMPdrawing
> %
> \MyFont\handletokens#1\with\whatever
> %
> \startMPdrawing
>  frame :=  unitsquare
>  xscaled ( (xpart urcorner monImageB - xpart llcorner monImageB) + 
> 5mm )
>  yscaled ( (ypart urcorner monImageB - ypart llcorner monImageB) + 
> 5mm );
>  frame := frame shifted (center monImageB - center frame);
>  addto monImageB contour
>frame
>withpostscript "evenodd"
>withcolor transparent (1,1.,colorframe);
>  draw monImageB ;
>  draw monImageA ;
> \stopMPdrawing
> %
> \MPdrawingdonetrue
> \getMPdrawing}
> 
> %--
> 
> \def\whatever#1%
>  {\appendtoks#1\to\MPtoks
>   \setbox\MPbox=\hbox{\MyFont\the\MPtoks}%
>   %
>   \startMPdrawing
> n := n + 1 ; len[n] := \the\wd\MPbox ;
>   \stopMPdrawing
>   %
>   \mpdefineoutlines{M}{MaLettre}
>   %
>   \startMPdrawing
>   pictA := textext.drt("\MyFont M") ;
>   pictB := MaLettre[1];
>   scaling := bbheight pictA / bbheight pictB;
>   \stopMPdrawing
>   %
>   \doifinstringelse{~}{#1}{}{%HOW TO PROPERLY COPE WITH 
> SPACES ?
>   \mpdefineoutlines{#1}{MyGlyph}
>   %
>   \startMPdrawing
> string sb; sb := "i";
> pic[n] := textext.drt("\MyFont\setstrut\strut#1") ;
> %
> shiftB := - llcorner pic[n];
> pic[n] := pic[n] shifted shiftB ;
> %
> wid[n] := abs(xpart urcorner pic[n] - xpart llcorner pic[n]) ;
> pos[n] := len[n]-wid[n] ;
> %
> addto monImageB contour
>   ((MyGlyph[1] scaled scaling)
>   shifted ( (pos[n],0) +  shiftB))
>   withpostscript "collect";
> %
> if MyGlyphn > 1 :
>for ind=2 upto MyGlyphn :
>if (((xpart llcorner MyGlyph[ind]) > (xpart llcorner MyGlyph[1])) 
> and
>((ypart llcorner MyGlyph[ind]) > (ypart llcorner MyGlyph[1])) 
> and
>((xpart urcorner MyGlyph[ind]) < (xpart urcorner MyGlyph[1])) 
> and
>((ypart urcorner MyGlyph[ind]) < (ypart ur

Re: [NTG-context] Problem with \Caps

2020-12-21 Thread Otared Kavian
Hi Joaquín,

Actually it depends on the font you are using, but on th eother hand it seems 
that \Caps is broken in LMTX.
The following gives a correct result in mkiv but results in an error in LMTX:

\setupbodyfont[lucidaot] 

\starttext

Test {\sc Test} {\Caps Test}

{\smallcaps Test}

\meaning\Caps

\stoptext

Best regards: Otared

> On 20 Dec 2020, at 18:59, Joaquín Ataz López  wrote:
> 
> 
> Good day to everyone. I have a problem that may be very simple to solve, but 
> for which I have not found an answer in the wiki.
> 
> Until relatively recently I was using the January 2020 version of ConTeXt 
> Standalone, recently I have updated it to the December 18th version, and when 
> I compile a file that I used to compile well, an error is generated because 
> the \Caps macro is not recognized.
> 
> I can't get the desired effect with \sc, it has to be with \Caps.
> 
> I have tried to compile it with LMTX but there too is considered that \Caps 
> is an undefined control sequence.
> 
> 
> -- 
> Joaquín Ataz López
> Derecho Civil
> Universidad de Murcia
> 
> ___
> 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] Title in enumeration not working?

2020-12-21 Thread Otared Kavian
Hi Mikael,

Indeed you are right about the fact that 

> \startexample[title={Title}]
> ...
> \stopexample

is more logical and also more convenient. 
Sorry for not having checked your example in mkiv, where this structure works 
as intended.
So it might be a small buglet in LMTX.

Best regards: Otared

> On 21 Dec 2020, at 14:06, Mikael Sundqvist  wrote:
> 
> Hi Otared,
> 
> Thank you for your suggestion. I would say yes and no.
> 
> I want the result one gets from what you write, but I prefer the syntax
> 
> \startexample[title={Title}]
> ...
> \stopexample
> 
> and that has been working before. Reading in setup-en.pdf, it also looks to 
> me as if that should work.
> 
> Best,
> 
> Mikael
> 
> On Mon, Dec 21, 2020 at 11:47 AM Otared Kavian  <mailto:ota...@gmail.com>> wrote:
> Hi Mickael,
> 
> Maybe this is what you want:
> 
> \defineenumeration[example]
> [text=Example,
> title=yes,
> titleleft=,
> titleright={.},
> ]
> 
> \starttext
> \startexample{Title} 
> This is a test.
> \stopexample
> \stoptext
> 
> Of course is you say
> text=,
> then you get only « Title » and a number in front of it.
> 
> Best regards: OK
> 
> > On 21 Dec 2020, at 11:05, Mikael Sundqvist  > <mailto:mic...@gmail.com>> wrote:
> > 
> > Hi,
> > 
> > Has anything changed with titles and enumerations? I expected a title 
> > "Title" with the following setup.
> > 
> > \defineenumeration[example][
> >   text=Example,
> >   title=yes,
> > ]
> > 
> > \starttext
> > \startexample[title={Title}]
> > This is a test.
> > \stopexample
> > \stoptext
> > 
> > But it does not show up.
> > 
> > /Mikael
> > 
> > 
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> > 
> > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> > http://www.ntg.nl/mailman/listinfo/ntg-context 
> > <http://www.ntg.nl/mailman/listinfo/ntg-context>
> > webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> > http://context.aanhet.net <http://context.aanhet.net/>
> > archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> > <https://bitbucket.org/phg/context-mirror/commits/>
> > wiki : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <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] Title in enumeration not working?

2020-12-21 Thread Otared Kavian
Hi Mickael,

Maybe this is what you want:

\defineenumeration[example]
[text=Example,
title=yes,
titleleft=,
titleright={.},
]

\starttext
\startexample{Title} 
This is a test.
\stopexample
\stoptext

Of course is you say
text=,
then you get only « Title » and a number in front of it.

Best regards: OK

> On 21 Dec 2020, at 11:05, Mikael Sundqvist  wrote:
> 
> Hi,
> 
> Has anything changed with titles and enumerations? I expected a title "Title" 
> with the following setup.
> 
> \defineenumeration[example][
>   text=Example,
>   title=yes,
> ]
> 
> \starttext
> \startexample[title={Title}]
> This is a test.
> \stopexample
> \stoptext
> 
> But it does not show up.
> 
> /Mikael
> 
> 
> ___
> 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] upload / metafun

2020-12-15 Thread Otared Kavian
Hi Hans,

Thanks for the new upload. 
With your comments, I understand that, following the discussion with Aditya, 
when using the new version I should not define in Metafun a new function named
dotlabel
in order to have a square dot… Actually I called it mydotlabel in order to be 
able to change the shape of the dot, so I will be on the safe side when I can 
download the new version.

However after running install. sh on MacOS, I still get current version: 
2020.12.10 22:26, even after removing the .tma files.
So I guess I have to wait a little bit for the new version to be upoaded.

Best regards: Otared



> On 15 Dec 2020, at 10:35, Hans Hagen  wrote:
> 
> Hi,
> 
> I uploaded a new lmtx. This time some work has been done at the metafun end.
> 
> At the tex end we're working on some overload protection mechanism which 
> involves tagging many macro so that will take a while (most tagging is done 
> but checking left over cases take time).
> 
> So, I wondered if we can do something similar in metapost: flag macros and 
> variables in order to issue a warnings when a dangerous overload happens.
> 
> The current lmtx has this as an experiment: primitives, permanent, immutable 
> and mutable (so far); you can look at the *.mpxl files to get an idea. If you 
> say for instance
> 
>path fullcircle;
> 
> there will be a warning
> 
>   metapost> overloading immutable 'fullcircle'
> 
> or when
> 
>   \enabledirectives[metapost.overloadmode=error]
> 
> has been given you get an error.
> 
> The implementation is rather simple and non intrusive and differs from
> the one in tex. There it is tightly integrated for all kind of reasons 
> (millions of macro definitions per run so efficiency matters). Also, in 
> metapost variables (tags) can have complex name constructions and we only 
> test the top level. When a overload happens (overloadmode internal <> 0) a 
> lua callback takes care of it.
> 
> A side effect is that we can query all hash entries and check for consistency 
> which is what i've done and am doing now. Of course that can introduce issues 
> ... just that you know.
> 
> 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
> ___

___
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] issue with link and margin in LMTX

2020-12-12 Thread Otared Kavian
Hi Pablo, 

I don't know which kind of problems you are having with your example, but it 
seems to me that I get the same result with mkiv and LMTX.

Best regards: Otared

> On 11 Dec 2020, at 19:00, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following sample:
> 
>  \setuppapersize[A9]
>  \setupinteraction[state=start]
>  \enabledirectives[references.border]
>  \unexpanded\def\MyURL#1%
>{\bgroup\goto{{\tt\hyphenatedurl{#1}}}[url(#1)]\egroup}
>  \starttext
>  \startitemize
>  \dorecurse{2}{\item \MyURL{a.b\\/c.d\letterhash e}}
>  \stopitemize
>  \stoptext
> 
> I’m afraid that the link has problems with margin in MkXL (MkIV doesn’t
> have any problems with it).
> 
> Could anyone confirm the issue?
> 
> Many thanks for your help,
> 
> 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
> ___

___
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: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi Aditya,
Thank you very much !
That's great indeed, you gave me an elegant solution.
 
One more question, in order for me to understand a little more: when defining a 
new dotlabel as you do, might it not conflict with the internal definitions of 
dotlabel in Metafun in some other place?
Maybe it is safer for me to call it something like  « dotshapelabel » ?

Best regards and agin many thanks: Otared

> On 10 Dec 2020, at 18:44, Aditya Mahajan  wrote:
> 
> On Thu, 10 Dec 2020, Otared Kavian wrote:
> 
>> Hi all,
>> 
>> In Metafun when representing a point I woul dlike to have some dots 
>> represented by a square (or even by another scalable symbol): for instance 
>> in the following I would like the dot at the point B to be a square:
>> 
>> \starttext
>> \startMPcode
>> draw (2cm,3cm) -- (3cm,5cm) ;
>> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
>>  withpen pencircle scaled 12pt 
>>  withcolor transparent("exclusion",.5,red) ;
>> 
>> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
>>  withpen pencircle scaled 12pt 
>>  withcolor transparent("exclusion",.5,red) ;
>> \stopMPcode
>> \stoptext
>> 
>> I wonder whether it is possible to define something like « drawsquaredot » 
>> or « squaredotlabel » in order to do this.
> 
> dotlabel uses a pen to draw the dot, and I am not sure why it uses that 
> rather than a path. Here is a (to me) simpler definition, where you can 
> change the shape:
> 
> \startMPdefinitions
> newpath dotlabelshape;
> 
> dotlabelshape := fullcircle;
> 
> vardef dotlabel@#(expr s,z) text t_ =
>label@#(s,z) t_ ;
>fill (dotlabelshape scaled 2dotlabeldiam) shifted z t_;
> enddef ;
> \stopMPdefinitions
> 
> \starttext
> \startMPcode
> newpath p ; 
> p := (2cm, 3cm) -- (3cm, 5cm);
> dotlabeldiam := 12pt;
> 
> % Default
> draw p;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> % Using a square "dot"
> p := p shifted (5cm, 0);
> dotlabelshape := fullsquare;
> 
> draw p;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
>withcolor transparent("exclusion",.5,red) ;
> \stopMPcode
> \stoptext
> 
> These types of macros are also a good candidate for the new LMTX syntax, 
> where we can make all components configurable via a key-value interface 
> (labeldistance etc. as well).
> 
> 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
___


[NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi all,

In Metafun when representing a point I woul dlike to have some dots represented 
by a square (or even by another scalable symbol): for instance in the following 
I would like the dot at the point B to be a square:

\starttext
\startMPcode
draw (2cm,3cm) -- (3cm,5cm) ;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
withpen pencircle scaled 12pt 
withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
withpen pencircle scaled 12pt 
withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

I wonder whether it is possible to define something like « drawsquaredot » or « 
squaredotlabel » in order to do this.
If I use for B the command
withpen pensquare scaled 12pt
then the dot is a square, but the label B is drawn in a strange way.

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] 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] 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 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
___


[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] basic issues with formulas

2020-12-03 Thread Otared Kavian
Hi Pablo,

You may use \text in math formulas as in:

 \startitemize[packed]
 \item Valor actual neto: $\text{beneficios} - \text{costes}$.
 \item Beneficio por euro: $\frac{\text{beneficios}}{\text{costes}}$.
 \item Beneficio obtenido el primer año.
 \stopitemize

Best regards: Otared

> On 3 Dec 2020, at 20:48, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> math is all Greek to me and I’m experiencing issues when typesetting the
> most basic inline formulas.
> 
>  \starttext
>  \startitemize[packed]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $\frac{beneficios}{costes}$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
> 
>  \startitemize[packed]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $beneficios - costes$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
> 
>  \startitemize[packed, columns, two]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $\frac{beneficios}{costes}$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
> 
>  \startitemize[packed, columns, two]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $beneficios - costes$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
>  \stoptext
> 
> The issues I’m experiencing are:
> 
> 1. Kernings around ligatures (fi) are wrong.
> 
> 2. Is there a way to enable ligatures?
> 
> 3. Packed works fine with fractions, but packed columns is wrong with
> them. It adds too much space.
> 
> Again, formulas are totally foreign to my work with ConTeXt.
> 
> I don’t know whether they are bugs in latest (2020.01.30 14:13) or there
> is a way to avoid the issues.
> 
> Many thanks for your help,
> 
> 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
> ___

___
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] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Hi Wolfgang,

Thank you for your explanations: I am wondering whether this kind of 
information could go into the wiki, and if yes what would be an appropriate 
title for that page (of course I'll do it).

However the two commands 

\inputfilesuffix
\jobfilesuffix

put inside the file « myfile.tex » do not give the suffix « tex »: shoul dthey 
give « tex » or am I misintrepreting these commands?

Best regards: Otared



> On 1 Dec 2020, at 18:23, Wolfgang Schuster 
>  wrote:
> 
> Otared Kavian schrieb am 01.12.2020 um 18:10:
>> Thanks Hraban, this might be also useful and I'll keep it somewhere on my 
>> mind, but for the project I was asking my question \jobname is enough.
>> 
>> Best regards: Otared
>>> On 1 Dec 2020, at 17:33, Henning Hraban Ramm  wrote:
>>>> Am 01.12.2020 um 16:20 schrieb Otared Kavian :
>>>> 
>>>> Thanks Tomás! Indeed \jobname does the job :-)
>>> In case you need the current component file in a project environment: 
>>> \currentcomponent
> 
> In some case \inputfilename is the better choice, e.g. when you process xml 
> files with a environment file for the style and processing settings.
> 
> context --environment=myxmlstyle myfile.xml
> 
> The following example shows the output of all commands:
> 
> \starttext
> \starttabulate [|T|T|]
> \NC \type{\jobname}   \NC \jobname   \NC\NR
> \NC \type{\jobfilename}   \NC \jobfilename   \NC\NR
> \NC \type{\jobfilesuffix} \NC \jobfilesuffix \NC\NR
> \NC \type{\inputfilename} \NC \inputfilename \NC\NR
> \NC \type{\inputfilebarename} \NC \inputfilebarename \NC\NR
> \NC \type{\inputfilesuffix}   \NC \inputfilesuffix   \NC\NR
> \NC \type{\outputfilename}\NC \outputfilename\NC\NR
> \NC \type{\operatingsystem}   \NC \operatingsystem   \NC\NR
> \stoptabulate
> \stoptext
> 
> 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
> ___

___
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] Context install for Apple Silicon M1 mac mini

2020-12-01 Thread Otared Kavian
Hi Keith,

You may try to copy to your new machine the whole folder where you have 
installed LMTX on your old machine, and then run 
context --make
there. Indeed if this works for your current LMTX folder you'll need someone to 
prepare a whole working folder of updated LMTX. As long as I have a PowerBook 
with the old chip (and running MacOS 14), I may do this for you and then put a 
zip file on Dropbox. However I may be too pushed to get a new M1 PowerBook in 
the future.

Best regards: Otared K.

> On 1 Dec 2020, at 13:01, Keith McKay  wrote:
> 
> Hi,
> 
> I have recently retired my 2012 mac mini in favour of a new Apple silicon M1 
> mac mini on which I would like to install ConTeXt. I know that their are no 
> ARM binaries yet for ConTeXt but Apple say that intel binaries can be run on 
> an ARM using the Rosetta emmulation software. I tried to download the intel 
> binaries using the install.sh that comes with the context-osx-64.zip file but 
> of course it does not recognise the ARM chip and suggests contacting the 
> mailing list. In some previous emails to the list, in which I was a 
> participent, (see the post "new upload" of 26/11/2020) their was some 
> discussion on how Context could be set up to work on these machines by 
> building binaries using Xcode. I am afraid this is well above my skillset so 
> I was wondering how I could get the Intel binaries and then set up ConTeXt 
> running with the Rosetta emulation software. I should be able to do that. If 
> this is possible, I would be very happy to do some testing and report back my 
> experiences to the list.
> 
> Best Wishes
> 
> Keith McKay
> 
> Scotland, 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
> ___

___
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] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Thanks Hraban, this might be also useful and I'll keep it somewhere on my mind, 
but for the project I was asking my question \jobname is enough.

Best regards: Otared

> On 1 Dec 2020, at 17:33, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 01.12.2020 um 16:20 schrieb Otared Kavian :
>> 
>> Thanks Tomás! Indeed \jobname does the job :-)
> 
> In case you need the current component file in a project environment: 
> \currentcomponent
> 
> Hraban
> ___
> 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] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Thanks Tomás! Indeed \jobname does the job :-)

Best regards: Otared

> On 1 Dec 2020, at 15:25, Tomas Hala  wrote:
> 
> Hi Otared,
> 
> try \jobname.
> 
> Best wishes,
> 
> Tomáš 
> 
> 
> Tue, Dec 01, 2020 ve 02:45:18PM +0100 Otared Kavian napsal(a):
> # Hi everyone,
> # 
> # I have to typeset a few files which get each an input file named in a 
> certain way. For instance, a file named « myfile.tex » in which another file 
> named « myfile-buffer.tex » is used as an \input file, as in
> # 
> # % content of myfile.tex
> # %
> # \starttext
> # This is a test.
> # 
> # \input myfile-buffer.tex
> # \stoptext
> # %
> # 
> #  When typesetting « myfile.tex » I wonder whether it is possible to get the 
> name of the file without its suffix, that is to get « myfile », with a 
> command such as
> # \getNameOfCurrentFile
> # and then be able to replace the above snippet by:
> # 
> # % desired content of myfile.tex
> #  %
> # \starttext
> # This is a test.
> # 
> # \input \getNameOfCurrentFile-buffer.tex
> # \stoptext
> # %
> # 
> # Best regards and thanks for any hint: Otared K.
> # 
> ___
> # 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
> # 
> ___
> 
> Tomáš Hála
> 
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> 
> http://akela.mendelu.cz/~thala
> ___
> 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] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Hi everyone,

I have to typeset a few files which get each an input file named in a certain 
way. For instance, a file named « myfile.tex » in which another file named « 
myfile-buffer.tex » is used as an \input file, as in

% content of myfile.tex
%
\starttext
This is a test.

\input myfile-buffer.tex
\stoptext
%

 When typesetting « myfile.tex » I wonder whether it is possible to get the 
name of the file without its suffix, that is to get « myfile », with a command 
such as
\getNameOfCurrentFile
and then be able to replace the above snippet by:

% desired content of myfile.tex
 %
\starttext
This is a test.

\input \getNameOfCurrentFile-buffer.tex
\stoptext
%

Best regards and thanks for any hint: Otared K.
___
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] mathmatrix and internal lines

2020-11-29 Thread Otared Kavian
Great! Well done. 
I'll ask Taco about LMTX on the wiki.

Best regards: Otared

> On 29 Nov 2020, at 19:59, Jean-Philippe Rey 
>  wrote:
> 
> I added some details and examples to the wiki, however, as you said, they are 
> not typeset correctly.
> 
>> Le 29 nov. 2020 à 08:48, Otared Kavian > <mailto:ota...@gmail.com>> a écrit :
>> 
>>> On 26 Nov 2020, at 23:23, Hans Hagen >> <mailto:j.ha...@xs4all.nl>> wrote:
>>> […]
>>> A bit more code needed but the next upload will have it. Of course you have 
>>> to wikify it.
>>> 
>>> Hans
>> 
>> Hi,
>> I created a page on the wiki:
>>  https://wiki.contextgarden.net/Matrix_in_maths 
>> <https://wiki.contextgarden.net/Matrix_in_maths>
>> However the LMTX code is not typeset on the wiki. I'll see with taco whether 
>> it is possible to have lmtx mode on the wiki.
>> 
>> Best regards: Otared K.
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr 
> <mailto:jean-philippe@centralesupelec.fr>
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
> 
> ___
> 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] mathmatrix and internal lines

2020-11-28 Thread Otared Kavian
> On 26 Nov 2020, at 23:23, Hans Hagen  wrote:
> […]
> A bit more code needed but the next upload will have it. Of course you have 
> to wikify it.
> 
> Hans

Hi,
I created a page on the wiki:
https://wiki.contextgarden.net/Matrix_in_maths 

However the LMTX code is not typeset on the wiki. I'll see with taco whether it 
is possible to have lmtx mode on the wiki.

Best regards: Otared K.___
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] mathmatrix and internal lines

2020-11-27 Thread Otared Kavian
Hi Hans,

Thanks for your insight!
Indeed I'll wikify what you explained, once I have tested it with the next 
upload. Would  \HL and \VL be also available in mkiv ?

Best regards: Otared

> On 26 Nov 2020, at 23:23, Hans Hagen  wrote:
> 
> On 11/26/2020 8:43 PM, Otared Kavian wrote:
>> Hi Jean-Philippe,
>> A few weeks ago I saw briefly the discussion about Hans' message regarding 
>> \noalign and the the new definitions of \HR and \VR that you are sending. 
>> Indeed your solution works great !
>> Just for the case other people may have the same question about writing 
>> block matrix, I copy below the whole example which can be found later in the 
>> mail archive.
>> (For mkiv, I don't know how to do the same thing…).
> 
> The \noaligned permits a \protected definition. Otherwise one has to do 
> something
> 
> \def\VR{\noalign\bgroup
>   
> that command then does the rule and ends the noalign. Also, that one cannot 
> be \protected (a pitty in case one uses \expanded or so)
> 
> So ... a multistep approach. Plenty of that in mkiv.
> 
>> %%% begin block-matrix.tex
>> % in LMTX defining \HR and \VR to create block matrices:
>> \pushoverloadmode
>> \noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
>> \popoverloadmode
>> \def\VR{\dosingleempty\doVR}
>> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> 
> given the \HR definition that should be
> 
> \tolerant\protected\def\VR[#1]{\NC ...\NC}
> 
>> \definemathmatrix[mymatrix]
>>  [left={\left(\,},
>>  right={\, \right)}]
>> \starttext   
>> \startformula
>>  \startmymatrix
>>  \NC A \VR  B \NR
>>  \HR
>>  \NC C \VR  D \NR
>>  \stopmymatrix
>> \stopformula
>> \stoptext
> 
> Anyway, a feature like this should be in sync with other table mechanisms, so
> 
> \definemathmatrix
>  [mymatrix]
>  [left={\left\lparent\thinspace},
>   right={\thinspace\right\rparent}]
> 
> \starttext
> 
> \startformula
>   \startmymatrix
>   \NC A \VL  B \NR
>   \HL
>   \NC C \VL  D \NR
>   \stopmymatrix
> \stopformula
> 
> \startformula
>   \startmymatrix
>   \NC A \VL[3,green]  B \NR
>   \HL[10,red]
>   \NC C \VL  D \NR
>   \stopmymatrix
> \stopformula
> 
> \stoptext
> 
> A bit more code needed but the next upload will have it. Of course you have 
> to wikify it.
> 
> 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] mathmatrix and internal lines

2020-11-26 Thread Otared Kavian
Hi Jean-Philippe,

A few weeks ago I saw briefly the discussion about Hans' message regarding 
\noalign and the the new definitions of \HR and \VR that you are sending. 
Indeed your solution works great !
Just for the case other people may have the same question about writing block 
matrix, I copy below the whole example which can be found later in the mail 
archive.
(For mkiv, I don't know how to do the same thing…).

%%% begin block-matrix.tex
% in LMTX defining \HR and \VR to create block matrices:
\pushoverloadmode
\noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
\popoverloadmode

\def\VR{\dosingleempty\doVR}
\def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}

\definemathmatrix[mymatrix]
[left={\left(\,},
right={\, \right)}]

\starttext  

\startformula
\startmymatrix
\NC A \VR  B \NR
\HR
\NC C \VR  D \NR
\stopmymatrix
\stopformula

\stoptext
%%% end block-matrix.tex

Best regards: Otared K.

> On 26 Nov 2020, at 19:46, Jean-Philippe Rey 
>  wrote:
> 
> Hi Otared,
> 
> Thank you very much.
> 
> I used your example to write the following macros. They are far from perfect 
> but suit my needs.  A few days ago, Hans warned not to use \noalign in LMTX, 
> so I used the trick he gave to the list even if I don't really understand it.
> 
> === LMTX version 
> %D \macros{HR, VR}
> %D \type{\HR} draws a horizontal rule between two rows of a matrix
> %D \type{\VR} is used in place of \type{\NC} to draw a vertical rule between 
> two columns of a matrix
> %D each macro takes an optional parameter giving the rule dimensions
> %D Example
> %D  \type{\startmatrix \NC A \VR[depth 2mm] B \NR \HR[height 0.6pt] \NC C \VR 
> D \NR \stopmatrix}
>  
> \pushoverloadmode
> \noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
> \popoverloadmode
> 
> \def\VR{\dosingleempty\doVR}
> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> ===
> 
> === MkIV version 
> %D \macros{HR, VR}
> %D \type{\HR} draws a horizontal rule between two rows of a matrix
> %D \type{\VR} is used in place of \type{\NC} to draw a vertical rule between 
> two columns of a matrix
> %D it takes an optional parameter giving the rule dimensions
> %D Example
> %D  \type{\startmatrix \NC A \VR[depth 2mm] B \NR \HR \NC C \VR D \NR 
> \stopmatrix}
>  
> \def\HR{\noalign{\hrule}}
> 
> \def\VR{\dosingleempty\doVR}
> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> ===
> 
> For the MkIV version I haven't been able to add an optional parameter to \HR 
> the code
> 
> \def\HR{\dosingleempty\doHR}
> \def\doHR[#1]{\noalign{\hrule #1}}
> 
> complains about "Misplaced \noalign"
> 
> Best regards,
> 
> 
> 
>> Le 26 nov. 2020 à 13:40, Otared Kavian  a écrit :
>> 
>> Hi Jean-Philippe,
>> 
>> The following is better than the one I sent earlier:
>> 
>> \definemathmatrix[mymatrix]
>>  [left={\left(\,},
>>  right={\ \right)}]
>>  
>> \starttext
>> \startformula
>>  \startmymatrix
>>  \NC A \NC\hskip-.5em \vrule  \NC\hskip-.5em B \NR
>>  \noalign{\hrule}
>>  \NC C \NC \hskip-.5em\vrule \NC \hskip-.5em D \NR
>>  \stopmymatrix
>> \stopformula
>> \stoptext
>> 
>> Best regards: Otared K.
>> 
>>> On 26 Nov 2020, at 10:19, Jean-Philippe Rey 
>>>  wrote:
>>> 
>>> Dear list,
>>> 
>>> I would like to draw matrices with internal lines as can be done with LaTeX 
>>> (cf pdf output) :
>>> 
>>> 
>>> \documentclass{article}
>>> \begin{document}
>>> $M =\left( \begin{array}{c|c}
>>> A & B \\
>>> \hline
>>> C & D \\
>>> \end{array} \right)$
>>> \end{document}
>>> 
>>> 
>>> I didn't find out how to use mathmatrix to achieve this. My best result to 
>>> date is 
>>> 
>>> 
>>> \starttext
>>> $M = \left( \bTABLE[frame=off]
>>> \bTR
>>> \bTD[rightframe=on, bottomframe=on] $A$ \eTD
>>> \bTD[bottomframe=on] $B$ \eTD
>>> \eTR\bTR
>>> \bTD[rightframe=on] $C$ \eTD
>>> \bTD $D$ \eTD
>>> \eTR
>>> \eTABLE \right)$
>>> \stoptext
>>> 
>>> 
>>> The code is rather ugly, and I get a spurious sp

Re: [NTG-context] mathmatrix and internal lines

2020-11-26 Thread Otared Kavian
Hi Jean-Philippe,

The following is better than the one I sent earlier:

\definemathmatrix[mymatrix]
[left={\left(\,},
right={\ \right)}]

\starttext
\startformula
\startmymatrix
\NC A \NC\hskip-.5em \vrule  \NC\hskip-.5em B \NR
\noalign{\hrule}
\NC C \NC \hskip-.5em\vrule \NC \hskip-.5em D \NR
\stopmymatrix
\stopformula
\stoptext

Best regards: Otared K.

> On 26 Nov 2020, at 10:19, Jean-Philippe Rey 
>  wrote:
> 
> Dear list,
> 
> I would like to draw matrices with internal lines as can be done with LaTeX 
> (cf pdf output) :
> 
> 
> \documentclass{article}
> \begin{document}
> $M =\left( \begin{array}{c|c}
> A & B \\
> \hline
> C & D \\
> \end{array} \right)$
> \end{document}
> 
> 
> I didn't find out how to use mathmatrix to achieve this. My best result to 
> date is 
> 
> 
> \starttext
> $M = \left( \bTABLE[frame=off]
> \bTR
>   \bTD[rightframe=on, bottomframe=on] $A$ \eTD
>   \bTD[bottomframe=on] $B$ \eTD
> \eTR\bTR
>   \bTD[rightframe=on] $C$ \eTD
>   \bTD $D$ \eTD
> \eTR
> \eTABLE \right)$
> \stoptext
> 
> 
> The code is rather ugly, and I get a spurious space at the bottom of the 
> table.
> 
> Any hints?
> 
> Thank you,
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
> ___
> 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] mathmatrix and internal lines

2020-11-26 Thread Otared Kavian
Hi Jean-Philippe,

For a simple case like the one you sent, a rather not optimal solution can be 
this:

\definemathmatrix[mymatrix]
[left={\left(\,},
right={\ \right)}]

\starttext
\startformula
\startmymatrix
\NC A \hskip .5em |\hskip-.5em  \NC B \NR
\noalign{\hrule}
\NC C \hskip .5em |\hskip-.5em \NC D \NR
\stopmymatrix
\stopformula
\stoptext

However I think I have seen sometime ago a more elegant solution, but I could 
not find it right now…

Best regards: Otared K.

> On 26 Nov 2020, at 10:19, Jean-Philippe Rey 
>  wrote:
> 
> Dear list,
> 
> I would like to draw matrices with internal lines as can be done with LaTeX 
> (cf pdf output) :
> 
> 
> \documentclass{article}
> \begin{document}
> $M =\left( \begin{array}{c|c}
> A & B \\
> \hline
> C & D \\
> \end{array} \right)$
> \end{document}
> 
> 
> I didn't find out how to use mathmatrix to achieve this. My best result to 
> date is 
> 
> 
> \starttext
> $M = \left( \bTABLE[frame=off]
> \bTR
>   \bTD[rightframe=on, bottomframe=on] $A$ \eTD
>   \bTD[bottomframe=on] $B$ \eTD
> \eTR\bTR
>   \bTD[rightframe=on] $C$ \eTD
>   \bTD $D$ \eTD
> \eTR
> \eTABLE \right)$
> \stoptext
> 
> 
> The code is rather ugly, and I get a spurious space at the bottom of the 
> table.
> 
> Any hints?
> 
> Thank you,
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
> ___
> 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] upload

2020-11-23 Thread Otared Kavian
Hi Hans,

On MacOS X I obtain the same error when doing:
context --make --all
(or mtxrun --make --all).
The error is

csname overload > fatal error, protection level 4, control sequence 
'textcontrolspace', properties 'immutable', file 'enco-ini.mkxl', line 315


Best regards: Otared

> On 23 Nov 2020, at 19:29, Christian Prim  wrote:
> 
> Hi
> 
> on linux I get:
> csname overload > fatal error, protection level 4, control sequence 
> 'textcontrolspace', properties 'immutable', file 'enco-ini.mkxl', line 315
> 
> wiped cache; run mtxrun --generate without problems; but context --make has 
> this error.
> 
> Do I miss something?
> 
> Thanks
> Christian
> 
> Am Mo., 23. Nov. 2020 um 18:56 Uhr schrieb Hans Hagen :
> Hi,
> 
> I uploaded a next iteration of lmtx. From now on there are dedicated sub 
> directories for mklx and mpxl, which is an indication that we're on the 
> way to a full code split.
> 
> 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
> ___
> ___
> 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] \noindentation not working

2020-11-20 Thread Otared Kavian
Hi Pablo,

I can confirm that with LMTX version 2020.11.19 11:28, the behaviour is as the 
one you report (the behaviour is correct with mkiv version 2020.06.25 10:55).

Best regards: Otared

> On 20 Nov 2020, at 17:41, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following MWE:
> 
>  \showframe\showgrid
>  \setupindenting[yes, always, big]
>  \starttext
>  \noindentation
>  a
> 
>  a
>  \stoptext
> 
> Using LMTX (2020.11.19 11:28), I get indentation with \noindentation.
> 
> Could anyone confirm this?
> 
> Many thanks for your help,
> 
> 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
> ___

___
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] Piecewise margin line

2020-11-19 Thread Otared Kavian
Hi Johann,

Here is an example (extracted from one of my files…) which might give what you 
want: you can change some of the specifications easily.

% begin proclaim-leftbar.tex
%%%
\startuseMPgraphic{mpos:region:leftbar}
draw_multi_pars;
draw_multi_side;
\stopuseMPgraphic

\definetextbackground[leftbartext]
[location=paragraph,
mp=mpos:region:leftbar,
width=broad,
frame=off,
framecolor=darkred,
rulethickness=2pt,
frameoffset=1.25em,
topoffset=-2ex,
bottomoffset=-2ex,
background=color,
backgroundcolor=white,
]
%%%
\defineenumeration[proclaim]
[text=,
before={\starttextbackground[leftbartext]}, 
after={\stoptextbackground}, 
style=slanted,
title=yes,
titleleft=,
titleright={.},
alternative=hanging,
width=fit,
right={~},
way=bysection,
prefix=yes,
prefixsegments={chapter:section}]
%%%

\starttext

\startchapter[title={Topologie des nombres réels},reference=chap:R]

\startproclaim[lem:Q-Archimedien]{Proposition}
L'ensemble ${\Bbb Q}$ est {\bi archimédien}\index{archimédien}, c'est-à-dire 
que si $\epsilon \in {\Bbb Q}$ et $\epsilon > 0$, pour tout $R \in {\Bbb Q}$ 
tel que $R > 0$ il existe un entier $n \in {\Bbb N}$ tel que $n\epsilon > R$. 

Plus précisément il existe un unique entier $m \geq 0$ tel que $m\epsilon \leq 
R < (m+1)\epsilon$~: cet entier $m$ est appelé partie entière de $R/\epsilon$ 
et souvent noté $m = \lfloor R/\epsilon \rfloor$ (et l'entier $(m+1)$ est noté 
$m+1 = \lceil R/\epsilon \rceil$).
\stopproclaim

\stopchapter
\stoptext
%%%
% end proclaim-leftbar.tex

Best regards: Otared

> On 20 Nov 2020, at 02:06, Johann Birnick  wrote:
> 
> On Thu, 2020-11-19 at 11:25 +0100, mf wrote:
>> Il 19/11/20 10:39, Johann Birnick ha scritto:
>>> Hello,
>>> 
>>> I want to setup some fancy theorem style for my math notes. For this I want
>>> to
>>> have a colored margin line next to my theorems. It should look like this:
>>> 
>>> https://i.ibb.co/F6L59pD/idea.png
>>> 
>>> The line should stretch over the whole theorem, not just the first line.
>>> (But the latter would be a beginning, though.)
>>> 
>>> Important to note is that the line should be *on the margin*, not in the
>>> text.
>>> 
>>> So do you have an idea on how I could do that? I would greatly appreciate
>>> your
>>> answer. Thank you!
>>> 

>> Look for \startsidebar \stopsidebar and \setupsidebar.
>> 
>> \setupsidebar [...,...] [..,..=..,..]
>>1   2
>>   OPT
>> 1 NAME
>> 2 rulethickness  = DIMENSION
>>rulecolor  = COLOR
>>alternative= NUMBER
>>topoffset  = DIMENSION
>>bottomoffset   = DIMENSION
>>distance   = DIMENSION
>>leftmargindistance = DIMENSION
>>level  = NUMBER
>> 
>> Massi
> 
> Thank you! I have two more questions:
> 
> 1. Where can I find a documentation for this command? Even Google finds 
> nothing.
> 
> 2. Unfortunately, adding \startsidebar and \stopsidebar into the `before` and
> `after` options of my enumeration messes up whitespace at the end. Here is a
> screenshot:
> 
> https://s12.directupload.net/images/201120/lfmwp5lh.png
> 
> The theorem is a normal enumeration. Like this:
> 
> \defineenumeration[Theorem][before=\startsidebar, after=stopsidebar]
> 
> I would greatly appreciate your help.
> 
> Thank you!
> Johann
> 
> ___
> 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] new upload

2020-11-19 Thread Otared Kavian
Hi Hans,

Thanks for the new upload and the fix for the install script: it works again 
also for MacOS.

Best regards: OK

> On 19 Nov 2020, at 11:35, Hans Hagen  wrote:
> 
> Hi,
> 
> A new upload. Hopefully with the linux install fixed.
> 
> 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
> ___

___
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] Fatal error 11

2020-11-14 Thread Otared Kavian
Hi Hans,

With the latest LMTX (current version: 2020.11.13 19:13), a project (which used 
to typeset correctly until last week) cannot be typeset anymore.
I did try to typeset smaller parts of my files but this did not help:  I keep 
getting

fatal error: return code: 11

and no PDF output. Somewhere in the log I have also

error in line 35, namespace 'mathfences', instance 'curly', key 'curly,'

where in my file \curly is defined as 

\definemathfence[curly][brace][command=yes,factor=auto]

However this command works fine with LMTX when I use it in a minimal example. 
How can I get a more clear error message so that I can localize what the new 
LMTX does not like ?

Of course I can stay with mkiv where my file can be typeset without problem, 
but it would be useful to have error messages which help really the user.

Best regards: Otared K.

___
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] new upload

2020-11-07 Thread Otared Kavian
Hi Pablo,

I had the same issue as the one you were reporting (on MacOS 10.14.6).
I removed the three files 

texmf-context.tma
texmf-osx-64.tma
texmf.tma

before issuing the command 
sh install.sh

Now I am getting 

fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip

on my Terminal window and I think I will get the new version uploaded by Hans 
(my internet connection is very slow…).

Thank you for the hint…

Best regards: Otared

> On 7 Nov 2020, at 00:12, Pablo Rodriguez  wrote:
> 
> On 11/7/20 12:02 AM, mf wrote:
>> [...]
>> I can confirm that on my Debian 10 64bit: no update until I removed
>> 
>> texmf-context.tma
>> texmf-linux-64.tma
>> texmf.tma
>> 
>> in the tex subdir.
> 
> I had to remove these files to update from LMTX from 2020.10.20 to
> version from 2020.11.05.
> 
> But I had to remove these files again to upgrade from 2020.11.05 to
> 2020.11.06.
> 
> I wonder whether the same happens in Windows (I haven’t checked it yet).
> 
> Just in case it helps,
> 
> 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
> ___

___
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] cannot update LMTX

2020-11-04 Thread Otared Kavian
Hi Pablo,

For some unknown reason despite having tried to update lmtx several times, I 
still have version 2020.09.20 23:02.
Indeed I do a backup before any update in order to be able to go back to a 
working version…

What did you do in order to get version 2020.11.04 09:40 ?

Best regards: Otared

> On 4 Nov 2020, at 16:38, Pablo Rodriguez  wrote:
> 
> On 11/4/20 4:18 PM, Otared Kavian wrote:
>> Hi Pablo,
>> 
>> I get the same result as you. I think the reason is that Hans has not
>> yet issued a newer version (he said in a message a few days ago that
>> by mistake he might have uploaded a new version, but that we should
>> be careful not to update yet…).
> 
> Hi Otared,
> 
> current latest is from today (2020.11.04 09:40).
> 
> I read the message and this is why I checked a version newer than
> 2020.10.30 (in both Linux and Windows) before asking about the issue.
> 
> I perform a backup before updating ConTeXt, so experimental versions
> should be no problem for me.
> 
> Many thanks for your help,
> 
> 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
> ___

___
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] cannot update LMTX

2020-11-04 Thread Otared Kavian
Hi Pablo,

I get the same result as you. I think the reason is that Hans has not yet 
issued a newer version (he said in a message a few days ago that by mistake he 
might have uploaded a new version, but that we should be careful not to update 
yet…).

Best regards: Otared

> On 4 Nov 2020, at 16:10, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> after latest from 2020.09.20, I afraid I get this error when running
> install.sh on Linux or install.bat on Windows (both 64bit):
> 
> mtx-install | updating tex/texmf, 1541 files
> mtx-install | updating tex/texmf-context, 3757 files
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> try again later:
> 
> If you want to run ConTeXt everywhere, you need to adapt the path, like:
> 
> I don’t know what has changed to prevent the update.
> 
> Could anyone confirm this issue with current LMTX?
> 
> Many thanks for your help,
> 
> 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
> ___

___
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] index entries postponed if sections are empty

2020-10-31 Thread Otared Kavian
Hi Hraban,

Maybe you can add some « virtual » text in the section with an invisible color 
such as
\startcolor[white] a \stopcolor
I don't know whether the following can solve your problem, but the entries of 
the index appear correctly:

\usemodule[visual]

\starttext

\dorecurse{5}{%
\startchapter[title={\recurselevel}]

\dorecurse{5}{%
\startsection[title={\fakewords{3}{5}}]
\startcolor[white] a \stopcolor
\index{Something}\index{A\recurselevel}

}

\stopchapter
}

\completeindex

\stoptext

Best regards: OK

> On 31 Oct 2020, at 17:56, Henning Hraban Ramm  wrote:
> 
> Hi,
> I‘m despairing about my index – some sections contain only an image 
> (\externalfigure), but I need to set several index entries for the image 
> contents.
> The index entries get postponed until after the next chapter.
> I guess the problem is that there’s no (text) content, but \par and \strut 
> didn’t help.
> 
> The MWE shows that index entries in empty sections are ignored, i.e. 
> “Something” is supposedly only on p.6:
> 
> 
> \usemodule[visual]
> 
> \starttext
> 
> \dorecurse{5}{%
> \startchapter[title={\recurselevel}]
> 
> \dorecurse{5}{%
> \startsection[title={\fakewords{3}{5}}]
> 
> \index{Something}\index{A\recurselevel}
> 
> }
> 
> \stopchapter
> }
> 
> \completeindex
> 
> \stoptext
> 
> 
> What can I do?
> 
> Hraban
> ___
> 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] Is synctex broken in lmtx ?

2020-10-18 Thread Otared Kavian
Hi Hans,

It seems that 
\setupsynctex[state=start]
does not have any effect in LMTX version 2020.09.20 23:02, while it works fine 
with mkiv version 2020.06.25 10:55.

Best regards: 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] Modules installation in a ConTeXt LMTX distribution

2020-10-18 Thread Otared Kavian
Hi Tommaso,

I met the same problem at the beginning of LMTX and I used a workaround: I 
copied manually the folder (in MacOS speaking, or directory) 

context-minimal/tex/texmf-modules

in my ConTeXt standalone mkiv directory, to the corresponding location in my 

/context-osx-64/tex/

Another possibility is to make a symlink in /context-osx-64/tex/ to the folder 
context-minimal/tex/texmf-modules

Best regards: Otared

> On 18 Oct 2020, at 19:25, Tommaso Gordini  wrote:
> 
> Hello everybody,
> 
> on my computers (a MacBook Pro with macOS 10.13.6 and a Mac mini with macOS 
> 10.15) I have installed a ConTeXt Standalone distribution and a ConTeXt LMTX 
> distribution.
> 
> However, while following the directions contained here
> 
> https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
> 
> the procedure to install the modules in the LMTX is not successful.
> 
> Are the indications correct? Do any of you want to write them here?
> 
> Thank you very much!
> Tommaso
> ___
> 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] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian

> On 21 Sep 2020, at 16:42, Aditya Mahajan  wrote:
> 
> On Mon, 21 Sep 2020, Wolfgang Schuster wrote:
> 
>> Aditya Mahajan schrieb am 21.09.2020 um 16:35:
>>> […]
> 
> You gave the same reply 11 years ago :-) which is also listed in the blog 
> post.

… Which shows that some things don't change in ConTeXt :-)

Kidding aside, why is there a difference between the tabulate mechanism and the 
xtable mechanism?

Best regards: Otared K.
___
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] Math fonts for Nimbus fonts

2020-09-21 Thread Otared Kavian


> On 21 Sep 2020, at 16:45, Wolfgang Schuster 
>  wrote:
> 
> Otared Kavian schrieb am 21.09.2020 um 15:30:
> […]
> I don't understand your problem because you tell ConTeXt to use upright 
> letters (normal = upright) in math mode with the following setup.
> 
>> \setupmathematics[integral=nolimits,lcgreek=normal,default=normal]

Oops… indeed. I was stupid to copy-paste \setupmathematics from another test 
file, without paying attention to « default=normal ».
The resaon for which I did this copy-paste was that with 
\definefontfamily [mainface] [mm] [STIX Math] [rscale=1.10]
the upper bound of the integral is misplaced and I don't know how to fix it.
In the archives I saw that there is « mathnolimitsmode » which can be added as 
a font feature, but its values and how to set it up are far from being clear to 
me.

Thank you so much for your help: Otared K.
___
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] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian
Hi Dalyoung,

I don't know why \recurselevel returns 0 inside a tabulate environment, but the 
following works fine:

\starttext
\startxtable[frame=off,bottomframe=on,width=1cm,align={middle,lohi}]
\startxrow\startxcell \stopxcell\stopxrow % just to have a line on the top of 
the first row
\dorecurse{8}
   {\startxrow\startxcell \recurselevel \stopxcell\stopxrow}
\stopxtable
\stoptext

Best regards: Otared K.

> On 21 Sep 2020, at 16:07, Jeong Dal  wrote:
> 
> Hi,
> 
> I tried to make a table using \dorecurse or \doloop as in the example.
> There is no error but \recurselevel is not increased, all are 0 in the first 
> example and only two rows are created with the \recurselevel 0 and 2 only in 
> the second example.
> 
> Does the tabulate cause the error?
> What is wrong in this MWE?
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> *
> \startbuffer[AdjacencyList1]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \dorecurse{8}
>{\NC \recurselevel \NC \NC\NR \HL}
> \stoptabulate
> \stopbuffer
> 
> \startbuffer[AdjacencyList2]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \doloop{
>\ifnum \recurselevel=7
>   \exitloop
>\fi
>\NC \recurselevel \NC \NC\NR \HL
> }
> \stoptabulate
> \stopbuffer
> 
> \starttext
> \getbuffer[AdjacencyList1]
> 
> \getbuffer[AdjacencyList2]
> \stoptext
> 
>> 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성:
>> 
>> Send ntg-context mailing list submissions to
>>  ntg-context@ntg.nl
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>>  ntg-context-requ...@ntg.nl
>> 
>> You can reach the person managing the list at
>>  ntg-context-ow...@ntg.nl
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>> 
>> 
>> Today's Topics:
>> 
>>   1. Parallel text support (Denis Maier)
>>   2. Re: Parallel text support (Taco Hoekwater)
>>   3. Re: ZapfDingbats Unicode differences MKIV vs LMTX
>>  (Christoph Reller)
>>   4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen)
>>   5. Math fonts for Nimbus fonts (Otared Kavian)
>>   6. Re: 2020 Meeting recordings? (Taco Hoekwater)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Mon, 21 Sep 2020 12:21:37 +0200
>> From: Denis Maier 
>> To: ntg-context@ntg.nl
>> Subject: [NTG-context] Parallel text support
>> Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>> 
>> Hi,
>> 
>> I'm trying to typeset a parallel text that should appear in columns. The 
>> sources are XML, and there I have to use tables for this. So, I thought 
>> the easiest way is to use extreme tables for this:
>> 
>> =
>> \starttext
>> 
>> \dorecurse{3}{\input knuth}
>> 
>> \startxtable[split=yes,frame=off]
>> \startxrow
>> \startxcell Text \stopxcell
>> \startxcell Übersetzung \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell \input ward \stopxcell
>> \startxcell \input tufte \stopxcell
>> \stopxrow
>> \stopxtable
>> 
>> \stoptext
>> =
>> 
>> However, as it turns out, split only seems to mean that the table is 
>> split between rows, individual rows stay on the same page.
>> 
>> Is there a better approach? I've found the page-streams, but that seems 
>> to be too much...
>> 
>> Best,
>> Denis
>> 
>> 
>> --
>> 
>> Message: 2
>> Date: Mon, 21 Sep 2020 13:58:11 +0200
>> From: Taco Hoekwater 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context] Parallel text support
>> Message-ID: 
>> Content-Type: text/plain;charset=utf-8
>> 
>> 
>> 
>>> On 21 Sep 2020, at 12:21, Denis Maier  wrote:
>>> 
>>> 
>>> However, as it turns out, split only seems to mean that the table is split 
>>> between rows, individual rows stay on the same page.
>>> 
>>> Is there a better approach? I've found the page-streams, but that seems to 
>>> be too much…
>> 
>> \starttabulate
>> 
>> 
>> 
>> --
>> 
>>

[NTG-context] Math fonts for Nimbus fonts

2020-09-21 Thread Otared Kavian
Hi,

I wish to use the Nimbus fonts, but since I didn't know which Math fonts is 
best adapted to this family, I tried several fonts such as Stix Math, TeX Gyre 
Math, and so on, but doing this the math-italic does not appear in these fonts: 
does this mean that I have to set explicitely math-italic in definefontfamily?

Also what is the best math font adapted for Nimbus?

Below is my definition of a fontfamily for Nimbus fonts.

Thanks in advance for any help: Otared K

%% begin definefontfamily-nimbus.tex
\definefontfamily [mainface] [rm] [Nimbus Roman No9 L]
\definefontfamily [mainface] [ss] [Nimbus Sans L] [rscale=0.85]
\definefontfamily [mainface] [tt] [Nimbus Mono] [features=none,rscale=0.95]
\definefontfamily [mainface] [mm] [STIX Math]

%\definefontfamily [mainface] [mm] [Asana Math]
%\definefontfamily [mainface] [mm] [Lucida Bright Math OT]
%\definefontfamily [mainface] [mm] [TeX Gyre Termes Math]
%\definefontfamily [mainface] [mm] [XITSMath]

\setupmathematics[integral=nolimits,lcgreek=normal,default=normal]


\setupbodyfont[mainface]

\starttext

{\rm\tf Regular \it Italic \bf Bold \bi BoldItalic}

{\ss\tf Regular \it Italic \bf Bold \bi BoldItalic}

{\tt\tf Regular \it Italic \bf Bold \bi BoldItalic}

And here are a few math formulas $\alpha^2 + \beta^2 + \gamma^2 = x^2 + y^2 + 
t^2$.
\startformula
\int_{0}^{2\pi} \sin(x)dx = 0, 
\qquad {\rm e}^{{\rm i}\pi} + 1 = 0, 
\qquad \sum_{n=1}^{\infty}{1 \over n^2} = {\pi^2 \over 6}.
\stopformula

\stoptext
%% end definefontfamily-nimbus.tex
___
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] \startstructurelevel

2020-09-20 Thread Otared Kavian
Hi Denis,

Does 

\startstructurelevel[title={Bibliography},number=no]

\stopstructurelevel

give what you want?

Best regards: Otared K.

> On 20 Sep 2020, at 10:39, Denis Maier  wrote:
> 
> Hi,
> 
> I'm using \startstructurelevel so I can nest sections without having to worry 
> about where I am at the moment. (Actually I'm typesetting JATS XML, and 
> there's only one  tag, and using \startstructurelevel makes the mapping 
> easier.)
> Now, for the bibliography, I need an unnumbered heading. How can I get that?
> 
> Browsing through the source I came across this: 
> https://source.contextgarden.net/tex/context/base/mkiv/strc-lev.mkvi?search=startstructurelevel#l65
> 
> So, it seems that \startstructurelevel is just an alias for 
> \startsectionlevel. Right?
> Unnumbered headings can be produced with \startsubjectlevel
> 
> So, is there a way to let \startstructurelevel the unnumbered variant, or 
> should I just use \startsubjectlevel instead?
> 
> By the way, is there a reason for the existence \startstructurelevel next to 
> \startsectionlevel? What's the exact purpose of this?
> 
> Best,
> Denis
> ___
> 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] Error setting up ConTeXt in MacTeX 2020

2020-09-18 Thread Otared Kavian
Hi Felix,

Some time ago I encountered the same problem and we had a thread on this list 
about this:

https://www.mail-archive.com/ntg-context@ntg.nl/msg95355.html

The problem on my Mac came from the fact that a directory
/opt/local/etc/texmf/
existed (installed by MacPorts, without me knowing it…) where ConTeXt tries to 
find a format, while there is none.
I removed that directory and then I could use ConTeXt from MacTex 2020.

Best regards: Otared


> On 18 Sep 2020, at 09:41, Felix Krause  wrote:
> 
> Hi all,
> 
> with MacTeX 2020 on a newly installed Mac, I have the problem that ConTeXt 
> doesn't work anymore:
> 
> $ context file.tex
> mtx-context | warning: no format found, forcing remake (commandline 
> driven)
> […] snip lots of lines
> resolvers   | formats | changing to format path 
> '/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
> resolvers   | formats | unable to change to format path 
> '/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
> mtx-context | error, no format found with name: cont-en, aborting
> system  | total runtime: 5.315 seconds
> The ConTeXt docs  say that I 
> should run mtxrun --generate, which seems to run successfully, and context 
> --make, which finishes with the same „unable to change format path“ error (I 
> believe this is what context automatically does when compiling my file, 
> hinted by the „no format found. forcing remake“ message). I tried explicitly 
> running context --make cont-en which yields the same result. The given path 
> does exist on my hard drive.
> 
> I don't even know if the „unable to change format path“ message is actually 
> an error, but I have no other indicator of what goes wrong. The only line 
> that explicitly says „error“ is the one I get when trying to process the file.
> 
> Interestingly, I have another Mac where I upgraded from MacTeX 2019 to MacTeX 
> 2020 and everything works there.
> 
> I made sure that everything is up-to-date with the TeX Live Utility.
> 
> How can I fix this problem?
> 
> Regards,
> Felix
> 
> ___
> 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] latest lmtx

2020-09-05 Thread Otared Kavian
Hi Alan,

Where did you install LuaMetaTeX? 
For instance my LuaMetaTeX.engine contains the following three lines:

#!/bin/bash

export 
PATH=/context-osx-64/tex/texmf-osx-64/bin:/context-osx-64/bin:/context-osx-64/tex/texmf-osx-64/bin

/context-osx-64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script context 
--directives="system.showerror" --autopdf "$1" --purgeall

where I am invoking the file 
/context-osx-64/tex/texmf-osx-64/bin/mtxrun
which is in the folder context-osx-64 where I installed LuaMetaTeX by running 
sh install.sh

Therefore your LuaMetaTeX.engine file should contain the correct path.

Best regards: Otared

> On 5 Sep 2020, at 17:19, Alan Bowen  wrote:
> 
> No, Hraban, and I have never had a directory  /Users/bowen1/context-osx-64. 
> Does Luametatex 2.10 (Context 2020.09.03) now require one?
> 
> Alan
> 
> On Sat, Sep 5, 2020 at 10:26 AM Henning Hraban Ramm  wrote:
> 
> 
> > Am 05.09.2020 um 16:08 schrieb Alan Bowen :
> > 
> > When I process
> > \starttext
> > Hello, world!
> > \stoptext
> > I get the following error message:
> > 
> > /Users/bowen1/Library/TeXShop/Engines/LuaMetaTeX.engine:9: no such file or 
> > directory: /Users/bowen1/context-osx-64/tex/texmf-osx-64/bin/mtxrun
> > 
> > resolvers   | formats | executing runner 'run luametatex format': 
> > /Applications/LuaMetaTeX/tex/texmf-osx-64/bin/luametatex 
> > --jobname="Version" 
> > --fmt=/Applications/LuaMetaTeX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
> >  
> > --lua=/Applications/LuaMetaTeX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
> >  cont-yes.mkiv --c:autogenerate --c:currentrun=1 --c:file-line-error 
> > --c:fulljobname="./Version.tex" --c:input="./Version.tex" --c:kindofrun=1 
> > --c:maxnofruns=9 --c:synctex="1" 
> > --c:texmfbinpath="/Applications/LuaMetaTeX/tex/texmf-osx-64/bin"
> > mtx-context | fatal error: return code: 11
> > 
> > There is definitely a file 
> > /Users/bowen1/Library/TeXShop/Engines/LuaMetaTeX.engine.
> > Previous versions of lmtx process without any problem. 
> 
> The message doesn’t ask for the engine file, but for the mtxrun script 
> mentioned in line 9 of the engine.
> 
> Is /Users/bowen1/context-osx-64/tex/texmf-osx-64/bin/mtxrun still valid in 
> your installation?
> 
> Hraban
> ___
> 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] defining font family for several options

2020-09-01 Thread Otared Kavian
Hi Julian,

What Aditya means is that you define two (or more) font families: one is named 
mainface as yu have already done, the other named mychapterfont (for instance) 
where you attribute whatever fonts you wish to sans serif and else. Then when 
you want to use the special font in some of the titles you use

{\switchtobodyfont[mychapterfont]\ss my text}

You can use also

\start \switchtobodyfont[mychapterfont] \ss my text \stop

in case the braces are not convenient for a longer text.

Best regards: Otared

> On 2 Sep 2020, at 01:22, jbf  wrote:
> 
> I presume you mean, {\switchtobodyfont[itcavantgarde]\ss My text} for the 
> case I mentioned?
> 
> Because at no point in the example I gave of \definefontfamily[mainface] had 
> I defined ss as an AvanteGarde typeface, and that is the heart of my 
> question. Can I somehow define two kinds of sans serif for different uses?
> 
> It was earlier suggested (Hraban) I might be able to do away with the serif 
> font or use calligraphy, but I need the rm and I don't need cg (though, was 
> the suggestion that I could use the initials cg but set up the typeface in 
> fact as a sans serif, in this case AvantGarde? Is that possible? In which 
> case I could also use hw as well for a different typeface as well?). As you 
> can see, I am trying to get to grips with this whole typeface issue which I 
> find a bit complicated.
> 
> Julian
> 
> 
> On 2/9/20 9:08 am, Aditya Mahajan wrote:
>> On Tue, 1 Sep 2020, jbf wrote:
>> 
>>> Perhaps someone can assist me with the following query. I have a
>>> situation where I need to use more than one sans serif fonts (especially
>>> within complicated chapter heads). I currently have the following:
>>> 
>>> \definefontfamily [mainface] [rm] [alegreya]
>>> \definefontfamily [mainface] [ss] [dax][tf=file:dax-regular]
>>> \definefontfamily [mainface] [mm] [alegreya]
>>> \setupbodyfont[mainface]
>>> \setupbodyfont[11pt]
>>> 
>>> But what if I need to have, in addition to the Dax sans serif typeface,
>>> an additional sans serif typeface such as ITCAvantGarde? How do I
>>> declare that? Do I just give it another name, e.g.
>>> \definefontfamily[chapter][itcavantgarde] etc? If I did that, how then
>>> do I refer to it? Obviously not just as {\ss my text} since that would
>>> call in the dax font.
>> {\switchtobodyfont[chapter]\ss my text}
>> 
>> I tried to improve the explanation on the wiki: 
>> https://wiki.contextgarden.net/Font_Switching#Switching_typefaces
>> 
>> 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
> ___

___
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] Overriding the number on a float

2020-08-24 Thread Otared Kavian
Hi,

If there are a few special numberings of floats, and one wants floats numbered 
1.6a and 1.6b, the following seems to work:

Best regards: Otared

%%% begin ownnumber-in-floats.tex
\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title={A section}] 
\start
\setupcaptions[numberstopper={a}]
\startplacefigure[title=Test figure]
\externalfigure[dummy]
\stopplacefigure
\stop
\stopsection

\setcounter[figure][5]

\startsection[ownnumber=11,title={Another section}] % ownnumber doesn’t work
\start
\setupcaptions[numberstopper={b}]
\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure
\stop

\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure

\stopsection

\stoptext
%%% end ownnumber-in-floats.tex

> On 24 Aug 2020, at 19:37, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
>> :
>> 
>> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:
 Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
 
 I think there was a question on this very recently but I don;t think it 
 got an answer and I can't find it to reply to, so apologies for the extra 
 noise. I have a large text with floats numbered sequentially by chapter 
 and then figure/table number, but at the last minute I've had a request 
 for two figures in a particular chapter to become 27.1a and 27.1b instead 
 of 27.1 and 27.2. It's not a combination - they are separate figures on 
 different pages.
 
 I've experimented with the options I can see, but it's not obvious if 
 there is a facility to override the numbering of two figures in a stream 
 of normally numbered figures like this. I was thinking of the equivalent 
 of the old \sym{symbol} command that used to work as a way to override a 
 single item in an otherwise sequential list.
 
 I guess there's a brute force method of setting up a new type of figure 
 with the label "Figure 27.1" and having them numbered as lowercase alpha, 
 but if there's an easier way that would be great.
>>> I’m also interested in overriding automatical numbering, e.g. of chapters 
>>> or itemization items.
>>> E.g. in my songbook, I’d like to have the verses numbered but interrupted 
>>> by a chorus numbered as "C" (i.e. "R" in German).
>>> Similarly the paragraphs of some (by)laws that were changed a lot and use a 
>>> numbering like 1, 2, 3, 3a, 4, 7...
>>> Something like
>>> \startitem[number={R}]
>>> or
>>> \startsection[number={3a}]
>>> would be nice.
>>> If I set it to an integer, ConTeXt should set the counter accordingly, 
>>> otherwise continue counting from the previous calculated number. Would that 
>>> be possible?
>> 
>> 
>> You can set your own section numbers but the counter isn't stopped.
> 
> Thank you! I overlooked "ownnumber". It works for sections, but not for items 
> or floats.
> 
> \setnumber[section][10] doesn’t work, \setcounter the same (according to the 
> source they’re synonymous) – does section use a different counter name or is 
> it no counter at all?
> 
> \setnumber[figure][10] works (but only with integers, not some alphanumerical 
> stuff, sorry Duncan).
> 
> Hraban
> 
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \startsection[title=One]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \startsection[title=Two]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[figure][5] % next figure is no.6
> 
> \startsection[ownnumber=10,title=???] % ownnumber doesn’t work
> \startplacefigure[title=Test,ownnumber=10]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[section][5] % doesn’t work
> 
> \startsection[title=Three]
> \startitemize[n]
>  \item one
>  \item two
>  \item three
>  \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work
> \stopitemize
> \stopsection
> 
> \stoptext
> 
> ___
> 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/nt

Re: [NTG-context] Chapter heading with rules

2020-08-21 Thread Otared Kavian
Hi Julian,

Indeed you can acchieve what you want, but it is better to define a command 
which takes care of the number and the title of the chapter at the same time 
(as in \ myChapterCommand below).

%% begin example.tex
\definefiller[ChapterRule]
[alternative=rule,
color=gray,
height=0.8ex,
depth=-0.6ex]

\definefiller[ChapterLeftRule]
[ChapterRule]
[left=\zerowidthnobreakspace,
right=\quad]

\definefiller[ChapterRightRule]
[ChapterRule]
[left=\quad,
right=\zerowidthnobreakspace]

\define[2]\myChapterCommand{%
\midaligned{{\filler[ChapterLeftRule]}#1.~#2{\filler[ChapterRightRule]}}
}

\setuphead[chapter]
[textstyle={\setcharactercasing[WORD]\ssa},
command=\myChapterCommand]

\starttext

\startchapter[title={My Chapter Title}]
\input knuth.tex
\stopchapter

\stoptext

%% end example.tex

Best regards: Otared K.

> On 21 Aug 2020, at 03:53, jbf  wrote:
> 
> Have achieved a Chapter title with rules either side (see below - not an 
> original invention!) but I want the chapter number to be part of 'My Chapter 
> Title'; instead, the following MWE means it comes before the ChapterLeftRule. 
> I know I can do it by actually putting the number before My Chapter title 
> (e.g. 1 My Chapter Title), since the proper numbered version still appears in 
> the TOC, but my preference would be to include a command in the \setuphead, 
> if possible (so long as it still allows the numbered chapter to appear in the 
> TOC of course). Possible?
> 
> \definefiller
>   [ChapterRule]
>   [alternative=rule,
>color=gray,
>height=0.8ex,
>depth=-0.6ex]
> 
> \definefiller
>   [ChapterLeftRule]
>   [ChapterRule]
>   [left=\zerowidthnobreakspace,
>right=\quad]
> 
> \definefiller
>   [ChapterRightRule]
>   [ChapterRule]
>   [left=\quad,
>right=\zerowidthnobreakspace]
> 
> \setuphead
>   [chapter]
>   [%align=middle,
>textstyle={\setcharactercasing[WORD]\ssa},
> textcommand=\groupedcommand{\filler[ChapterLeftRule]}{\filler[ChapterRightRule]}]
> 
> \starttext
> 
> \chapter{My Chapter Title}
> 
> \stoptext
> 
> Julian
> 
> ___
> 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] memoir-style chapter heading

2020-08-18 Thread Otared Kavian
Hi Julian,

Indeed you can modify slightly what Aditya said to obtain what you want: you 
can put the overlay into a framed environment as in the following example. 
Though, to my taste the number is a little bit too low…

%% begin example
\setuppagenumbering[state=start,location=footer]
\setuphead[chapter]
[
numberstyle={\switchtobodyfont[48pt]},
numbercolor=gray,
alternative=command,
command=\MemoirChapter,
]

\define[2]\MemoirChapter
{\framed[frame=off,width=broad,align=middle]
{\startoverlay
{#1}
{#2}
\stopoverlay}
}

\starttext
\startchapter[title={This is a test}]
\input knuth.tex

\stopchapter

\stoptext
%% end example

Best regards: Otared

> On 18 Aug 2020, at 01:18, jbf  wrote:
> 
> I meant to include an example of what I mean, since at least it seems to work 
> (am including just the definition part of your example), So at least I can 
> get middle and right alignment.
> 
> \define[2]\MemoirChapter
>  {\midaligned{\startoverlay
>   {#1}
>   {#2}
> \stopoverlay}}
> 
> Julian
> 
> On 17/8/20 4:54 pm, Aditya Mahajan wrote:
>> On Mon, 17 Aug 2020, jbf wrote:
>> 
>>> Am completely new to using Metafun, which I presume I would need to use
>>> to achieve a Hansen Memoir-style Chapter heading (chapter title
>>> overlayed on a large lightgray number). Of course, I am assuming I would
>>> need to use Metafun to create this...
>>> 
>>> So my first question is to ask if I could achieve the same effect
>>> without Metafun?
>>> 
>>> I have read through the Metafun manual, and I think I can understand how
>>> to overlay text on a graphic (MP), but it would be currently beyond me
>>> to draw numbers of the kind we find in, say, the Memoir examples.
>>> 
>>> Has anyone created such an example? I was keenly looking for one in the
>>> manual and elsewhere, in terms of ConTeXt/Metafun commands, but could
>>> not find one. But I'd be quite prepared to 'have a go' at this, if I had
>>> some pointers of just where to start! I assume I would have to
>>> \defineoverlay[number] and then add text on top \framed (but without the
>>> frame borders). Am I at least correct about this?
>> You don't need metafun for something this simple. Here is a crude 
>> implementation:
>> 
>> \setuphead[chapter]
>>   [
>> numberstyle={\switchtobodyfont[48pt]},
>> numbercolor=gray,
>> alternative=command,
>> command=\MemoirChapter,
>>   ]
>> 
>> \define[2]\MemoirChapter%
>>   {\startoverlay
>>   {#1}
>>   {#2}
>> \stopoverlay}
>>   
>> \starttext
>> \startchapter[title={This is a test}]
>> \stopchapter
>> 
>> \stoptext
>> 
>> Overlays don't allow tuning the location...for that you need layers. See the 
>> chapter on ornaments in the details manual, which also explains an 
>> alternative method to set title of chapters (toward the end of that 
>> chapter), which is useful if you need absolute positioning.
>> 
>> 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
> ___

___
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] How can I use ConTeXt from TeXLive2020 ?

2020-08-14 Thread Otared Kavian
Hi Mojca,

You are correct about not removing « by hands » parts of a package… 
The reason for which I wen to that extremity was that I wanted absolutely to be 
sure to be able to run ConTeXt from TeXLive2020 in order to convince a few 
colleagues to experiment it with TeXShop. 

If I type in the Terminal
port installed 'tex*'
the answer is:
None of the specified ports are installed.

I guess this is because after having solved the problem I met with installing 
MacTeX2020, I had done:
sudo port uninstall texlive-basic --follow-dependencies
in order to uninstall ant TeX related package from Macports (I don't know how 
thos packages were installed, maybe when I tried to use asymptote, and since I 
couldn't use it from within ConTeXt I gave up…).

Best regards: Otared




> On 13 Aug 2020, at 16:57, Mojca Miklavec  
> wrote:
> 
> Dear Otared,
> 
> On Thu, 13 Aug 2020 at 11:05, Otared Kavian wrote:
>> 
>> Indeed following your suugestion, I removed the
>>/opt/local/etc/texmf/
>> directory, as well as all other tex related directories and files in 
>> /opt/local/, and then installed again MacTeX2020.
> 
> There is usually an easier way: just ensure that path to MacTeX comes
> before /opt/local/bin.
> 
> What does
>port installed 'tex*'
> return?
> 
> It's usually a somewhat bad idea to randomly delete a subset of files
> installed by a package manager.
> 
> Mojca
> ___
> 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] How can I use ConTeXt from TeXLive2020 ?

2020-08-13 Thread Otared Kavian
Dear Axel,

Thank you very much for your attention and your hints, which solved my problems 
with ConTeXt from TeXLive2020.

Indeed following your suugestion, I removed the 
/opt/local/etc/texmf/
directory, as well as all other tex related directories and files in 
/opt/local/, and then installed again MacTeX2020. 
In oder to be on the safe side, I rebuilt also the locate database, then 
rebooted my machine: after that I could  run
luatools --generate
and now with
context --version
 I have current version: 2020.03.10 14:44.

However I don't know why I had tex related files in /opt/local/, which is used 
by MacPorts…

I hope to be able to explain to my colleague how to run ConTeXt (LuaTeX) within 
TeXShop from MacTeX2020.

Thanks to eveyone!

Best regards: Otared

> On 12 Aug 2020, at 08:26, Axel Kielhorn  wrote:
> 
> 
> 
>> Am 11.08.2020 um 16:57 schrieb Otared Kavian :
>> 
>> I don't have these files at this place, but in
>>  /opt/local/etc/texmf/
>> I do have 
>>  /opt/local/etc/texmf/texmf.cnf
>>  /opt/local/etc/texmf/texmfcnf.lua
>> the first one being created automatically when I tried to do mtxrun 
>> --generate after installing TeXLive2020. Ir says its content should not be 
>> modified directly and that its content is based on of the file
>>  /opt/local/etc/texmf/texmf.cnf.d
>> The content of the above directory dates from 2019, and maybe that is why my 
>> logfile reports things being done with TeXLive2019. 
>> 
>> The content of the file 
>>  /opt/local/etc/texmf/texmfcnf.lua
>> is written by Hans in date = "2012-05-24" time = "12-12-12".
>> 
>> Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not 
>> help, since it is overwritten when one does 
>>  mtxrun --generate
>> 
>> So the problem remains… Maybe I have to contact people who prepare 
>> MacTeX2020 and ask for help with them.
> 
> This looks like a Macports installation.
> 
> When I call the Macports version of context I get:
> 
> context --help
> resolvers   | caches | path '/Users/axel/.texlive2020/texmf-var' created
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
> 
> If you want to use the Macports version of ConTeXt please install
> 
> port install textlive-context
> 
> after installing that I get:
> 
> context --help
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | basic options:
> mtx-context |
> mtx-context | --run  process (one or more) files (default 
> action)
> mtx-context | --make create context formats
> mtx-context |
> mtx-context | --ctx=name use ctx file (process management 
> specification)
> mtx-context | --noctxignore ctx directives and flags
> mtx-context | --interfaceuse specified user interface 
> (default: en)
> mtx-context |
> mtx-context | --autopdf  close pdf file in viewer and start 
> pdf viewer afterwards
> mtx-context | --purgepurge files either or not after a 
> run (--pattern=...)
> mtx-context | --purgeall purge all files either or not after 
> a run (--pattern=...)
> mtx-context |
> mtx-context | --usemodule=list   load the given module or style, 
> normally part of the distribution
> mtx-context | --environment=list load the given environment file 
> first (document styles)
> mtx-context | --mode=listenable given the modes (conditional 
> processing in styles)
> mtx-context | --path=listalso consult the given paths when 
> files are looked for
> mtx-context | --arguments=list   set variables that can be consulted 
> during a run (key/value pairs)
> mtx-context | --randomseed=numberset the randomseed
> mtx-context | --result=name  rename the resulting output to the 
> given name
> mtx-context | --trackers=listset tracker variables (show list 
> with --showtrackers)
> mtx-context | --directives=list  set directive variables (show list 
> with --showdirectives)
> mtx-context | --silent=list  disable logcatgories (show list with 
> --showlogcategories)
> mtx-context | --stripstrip Lua code (only meant for 
> production where no errors are expected)
> mtx-context | --errors=list  show errors at the end of a run, 
> quit when in list (also when --silent)
> mtx-context | --htmlerrorpagegenerate html error page instead 
> (optional: =scite)
> mtx-context |

Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Otared Kavian
Hi Hans,

Thanks for your explanations, which clarify why sometimes ConTeXt may not work 
straight of TeXLive.
Nevertheless I will contact the people who maintain MacTeX in order for them to 
be aware of the issue I encounter, so that hopefully in the future releases 
people would be able to use ConTeXt from MacTeX.

Best regards: Otared

> On 11 Aug 2020, at 17:25, Hans Hagen  wrote:
> 
> Hi,
> 
> A few remarks.
> 
> In a mkiv luatex setup there are (on a unix system):
> 
>  luatex  : binary
>  mtxrun  : a copy of mtxrun.lua
>  context : a shell script starting mtxrun
> 
> Now, the problem there is that these shebang lines are limited, i.e. there is 
> no way to pass an argument and we need to start luatex in lua mode. This is 
> why the program refered to is texlua which is a copy of or symlink to luatex 
> and when called with that name it knows that it has to start in lua mode.
> 
> On windows there are two small stubs: mtxrun.exe and context.exe an both will 
> start luatex (no need for texlua there) with the same script etc.
> 
> In a luametatex setup we have a uniform and simpler model.
> 
>  luametatex   : binary
>  mtxrun   : a copy of luametex or symlink to it
>  context  : a copy of luametex or symlink to it
>  mtxrun.lua   : used when mtxrun is started
>  context.lua  : used when context is started
> 
> So, here the 'context' link (or copy) from it's name knows to start in lua 
> mode and load context.lua (which actually loads mtxrun.lua + 
> mtx-context.lua). It's the same on all platforms.
> 
> Now, already long ago we ditched all other stubs simply because given the 
> amount of scripts in a tex live setup it's a recipe for clashes (scripts also 
> have to compete with programs / scripts  installed as part of the os and 
> other programs so even more opportunity for clashes). We just use
> 
>  mtxrun --script ...
> 
> instead (and texmfstart in a mkii setup).
> 
> These models cannot be mixed, which is why in a luametatex lmtx setup we use 
> "context --luatex" to start mkiv, where luametatex is the runner.
> 
> Hans
> 
> ps. I remember the times that context was considered bad because it needed a 
> runner, read: a script was part of the deal and a tex run should not have 
> such a depedency; the need to install perl or ruby was seen as a shortcoming. 
> We also used scripts to generate font metric files (context didn't depend on 
> other programs for toc and index generation and had just one auxiliary file). 
> But times have changed and scripts are now hip and modern in the tex 
> ecosysystem, which is why we basically limit ourselves to just 'context' and 
> 'mtxrun' and start all the other context related scripts indirectly.
> 
> -
>  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] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Otared Kavian
Hi Adam,

Thanks for your attention to my problem.

> On 11 Aug 2020, at 03:44, Adam Reviczky  wrote:
> 
> Hi Otared,
> 
> Not sure this will help at all, but I've seen similar errors when 
> "texmfcnf.lua" wasn't found (alongside texmf.cnf).
> 
> Although I am not using TeXLive2020, I have the following entries for 
> texmfcnf:
> -rw-r--r-- 1 root root 8272 Aug  9 13:19 
> /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua
> -rw-r--r-- 1 root root 38841 Aug  9 13:19 
> /usr/share/texlive/texmf-dist/web2c/texmf.cnf

I don't have these files at this place, but in
/opt/local/etc/texmf/
I do have 
/opt/local/etc/texmf/texmf.cnf
/opt/local/etc/texmf/texmfcnf.lua
the first one being created automatically when I tried to do mtxrun --generate 
after installing TeXLive2020. Ir says its content should not be modified 
directly and that its content is based on of the file
/opt/local/etc/texmf/texmf.cnf.d
The content of the above directory dates from 2019, and maybe that is why my 
logfile reports things being done with TeXLive2019. 

The content of the file 
/opt/local/etc/texmf/texmfcnf.lua
is written by Hans in date = "2012-05-24" time = "12-12-12".

Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not 
help, since it is overwritten when one does 
mtxrun --generate

So the problem remains… Maybe I have to contact people who prepare MacTeX2020 
and ask for help with them.

Thank you agin for your time and advices.
Best regards: Otared


> 
> and the symlinks to it from:
> lrwxrwxrwx 1 root root 43 Aug 11 02:05 /usr/share/texmf/web2c/texmfcnf.lua -> 
> ../../texlive/texmf-dist/web2c/texmfcnf.lua
> lrwxrwxrwx 1 root root 40 Aug 11 02:21 /usr/share/texmf/web2c/texmf.cnf -> 
> ../../texlive/texmf-dist/web2c/texmf.cnf
> 
> Now, if I remove the symlink (/usr/share/texmf/web2c/texmfcnf.lua) I get the 
> same error as you:
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
> (With the symlink everything is fine of course.)
> 
> https://github.com/TeX-Live/texlive-source/blob/b5db9f9833e389f96a329553b9d6ac7037872b2d/texk/kpathsea/texmf.cnf
> % First writable tree here is used by Lua(La)TeX for the font cache.
> % LuaLaTeX uses the value here, while ConTeXt uses the same variable but
> % from texmfcnf.lua; therefore the two values should be kept in sync.
> % (As should everything else in texmf.cnf <-> texmfcnf.lua.)
> 
> I see from your output that context did find the texmfcnf.lua:
> resolvers   | resolving | found regular configuration file 
> '/opt/local/etc/texmf/texmfcnf.lua'
> 
> So maybe it is something completely different, but it does look like it's 
> something around those configs...
> 
> Have a look and if not, then sorry for the noise.
> 
> Regards,
> Adam
> 
> 
> On Mon, Aug 10, 2020 at 11:04 PM Otared Kavian  wrote:
> Hi Axel,
> 
> > On 10 Aug 2020, at 16:11, Axel Kielhorn  wrote:
> > […]
> > Well, one more suggestion:
> > Use TeX Live Manager to update TeX-Live.
> > I didn’t see any comments about context not working, but maybe the update 
> > fixes something.
> > (You can filter for context related packages.)
> > 
> > There has been one update to „context“ in June 2020.
> 
> I did update TeXLive with TeX Live Manager. But still I cannot run ConTeXt 
> from TeXLive2020 (neither from TeXShop nor from Terminal).
> 
> > […]
> > And another one:
> > Please look into the home directory for a local .texlive2020 folder.
> > There shouldn’t be any and it shouldn’t contain anything context related.
> 
> I checked for the existence of directories of the type .texlive2020: there is 
> no such directory in my home directory.
> There were three leftover directories .texlive2008, .texlive2010 and 
> .texlive2019, which I removed.
> Doing 
> mtxrun --generate
> creates a .texlive2019 directory which contains some other folders which are
> texmf-var/luatex-cache/context/88aacfe88c3cbee9a12d5f4bec4da90b/trees/
> and in the latter folder there are 10 files with suffixes .lua and .luc.
> Again 
> context test.tex
> results in 
> mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
> 
> So the problem remains…
> 
> Best regards: 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

Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi Axel,

> On 10 Aug 2020, at 16:11, Axel Kielhorn  wrote:
> […]
> Well, one more suggestion:
> Use TeX Live Manager to update TeX-Live.
> I didn’t see any comments about context not working, but maybe the update 
> fixes something.
> (You can filter for context related packages.)
> 
> There has been one update to „context“ in June 2020.

I did update TeXLive with TeX Live Manager. But still I cannot run ConTeXt from 
TeXLive2020 (neither from TeXShop nor from Terminal).

> […]
> And another one:
> Please look into the home directory for a local .texlive2020 folder.
> There shouldn’t be any and it shouldn’t contain anything context related.

I checked for the existence of directories of the type .texlive2020: there is 
no such directory in my home directory.
There were three leftover directories .texlive2008, .texlive2010 and 
.texlive2019, which I removed.
Doing 
mtxrun --generate
creates a .texlive2019 directory which contains some other folders which are
texmf-var/luatex-cache/context/88aacfe88c3cbee9a12d5f4bec4da90b/trees/
and in the latter folder there are 10 files with suffixes .lua and .luc.
Again 
context test.tex
results in 
mtxrun | unknown script 'context.lua' or 'mtx-context.lua'

So the problem remains…

Best regards: 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] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi Hans and Taco,

Thanks for the help!
Doing 
context --make
results in
mtxrun | unknown script 'context.lua' or 'mtx-context.lua'

Doing 
mtxrun --generate
results in the lines (and much more):

resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/opt/local/libexec/texlive/binaries'
resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/opt/local/libexec/texlive'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
'/opt/local/libexec'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'texlive'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;/opt/local/etc/texmf'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/kavian/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on weird path 
'/opt/local/etc/texmf' from specification '/opt/local/etc/texmf'
resolvers   | resolving | found regular configuration file 
'/opt/local/etc/texmf/texmfcnf.lua'

The directory
/opt/local/libexec/texlive/binaries
exists and contains  (among other things) « context » which is a symlink to 
/opt/local/share/texmf-texlive/scripts/context/stubs/unix/context
which does not exist…

Best regards: Otared

> On 10 Aug 2020, at 15:20, Hans Hagen  wrote:
> 
> On 8/10/2020 2:59 PM, Otared Kavian wrote:
>> Hi Alex,
>> Thank you and Taco for helping.
>> In order to help solve the problem of running ConTeXt from MacTeX, I 
>> installed MacTeX2020 (which is the same as TeXLive2020). Now if in a 
>> Terminal window I do
>>  which context
>> the answer is:
>>  /Library/TeX/texbin/context
>> And the answer to
>>  which pdflatex
>> is
>>  /Library/TeX/texbin/pdflatex
>> Also the answer to:
>>  which luatools
>> is
>>  /Library/TeX/texbin/luatools
>> So the binaries are in /Library/TeX/texbin, which is in fact an alias for
>>  /usr/local/texlive/2020/bin/x86_64-darwin
>> Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do
>>  luatools --generate
>> then the answer is:
>>  mtxrun | unknown script 'base.lua' or 'mtx-base.lua'
>> It is possible that the version of mtxrun or luatools scripts in TeXLive are 
>> not working.
>> I don't remember what I did with TeXLive2019 to fix the issue, but my 
>> concern is that if including ConTeXt in TeXLive is intended for people to 
>> use it, then it SHOULD run without such tweakings which, even for someone 
>> who is a regular user of ConTeXt, are not easy to find.
>> The solution consisting of installing a standalone tree of ConTeXt, is not a 
>> real solution because many people do not know how to do it and, even if they 
>> could, then what would be the point of doing so much work for people who 
>> include a ConTeXt tree in TeXLive?
>> Anyway, I apologize for my acrimonius remarks, and I thank you again for 
>> your help.
> The luatools script was there to offer some kpse like functionality but it 
> has been obsolete for ages (the generate was in mtx-base at that time). Just 
> use
> 
>  mtxrun --generate
> 
> or
> 
>  context --make
> 
> which does a generate anyway (normally)
> 
> 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] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi Alex,

Thank you and Taco for helping. 
In order to help solve the problem of running ConTeXt from MacTeX, I installed 
MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal window I do
which context
the answer is:
/Library/TeX/texbin/context
And the answer to
which pdflatex
is
/Library/TeX/texbin/pdflatex
Also the answer to:
which luatools 
is
/Library/TeX/texbin/luatools

So the binaries are in /Library/TeX/texbin, which is in fact an alias for
/usr/local/texlive/2020/bin/x86_64-darwin

Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do
luatools --generate 
then the answer is:
mtxrun | unknown script 'base.lua' or 'mtx-base.lua'
It is possible that the version of mtxrun or luatools scripts in TeXLive are 
not working.

I don't remember what I did with TeXLive2019 to fix the issue, but my concern 
is that if including ConTeXt in TeXLive is intended for people to use it, then 
it SHOULD run without such tweakings which, even for someone who is a regular 
user of ConTeXt, are not easy to find.
The solution consisting of installing a standalone tree of ConTeXt, is not a 
real solution because many people do not know how to do it and, even if they 
could, then what would be the point of doing so much work for people who 
include a ConTeXt tree in TeXLive?

Anyway, I apologize for my acrimonius remarks, and I thank you again for your 
help.

Best regards: Otared


> On 10 Aug 2020, at 12:39, Axel Kielhorn  wrote:
> 
> 
> 
>> Am 10.08.2020 um 12:03 schrieb Otared Kavian :
>> 
>> Hi all,
>> 
>> I suggested to a friend, who is using plain TeX and LaTeX, to switch to 
>> ConTeXt, and since he is using TeXShop on MacOSX with a version of 
>> TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple 
>> test document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, 
>> where it does appear.
>> 
>> Unfortunately when doing this all he gets in the log file is:
>> 
>> /sw/bin/init.csh: No such file or directory.
>> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
>> 
>> and I could not help him make the format (I do not have access to his 
>> machine, and I was trying to explain what to do on the phone).
> 
> The TeXshop engine file says:
> 
> # Before using this engine, you must run the following command once in 
> Terminal: luatools --generate
> 
> I probably did this when I installed TeXLive.
> 
> But I’m a little irritated by /sw/bin/.
> Is this a real MacTeX installation and not something like homebrew?
> 
> Let’s start with the simple things:
> 
> What is the result of:
> which context
> 
> it should be:
> /Library/TeX/texbin/context
> 
> If that doesn’t work try:
> 
> which pdflatex
> 
> The result is probably not
> 
> /Library/TeX/texbin/pdflatex
> 
> but should give some indication where to look.
> 
> There may be an old installation of MacTeX without Context somewhere in the 
> path.
> 
> If this is an old TeXShop installation, the Context engine may need an update 
> because it points to the old PATH.
> Simply copy the engine from ~/Library/TeXShop/Engines/inactive/ConTeXt to 
> ~/Library/TeXShop/Engines
> 
> Hope this helps
> Axel
> 
> 
> ___
> 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] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi all,

I suggested to a friend, who is using plain TeX and LaTeX, to switch to 
ConTeXt, and since he is using TeXShop on MacOSX with a version of TeXLive2020 
(named MacTeX2020), I thought he would just typeset a simple test document with 
the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where it does appear.

Unfortunately when doing this all he gets in the log file is:

/sw/bin/init.csh: No such file or directory.
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

and I could not help him make the format (I do not have access to his machine, 
and I was trying to explain what to do on the phone).

He cannot (or does not want) to install a standalone version of ConTeXt, and he 
thinks that since ConTeXt exists in TeXLive2020 it should work out of the box, 
as do plain TeX and LaTeX. My opinion is that he is right… But since for the 
tim ebeing this is not the case, can anyone explain what to do in order to 
enable ConTeXt running from TeXLive2020?

Thanks in advance for any help: Otared K.

___
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] Defining \qed (was: Bug with \wordright...)

2020-08-08 Thread Otared Kavian
Hi Wolfgang,

Thanks for your explanations and the correct definition of the close symbol in 
an enumeration.
Following up the discussions with Hans, in order to put a close sympbol at the 
end of a formula, I have the following for the definition of \qed:

%% begin example-qed.tex
\showframe
\definesymbol[Fin][\mathematics{\square}]
\def\qed{%
\ifmmode
\inrightmargin{\hskip-7.5mm\symbol[Fin]} % --> attention here
\else
\dontleavehmode\wordright{\symbol[Fin]}
\fi}

\setupformulas[location=left]

\starttext

One sees that
\placeformula
\startformula
   a^2 + b^2 = c^2
\stopformula
which is the Pythagoras theorem. \qed

Another proof of Pythagors theorem is based on the figure below in which one 
sees that:
\placeformula
\startformula
(a+b)^2 = c^2 + 2ab \quad \imply \quad a^2 + b^2 = c^2. \qed
\stopformula

\stoptext
%% end example-qed.tex

Now how can I replace « \hskip-7.5mm » (which was found by trial and error…) in 
a robust manner so that the close symbols in the formulas are vertically 
aligned with the close symbols in the text?
In other terms can one compute automatically the amount of negative \hskip so 
that the definition is correct when one changes the font size and the layout?

Thanks in advance: Otared

> On 5 Aug 2020, at 21:15, Wolfgang Schuster 
>  wrote:
> […]
> 
> Below is a cleaner version to put a symbol at the end of each proof. The 
> \blank setting in the \PlaceProofSymbol definition moves the symbol back in 
> the math formula to avoid the vertical space between them, you can remove it 
> but I would at leas use \blank[back] to get rid of the empty line between the 
> formula and the symbol.
> 
> \define[1]\PlaceProofSymbol
>  {\blank[back,overlay]%
>   \dontleavehmode\wordright{#1}}
> 
> \defineenumeration
>  [proof]
>  [ closesymbol={\symbol[square]},
>   closecommand=\PlaceProofSymbol]
> 
> \starttext
> 
> \startproof
>  \startformula
>a^2 + b^2 = c^2
>  \stopformula
> \stopproof
> 
> \stoptext
> 
> 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
> ___

___
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] Bug with \wordright in LMTX version 2020-08-03 14:25

2020-08-04 Thread Otared Kavian
Hi Hans,

Thanks for the hint which consists in adding an \ifmmode to the definition of 
\qed.
However, as you suggest, one needs some other mechanism in math mode, since 
with your new definition of \qed the alignment of the formula changes when one 
adds this close symbol:

 begin-example-qed.tex
\definesymbol[Fin][\mathematics{\square}]
\def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi}
\starttext
\startformula
a^2 + b^2 = c^2.
\stopformula
\startformula
a^2 + b^2 = c^2. \qed
\stopformula
One sees that\type{\qed} in the formula changes the alignment of the formula. 
\qed 
\stoptext
 end-example-qed.tex

Thanks a lot for everything: Otared

> On 4 Aug 2020, at 13:24, Hans Hagen  wrote:
> 
> On 8/4/2020 11:17 AM, Otared Kavian wrote:
>> Thanks Hans for your explanations.
>> The problem I encountered is that, the command \qed is used dozens of time 
>> in my text without any issue because it was preceded by something on th 
>> eline, but the only place where it was alone after a formula resulted in the 
>> error and it was not easy for me to isolate the issue…
>> By the way, in mkii it was possible to add \qed on the last line of a math 
>> formula, but that does not work anymore:
>> \definesymbol[Fin][\mathematics{\square}]
>> \def\qed{\strut\wordright{\symbol[Fin]}}
>> \starttext
>> \startformula
>> a^2 + b^2 = c^2. \qed
>> \stopformula
>> The above formula does not show the close symbol.\qed
>> \stoptext
>> Is there a way to have something like \qed work in math formulas?
> because that's now hwpo wordright works ...
> 
> \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi}
> 
> but we probably need something different, something that hooks into display 
> math
> 
> 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] Bug with \wordright in LMTX version 2020-08-03 14:25

2020-08-03 Thread Otared Kavian
Hi Hans,

A file which used to be typeset correctly with the previous versions of lmtx, 
now produces an error. Despite the error message being extremely cryptic:

Error  ! Missing number, treated as zero

I could guess the origin of the bug, which seems to be \wordright,  but 
although the following minimal example shows a bug it does not produce the same 
ERROR output page:

 the square ''end of proof''
\definesymbol[Fin][\mathematics{\square}]
\def\qed{\wordright{\symbol[Fin]}}

\starttext
\startformula
a^2 + b^2 = c^2
\stopformula
\qed % the problem is here
\stoptext

In the above example if one adds something before \qed, then the square 
end-of-proof appears. 
However in my real file ConTeXt ouputs an error page and says: Error   ! 
Missing number, treated as zero.

Best regards: 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] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
Hi Hraban,

Thanks for the hint… indeed I did see that \ColWidth command but didn't think 
about its definition… Sorry!

Now with \ColWidth defined, your code works fine and it has the advantage that 
the text of the sidenote begins in the margin at the level where the \footnote 
command appears. However, it cannot control the overflow of a sidenote to the 
next page, whereas the code given by Hans can do that. I admit that this does 
not happen very often since a well designed text should not have too many long 
sidenotes…

In case other users would like to use your code, I put the whole example below.

Best regards: Otared
%%% sidenotes, or footnotes in the margin
%%% example given by Hraban:
%%% here the tweaking of the width of the sidenote is turned off
%%% remove the comment where there is \ColWidth
%%% in order to adapt to your layout
\showframe
\setuplayout
[cutspace=7cm,
width=middle,
margin=5cm,
margindistance=7mm]

%\def\ColWidth{57mm}
\setupmargindata[inmargin]
[location=right,
stack=continue,
align=flushright,
]

\setupmargindata[inouter]
[location=right,
stack=continue,
align=flushright,
]

\def\FNVOffset{0} % Negative vertical offset of footnotes in lines
% Manual tweaking was necessary for a while, when stacking didn’t work reliably.

\def\MarginNote#1{%
\inmargin[
voffset=\dimexpr-\FNVOffset\lineheight\relax,
%   width=\ColWidth,
align=flushleft,
]{%
\inframed[
%   width=\ColWidth,
align=right,
frame=off,
offset=overlay,
strut=yes,
]{#1}%
}%
}

\define\PlaceFootnote{%
\inmargin[
voffset=\dimexpr-\FNVOffset\lineheight\relax,
%   width=\ColWidth,
]{%
\vtop{\placelocalnotes[footnote][before=,after=]}}%
}



\def\FNo#1{{#1~}}
% I never managed to get number and text in consecutive lines without indented 
text
% or at least a constant whitespace after the number.


\setupnote[footnote]
[location=text,
bodyfont=,
indenting=no,
before={\noindentation},
next=\PlaceFootnote,
]

\setupnotation[footnote]
[way=bychapter,
align=flushleft,
indenting=no,
location=serried,
alternative=serried,
width=broad,
numbercommand=\FNo,
] % footnote text

\setuptexttexts[margin][]
[%
{\framed[
align={flushright,bottom},
frame=off,
height=\textheight,
%   width=\ColWidth,
]{%
\strut\vfill\placenotes[footnote]}}%
]

\starttext
 \dorecurse{6}{\input ward\expanded{\footnote{This is a footnote 
\recurselevel}} }
test
\dorecurse{10}{
test \footnote{\input ward }\input tufte.tex \par
test \footnote{This is a note about Ward, who says: \par \input 
ward.tex} \input ward.tex \par
test \footnote{This is a note about Donald Knuth.} \input knuth.tex \par
}
This is a last note. \footnote{This last note is here to see what happens in 
the next page\dots\par \input knuth.tex}
\par 
\dorecurse{3}{\input knuth.tex }

\stoptext

> On 1 Aug 2020, at 23:01, Henning Hraban Ramm  wrote:
> 
> 
>> Am 01.08.2020 um 22:36 schrieb Otared Kavian :
>> 
>> Hi Hraban,
>> 
>> Thank you for taking the time to send your code for sidenotes.
>> Unfortunately when I add
>> 
>> \starttext
>> test\footnote{A footnote in the margin.}
>> \stoptext
>> 
>> to your code, I get an error and unfortunately with recent versions of LMTX 
>> the error message 
>> !  Undefined control sequence
>> is not helpful to find the error… (LMTX considers \footnote as an undefined 
>> control sequence…).
>> 
> 
> Of course it’s not \footnote that is undefined but something else from my 
> code – I didn’t take the time to strip it of all the references to other 
> setups in the same environment, probably \ColWidth that was just a shortcut 
> for the column width:
> \def\ColWidth{57mm}
> 
> Hraban
> 
> ___
> 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] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
Hi Hraban,

Thank you for taking the time to send your code for sidenotes.
Unfortunately when I add

\starttext
test\footnote{A footnote in the margin.}
\stoptext

to your code, I get an error and unfortunately with recent versions of LMTX the 
error message 
!  Undefined control sequence
is not helpful to find the error… (LMTX considers \footnote as an undefined 
control sequence…).

Best regards: Otared

> On 1 Aug 2020, at 19:19, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 01.08.2020 um 18:57 schrieb Otared Kavian :
>> 
>> Hi Hraban,
>> 
>> Thank you for reminding me of the solution cooked up by Wolfgang for you a 
>> few years ago. That solution works fine when the notes are short enough, but 
>> in some cases the notes in the margin bump into each other (indeed it is not 
>> a good habit to have long notes, but in some cases one cannot avoid them).
> 
> One essential bit is missing in the wiki example:
> 
> \setupmargindata[inmargin][
>  location=right,
>  stack=continue, % !!
>  align=flushright,
> ]
> 
> The code I’m actually using for our German literature magazine “Kritische 
> Ausgabe” is much more elaborated, but also cluttered with obsolete stuff – I 
> need to sort that out some time...
> (I only deleted some styling.)
> 
> %%% Footnotes / Marginals
> 
> \setupmargindata[inmargin][
>  location=right,
>  stack=continue,
>  align=flushright,
> ]
> \setupmargindata[inouter][
>  location=right,
>  stack=continue,
>  align=flushright,
> ]
> 
> \def\FNVOffset{0} % Negative vertical offset of footnotes in lines
> % Manual tweaking was necessary for a while, when stacking didn’t work 
> reliably.
> 
> \def\MarginNote#1{%
> \inmargin[
>  voffset=\dimexpr-\FNVOffset\lineheight\relax,
>  width=\ColWidth,
>  align=flushleft,
> ]{%
>  \inframed[
>width=\ColWidth,
>align=right,
>frame=off,
>offset=overlay,
>strut=yes,
>]{#1}%
>  }%
> }
> 
> \define\PlaceFootnote{%
> \inmargin[
>  voffset=\dimexpr-\FNVOffset\lineheight\relax,
>  width=\ColWidth,
> ]{%
>  \vtop{\placelocalnotes[footnote][before=,after=]}}%
> }
> 
> \def\FNo#1{{#1~}}
> % I never managed to get number and text in consecutive lines without 
> indented text
> % or at least a constant whitespace after the number.
> 
> \setupnote[footnote][
>  location=text,
>  bodyfont=,
>  indenting=no,
>  before={\noindentation},
>  next=\PlaceFootnote,
> ]
> 
> \setupnotation[footnote][
>   way=bychapter,
>   align=flushleft,
>  indenting=no,
>  location=serried,
>  alternative=serried,
>  width=broad,
>  numbercommand=\FNo,
> ] % footnote text
> 
> \setuptexttexts[margin][][%
>  {\framed[
>align={flushright,bottom},
>frame=off,
>height=\textheight,
>width=\ColWidth,
>  ]{%
>\strut\vfill\placenotes[footnote]}}%
> ]
> 
> 
> Best, Hraban
> 
> ___
> 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
___


<    1   2   3   4   5   6   7   8   9   10   >