Re: [NTG-context] Stack overflow when using Neo Euler for math

2023-03-31 Thread Rory Molinari via ntg-context
Thanks for the quick reply, Hans!

I just installed the standalone ConTeXt distribution and it works again for
me. Thanks!

Cheers,
Rory

On Fri, Mar 31, 2023 at 4:17 PM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 3/31/2023 9:58 PM, Rory Molinari via ntg-context wrote:
> > Hi,
> >
> > I'm in the process of updating to TeXlive 2023 after a long time of
> > light use with 2018. One issue I'm now having is an error when I try to
> > use Neo Euler as my math font.
> >
> > \definefontfamily[mypalatinoeuler][rm][TeX Gyre Pagella]
> > \definefontfamily[mypalatinoeuler][mm][Neo Euler]
> >
> > \setupbodyfont[mypalatinoeuler]
> >
> > \starttext
> > $x=1$
> > \stoptext
> It works ok here. Support for these math fonts are a bit in flux (and
> euler is special anyway). Mikael and I just finished a new round of math
> tweaks (some interesting esthetics that took some time) and in addition
> to (and because of) that some otf math fonts have also been also updated
> (like euler). We want to do some tests before we upload a new version;
> if we see no problems maybe tomorrow, although the need to adapt to
> changes in tikz are kind of a showstopper.
>
> 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 /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 10:08 PM, Carlos via ntg-context wrote:


sure, why should it, you want lucida so better quit with an error than
kicking in some font; actually cmr math fonts have been obsoleted for way
over a decade by latin modern math fonts in 32 bit font engines


Font loading and processing time can be mosty neglected so these 16 
seconds come from something else, maybe there are ways to trace file 
access. Another possibility is that your fonts are not cached in which 
case every run will involve parsing the otf / ttf and producing whatever 
resources needed (normally cached).



I was actually thinking to ask you about that, and by falling back to cmr math 
font that perhaps would expedite loading time along the way.


These fonts are small (only huge cjk fonts with tens of thousands of 
glyphs or fonts with hundreds of accumulated features might have some 
impact but even then not in the final embedding stage).


Whan talking fonts, enabling for instance expansion (hz) and protusion 
might increase runtime a little. In practice, enabling for instance 
synctex has a bigger imnpacts on performance than handling fonts.

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


Re: [NTG-context] Stack overflow when using Neo Euler for math

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 9:58 PM, Rory Molinari via ntg-context wrote:

Hi,

I'm in the process of updating to TeXlive 2023 after a long time of 
light use with 2018. One issue I'm now having is an error when I try to 
use Neo Euler as my math font.


\definefontfamily[mypalatinoeuler][rm][TeX Gyre Pagella]
\definefontfamily[mypalatinoeuler][mm][Neo Euler]

\setupbodyfont[mypalatinoeuler]

\starttext
$x=1$
\stoptext
It works ok here. Support for these math fonts are a bit in flux (and 
euler is special anyway). Mikael and I just finished a new round of math 
tweaks (some interesting esthetics that took some time) and in addition 
to (and because of) that some otf math fonts have also been also updated 
(like euler). We want to do some tests before we upload a new version; 
if we see no problems maybe tomorrow, although the need to adapt to 
changes in tikz are kind of a showstopper.


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


Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Carlos via ntg-context
On Fri, Mar 31, 2023 at 04:40:27PM +0200, Hans Hagen via ntg-context wrote:
> On 3/31/2023 1:40 PM, Carlos via ntg-context wrote:
> 
> > > so why not use lucida math fonts?
> > 
> > I have. But only with a couple of math fonts. I don't have all these fonts.
> 
> It really pays off to buy the official lucida opentype package.

I'll do that eventually. 
> 
> > mkiv lua stats  > loaded fonts: 3 files: lucidanewmathitalic.ttf, 
> > lucidanewmathsymbol.ttf, lucidabrightregular.otf
> > mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 6 
> > instances, 3 shared in backend, 1 common vectors, 2 common hashes, load 
> > time 16.733 seconds
> 
> I never heard of these math ones. Did you get these from yandytex (no longer
> around) or TUG (the official distributer of lucida opentype math)? Anyway,
> as we fine tune math fonts for sure you get suboptimal results (or even
> wrong output). Mikael and I put quite a bit of care into lucida opentype
> math.
> 
> > I do agree with you in that that loading time is perhaps unacceptable but…
> > ...
> > You ought to specify that must be only after subsequent callbacks. I just 
> > tried it with a one liner file of \setupbodyfont[lucida] and (looking 
> > around in disbelief) it took a whooping ahem
> > fonts   > names > skipped files: 164
> > fonts   > names > duplicate files  : 164
> > fonts   > names > total scan time  : 16.487 seconds
> 
> I have no clue, unless that relates to your font path including some home
> dir which gets scanned every time for whatever reason and that has tens of
> thousands of files. I can process the 350+ page luametatex manual twice in
> these 16 seconds and that one loads quite some (also math) fonts and my
> laptop is not a fancy 2023 one
> 
> > before it produced even error messages.
> > 
> > beating me for 2 seconds. Great. And then it restricted my freedom by saying
> > 
> > «Sorry, but I can't typeset math unless various parameters have been set. 
> > This is
> > normally done by loading special math fonts into the math family slots. 
> > Your font
> > set is lacking at least the parameter mentioned earlier.»
> 
> that's pretty clear: you don't load a math font at all, maybe some text font
> pretending it is math
> 
> > Sorry, but sorry doesn't cut it here.
> 
> it does: no proper math font found so reason to complain
> 
> > I guess it must have been referring to  \strc_formulas_place_number 
> > \strc_formulas_flush_number \dostarttagged \t!formulacontent \empty 
> > \dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter 
> > \c!alternative \v!formula \endcsname
> 
> dunno, that's numbering, not math
> 
> > Okay. So I tried another file. This time around with only
> > 
> > \setupbodyfont[lucida]
> > 
> > \starttext
> > $ test $
> > \stoptext
> > 
> > and then the output message was «Somewhere in the math formula just ended, 
> > you used the stated character from an
> > undefined font family. For example, plain TeX doesn't allow \it or \sl in
> > subscripts. Proceed, and I'll try to forget that I needed that character.»
> > 
> > There's not even a fallback to cmr or any other font.
> 
> sure, why should it, you want lucida so better quit with an error than
> kicking in some font; actually cmr math fonts have been obsoleted for way
> over a decade by latin modern math fonts in 32 bit font engines

I was actually thinking to ask you about that, and by falling back to cmr math 
font that perhaps would expedite loading time along the way. 

Thank you for the info on that last sentence. I didn't know. 
> 
> > There was not even a personalized touch in the output. That message sounds 
> > like one of these new GPT-chat features. Dry. When I read that «Proceed, 
> > and I'll try to forget it…» part the first thing I thought was: yeah, I'll 
> > proceed by removing that file altogether and you'll forget it for sure .
> 
> that message is part of 'reference tex the program' for over 40 years so if
> chatgpt would come up with it, it would do so by having parsed plenty of tex
> sources instead of inventing it (and when it comes to answering tex related
> questions chargpt is pretty unreliable, but that's another topic)
> 
> > But instaed I looked at it and though to myself «how much has changed?!» In 
> > plain TeX (I have forgotten it a bit) but I can still type
> > > \par
> > > $test$
> > > \end
> > 
> > and it'll produce a dvi file in return.
> 
> a lot has changed: opentype math, unicode, more demands but indeed there is
> nothing against using plain tex with cmr and dvi fonts if that suits well;
> and plain tex will always be faster than context (or latex) just like pdftex
> with 8 bit fonts is faster than luatex with 32 bit fonts (with luametatex
> sitting in between wrt performance)
>  anyway, i bet that if you want to use lucida with plain you also have to do
> some work and it will complain as loud as luametatex when th efont
> parameters are not set
> 

At this 

[NTG-context] Stack overflow when using Neo Euler for math

2023-03-31 Thread Rory Molinari via ntg-context
Hi,

I'm in the process of updating to TeXlive 2023 after a long time of light
use with 2018. One issue I'm now having is an error when I try to use Neo
Euler as my math font.

\definefontfamily[mypalatinoeuler][rm][TeX Gyre Pagella]
\definefontfamily[mypalatinoeuler][mm][Neo Euler]

\setupbodyfont[mypalatinoeuler]

\starttext
$x=1$
\stoptext

Result:

mathematics > tweak > 'Neo-Euler', size 7, math size 3, version
'Version 000.002' found, version 'Version 000.002 ' expected
tex error   > tex error on line 5 in file ./euler_problem.tex:

lua error:

registered function call [1160]:
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254: stack
overflow
stack traceback:
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3254:
in upvalue 'add'
... (skipping 99970 levels)
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3267:
in local 'action'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3617:
in upvalue 'tweaklist'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3653:
in upvalue 'applytweaks'
...xlive/2023/texmf-dist/tex/context/base/mkxl/math-act.lmt:3682:
in upvalue 'mathematics_tweakaftercopyingfont'
[string "local mathematics_tweakaftercopyingfont = mat..."]:5: in
local 'runner'
...xlive/2023/texmf-dist/tex/context/base/mkxl/font-ctx.lmt:510: in
field 'aftercopyingcharacters'
...xlive/2023/texmf-dist/tex/context/base/mkxl/font-con.lmt:859: in
field 'scale'
...xlive/2023/texmf-dist/tex/context/base/mkxl/font-otl.lmt:659: in
function <...xlive/2023/texmf-dist/tex/context/base/mkxl/font-otl.lmt:651>
(...tail calls...)
...xlive/2023/texmf-dist/tex/context/base/mkxl/font-def.lmt:378: in
function <...xlive/2023/texmf-dist/tex/context/base/mkxl/font-def.lmt:366>
(...tail calls...)
...xlive/2023/texmf-dist/tex/context/base/mkxl/font-def.lmt:485: in
field 'read'
...xlive/2023/texmf-dist/tex/context/base/mkxl/font-ctx.lmt:1377:
in function
<...xlive/2023/texmf-dist/tex/context/base/mkxl/font-ctx.lmt:1234>
(...tail calls...)

It works if I use, say, [TeX Gyre Pagella Math] in place of [Neo Euler].

15:49:15 $ context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
/usr/local/texlive/2023/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2023.03.10 12:15
mtx-context | main context file:
/usr/local/texlive/2023/texmf-dist/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2023.03.10 12:15


I don't know how to diagnose any further.

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

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


Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 8:16 PM, Ulrike Fischer via ntg-context wrote:

Am Fri, 31 Mar 2023 10:10:43 +0200 schrieb Hans Hagen via
ntg-context:


\usemodule[tikz]

\starttext
Hello World.
\stoptext
works ok here



It fails for me in texlive 2023.


works here


I don't know who changed what here, but it looks like a catcode


something in tikz i guess

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


Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 6:43 PM, Aditya Mahajan via ntg-context wrote:

On Fri, 31 Mar 2023, Hans Hagen via ntg-context wrote:


On 3/30/2023 11:56 PM, Xavier B. via ntg-context wrote:

Thanks, Max, for finding the problem. It is related to two more bugs:
https://github.com/pgf-tikz/pgf/issues/990
and
https://github.com/pgf-tikz/pgf/issues/958

Perhaps Hans or other people could help tikz staff to do the pending and
definitive solution.
It's annoying to have to put workarrounds in production documents.

There is just a glad mkiv user ;-)

\usemodule[tikz]

\starttext
   Hello World.
\stoptext

works ok here


Last time I tested, a simple \starttikzpicture \draw (0,0)--(1,0); 
\stoptikzpicture was failing. I'll try again with the latest version of LMTX + 
TikZ.

Hans, are you using the latest version of tikz from ctan? Some of these issues 
are due to recent changes made in tikz.

What should i take ... is there one has-it-all zip there?

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


Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Ulrike Fischer via ntg-context
Am Fri, 31 Mar 2023 10:10:43 +0200 schrieb Hans Hagen via
ntg-context:

> \usemodule[tikz]
> 
> \starttext
>Hello World.
> \stoptext
> works ok here


It fails for me in texlive 2023. 

I don't know who changed what here, but it looks like a catcode
problem. context loads tikz files in m-tikz.mkxl with
\tikzinputfiles, and that calls \setcatcodetable\texcatcodes. After
that ~ has catcode 12 and that breaks the \let~\pdfmath@char@quote
in the pgfmathparser.code.tex file 

\begingroup
  \lccode`\~=`\"
  \lowercase{\endgroup
\def\pgfmath@catcodes{%
  \catcode`\==12 %
  \catcode`\,=12 %
  \catcode`\|=12 %
  \catcode`\&=12 %
  \let~\pgfmath@char@quote
}}%



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

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

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


Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Aditya Mahajan via ntg-context
On Fri, 31 Mar 2023, Hans Hagen via ntg-context wrote:

> On 3/30/2023 11:56 PM, Xavier B. via ntg-context wrote:
> > Thanks, Max, for finding the problem. It is related to two more bugs:
> > https://github.com/pgf-tikz/pgf/issues/990
> > and
> > https://github.com/pgf-tikz/pgf/issues/958
> > 
> > Perhaps Hans or other people could help tikz staff to do the pending and
> > definitive solution.
> > It's annoying to have to put workarrounds in production documents.
> > 
> > There is just a glad mkiv user ;-)
> \usemodule[tikz]
> 
> \starttext
>   Hello World.
> \stoptext
> 
> works ok here

Last time I tested, a simple \starttikzpicture \draw (0,0)--(1,0); 
\stoptikzpicture was failing. I'll try again with the latest version of LMTX + 
TikZ. 

Hans, are you using the latest version of tikz from ctan? Some of these issues 
are due to recent changes made in tikz. 

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

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


Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 1:40 PM, Carlos via ntg-context wrote:


so why not use lucida math fonts?


I have. But only with a couple of math fonts. I don't have all these fonts.


It really pays off to buy the official lucida opentype package.


mkiv lua stats  > loaded fonts: 3 files: lucidanewmathitalic.ttf, 
lucidanewmathsymbol.ttf, lucidabrightregular.otf
mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 6 instances, 3 
shared in backend, 1 common vectors, 2 common hashes, load time 16.733 seconds


I never heard of these math ones. Did you get these from yandytex (no 
longer around) or TUG (the official distributer of lucida opentype 
math)? Anyway, as we fine tune math fonts for sure you get suboptimal 
results (or even wrong output). Mikael and I put quite a bit of care 
into lucida opentype math.



I do agree with you in that that loading time is perhaps unacceptable but…

> ...

You ought to specify that must be only after subsequent callbacks. I just tried 
it with a one liner file of \setupbodyfont[lucida] and (looking around in 
disbelief) it took a whooping ahem
fonts   > names > skipped files: 164
fonts   > names > duplicate files  : 164
fonts   > names > total scan time  : 16.487 seconds


I have no clue, unless that relates to your font path including some 
home dir which gets scanned every time for whatever reason and that has 
tens of thousands of files. I can process the 350+ page luametatex 
manual twice in these 16 seconds and that one loads quite some (also 
math) fonts and my laptop is not a fancy 2023 one



before it produced even error messages.

beating me for 2 seconds. Great. And then it restricted my freedom by saying

«Sorry, but I can't typeset math unless various parameters have been set. This 
is
normally done by loading special math fonts into the math family slots. Your 
font
set is lacking at least the parameter mentioned earlier.»


that's pretty clear: you don't load a math font at all, maybe some text 
font pretending it is math



Sorry, but sorry doesn't cut it here.


it does: no proper math font found so reason to complain


I guess it must have been referring to  \strc_formulas_place_number 
\strc_formulas_flush_number \dostarttagged \t!formulacontent \empty 
\dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter 
\c!alternative \v!formula \endcsname


dunno, that's numbering, not math


Okay. So I tried another file. This time around with only

\setupbodyfont[lucida]

\starttext
$ test $
\stoptext

and then the output message was «Somewhere in the math formula just ended, you 
used the stated character from an
undefined font family. For example, plain TeX doesn't allow \it or \sl in
subscripts. Proceed, and I'll try to forget that I needed that character.»

There's not even a fallback to cmr or any other font.


sure, why should it, you want lucida so better quit with an error than 
kicking in some font; actually cmr math fonts have been obsoleted for 
way over a decade by latin modern math fonts in 32 bit font engines



There was not even a personalized touch in the output. That message sounds like 
one of these new GPT-chat features. Dry. When I read that «Proceed, and I'll 
try to forget it…» part the first thing I thought was: yeah, I'll proceed by 
removing that file altogether and you'll forget it for sure .


that message is part of 'reference tex the program' for over 40 years so 
if chatgpt would come up with it, it would do so by having parsed plenty 
of tex sources instead of inventing it (and when it comes to answering 
tex related questions chargpt is pretty unreliable, but that's another 
topic)



But instaed I looked at it and though to myself «how much has changed?!» In 
plain TeX (I have forgotten it a bit) but I can still type
> \par
> $test$
> \end

and it'll produce a dvi file in return.


a lot has changed: opentype math, unicode, more demands but indeed there 
is nothing against using plain tex with cmr and dvi fonts if that suits 
well; and plain tex will always be faster than context (or latex) just 
like pdftex with 8 bit fonts is faster than luatex with 32 bit fonts 
(with luametatex sitting in between wrt performance)
 anyway, i bet that if you want to use lucida with plain you also have 
to do some work and it will complain as loud as luametatex when th efont 
parameters are not set


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 / 

Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Xavier B. via ntg-context

> > I reported that tikz is not working a few months ago, but after a few back 
> > and forth with Hans, could not get it to work. At that time, it appeared 
> > that I was the only have having issues, so I thought that I was making a 
> > mistake in how I was installing the package.
> > 
> > I have reverted to using mkiv for my course notes, because I heavily use 
> > pgfplots and that is not working in LMTX. (I was also using some nice new 
> > features of metafun, and have had to resort to compiling them externally 
> > using LMTX via the filter module and compiling the main doc with MkIV).
> afaik tikz should work ok, so can you make a test file?
> 
> Hans


Perhaps this is a good test. It's a complete example:

\setupcolors[state=start]
\definecolor[darkgreen][g=.5]
\usemodule[tikz] 

\starttext

\starttikzpicture[  scale=3,line cap=round
axes/.style=, 
important line/.style={very thick},
information text/.style={rounded 
corners,fill=red!10,inner sep=1ex} ]

\draw[help lines,step=0.5cm] (-1.4,-1.4) grid (1.4,1.4);
\draw (0,0) circle (1cm);   
\draw[->] (-1.5,0) -- (1.5,0) node[right] {$x$} coordinate(x 
axis);
\draw[->] (0,-1.5) -- (0,1.5) node[above] {$y$} coordinate(y 
axis);
\foreach \x/\xtext in {-1, -.5/-\frac{1}{2}, 1} 
   
\draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt) 
   
node[below,fill=white] {$\xtext$};
\foreach \y/\ytext in {-1, -.5/-\frac{1}{2}, .5/\frac{1}{2}, 1}
\draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt)
node[left,fill=white] {$\ytext$};
\filldraw[fill=green!20,draw=green!50!black] (0,0) -- (3mm,0pt) 
arc(0:30:3mm);
\draw (15:2mm) node[green!50!black] {$\alpha$};
\draw[important line,red]
(30:1cm) -- node[left=1pt,fill=white] {$\sin \alpha$} (30:1cm 
|- x axis);
\draw[important line,blue]
(30:1cm |- x axis) -- node[below=2pt,fill=white] {$\cos 
\alpha$} (0,0);
\draw[important line,orange!80!black] (1,0) -- 
node[right=1pt,fill=white] {
$\displaystyle \tan \alpha \black =
\frac{{\red \sin \alpha}}{\blue \cos \alpha}$}
(intersection of 0,0--30:1cm and 1,0--1,1) coordinate (t);
\draw (0,0) -- (t);
\draw[xshift=1.85cm]
node[right,text width=6cm,information text]
{
The {\darkgreen angle $\alpha$} is $30^\circ$ in the
example ($\pi/6$ in radians). The {\red sine of
$\alpha$}, which is the height of the red line, is
\startformula
{\red \sin \alpha} = 1/2.
\stopformula
By the Theorem of Pythagoras ...
};
\stoptikzpicture

\stoptext


Taking from tikz manual [https://wiki.contextgarden.net/TikZ]

Xavier

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

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


Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Carlos via ntg-context
On Wed, Mar 29, 2023 at 12:48:53AM +0200, Hans Hagen via ntg-context wrote:
> On 3/28/2023 7:05 PM, Carlos via ntg-context wrote:
> > On Mon, Mar 27, 2023 at 03:43:47PM +0200, Hans Hagen via ntg-context wrote:
> > > On 3/27/2023 3:31 PM, Carlos via ntg-context wrote:
> > > 
> > > > mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
> > > > lmroman10-regular.otf, lucidabrightregular.ttf, lucidasansregular.ttf
> > > 
> > > i admit never having seen lucida ttf files (but when opentype ttf files 
> > > are
> > > used with an afm file present then no map files are needed at all because
> > > we're in wide font mode and encidings are ignored)
> > > 
> > 
> > I hadn't either.  But everything aligned and thought it was nice.
> > 
> > You're right that loading a map file is not needed, but If you're concerned 
> > about afm files then bring these files over to the working directory, and 
> > then mtxrun --generate the same
> > 
> > So yes. Even though the file was something like (intended originally to 
> > load the map file, correct?) but since the map file is no longer necessary 
> > then afm should suffice
> > 
> > \starttypescript [serif] [lucida] [texnansi]
> > 
> > \definefontsynonym[LucidaBrightDemiBold][texnansi-lucidabrightdemibold][encoding=texnansi]
> > 
> > \definefontsynonym[LucidaBrightDemiItalic][texnansi-lucidabrightdemiitalic][encoding=texnansi]
> > 
> > \definefontsynonym[LucidaBrightItalic][texnansi-lucidabrightitalic][encoding=texnansi]
> > 
> > \definefontsynonym[LucidaBrightRegular][texnansi-lucidabrightregular][encoding=texnansi]
> > \stoptypescript
> 
> these encodings only make sense with mkii (in which case the map file tells
> pdftex if a ttf or pfb file is used)
> 
> in mkiv encodings are ignored,  when a ttf/otf file is used no afm is read,
> and when a pfb fils is used the afm is used (ligature adn kerning info etc)
> but a wide font is assembled
> 
> (when a ttf is used the lucidaot typescript file can serve as example)
> 
> in mkxl we assume the otf files sold by TUG are used (recently the math font
> was updated)
> 
> > and not with the file specification as in:
> > 
> > 
> > \starttypescript [mylucidaserif] % or mylucidasans
> >\definefontsynonym[LucidaBrightRegular][file:LucidaBrightRegular]
> >\definefontsynonym[LucidaBrightItalic] [file:LucidaBrightItalic]
> >\definefontsynonym[LucidaBrightBold]   [file:LucidaBrightDemiBold]
> > \stoptypescript
> > 
> > and \setups[font:fallback:serif:sans] wouldn't be needed either
> > 
> > you'd end up with
> 
> in mkxl (lmtx)
> 
> \setupbodyfont[lucida]
> 
> will load open type definitions
> 
> > mkiv lua stats  > loaded patterns: en::1, load time: 0.000
> > mkiv lua stats  > loaded fonts: 4 files: lucidabrightregular.otf, 
> > lucidasansregular.otf, latinmodern-math.otf, lmroman10-regular.otf
> 
> so why not use lucida math fonts?

I have. But only with a couple of math fonts. I don't have all these fonts. 

mkiv lua stats  > loaded fonts: 3 files: lucidanewmathitalic.ttf, 
lucidanewmathsymbol.ttf, lucidabrightregular.otf
mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 6 instances, 3 
shared in backend, 1 common vectors, 2 common hashes, load time 16.733 seconds 

I do agree with you in that that loading time is perhaps unacceptable but…
> 
> > > > mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 12 
> > > > instances, 5 shared in backend, 3 common vectors, 2 common hashes, load 
> > > > time 16.898 seconds
> 
> > > i assume that you don't get this 16 seconds load time each run
> > 
> > You're correct. That's why you recommended to use otf first .
> even with type one fonts 17 sec load time for a few fonts is not okay, i
> expect more something like:
> 
> mkiv lua stats  > loaded fonts: 3 files: lucidabrightmathot.otf,
> lucidabrightot.otf, lucidasansot.otf
> mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 14
> instances, 10 shared in backend, 6 common vectors, 4 common hashes, load
> time 0.161 seconds

You ought to specify that must be only after subsequent callbacks. I just tried 
it with a one liner file of \setupbodyfont[lucida] and (looking around in 
disbelief) it took a whooping ahem 
fonts   > names > skipped files: 164
fonts   > names > duplicate files  : 164
fonts   > names > total scan time  : 16.487 seconds

before it produced even error messages.

beating me for 2 seconds. Great. And then it restricted my freedom by saying

«Sorry, but I can't typeset math unless various parameters have been set. This 
is
normally done by loading special math fonts into the math family slots. Your 
font
set is lacking at least the parameter mentioned earlier.»

Sorry, but sorry doesn't cut it here. 

I guess it must have been referring to  \strc_formulas_place_number 
\strc_formulas_flush_number \dostarttagged \t!formulacontent \empty 
\dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter 

Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Hans Hagen via ntg-context

On 3/30/2023 11:56 PM, Xavier B. via ntg-context wrote:

Thanks, Max, for finding the problem. It is related to two more bugs:
https://github.com/pgf-tikz/pgf/issues/990
and
https://github.com/pgf-tikz/pgf/issues/958

Perhaps Hans or other people could help tikz staff to do the pending and 
definitive solution.
It's annoying to have to put workarrounds in production documents.

There is just a glad mkiv user ;-)

\usemodule[tikz]

\starttext
  Hello World.
\stoptext

works ok here

\usemodule[tikz]

\starttext
\starttikzpicture
\node [left color=red, right color=yellow] {Hello};
\stoptikzpicture
\stoptext

fails on

\setbox \pgfutil@tempboxa =\hbox dir
TLT to\pgfmathresult pt{\vbox

because we don't have 'dir TLT' in luametatex (and more engines don't so 
i would expect tikz to have some abstraction for that)


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


Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Hans Hagen via ntg-context

On 3/30/2023 8:52 PM, Xavier B. via ntg-context wrote:

Hi,

I use artix linux (a fork of arch with systemd alternative init systems).
During the texlive package, I get this error:

return {
  
["filename"]="/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex",
  ["lastcontext"]="\n \n \\inaccessible \n \n \"\n\\pgfmath@catcodes 
->\\catcode `\\==12 \\catcode `\\,=12 \\catcode `\\|=12 \\catcode `\\&=12 \\let \"\n 
  \\pgfmath@char@quote \n\\pgfmathparse ->\\begingroup \\pgfmath@catcodes \n  
 \\pgfmath@quickparsefalse \\ifpgfmathfloat \\let \\pgfmath@parse@next =\\pgfmathfloatparsenumber \\else \\let \\pgfmath@parse@next 
=\\pgfmathparse@ \\fi \\pgfmath@parse@next \n \\pgfmathparse \n   {1cm}\\ifpgfmathmathunitsdeclared \\pgf@x 
\\pgfmathresult mu\\relax \\else \\pgf@x \\pgfmathresult pt\\relax \\fi \n\\pgfmath@next #1#2->#2\n   \n...\nl.926 
\\pgfsetxvec{\\pgfpoint{1cm}{0cm}}\n ",
  ["lastluaerror"]="?",
  ["lasttexerror"]="! Missing control sequence inserted",
  ["linenumber"]=926,
  ["offset"]=10,
}

I simply run context to this file:

\usemodule[tikz]

\starttext
{\bf a} \tikz (0,0) -- (1,0);
\stoptext

i have little clue about tikz but shouldn't that be something

\tikz \draw (0,0) -- (1,0);

at least that gives a line here.

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


Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 2:42 AM, Aditya Mahajan via ntg-context wrote:

On Thu, 30 Mar 2023, Xavier B. via ntg-context wrote:


Thanks, Max, for finding the problem. It is related to two more bugs:
https://github.com/pgf-tikz/pgf/issues/990
and
https://github.com/pgf-tikz/pgf/issues/958

Perhaps Hans or other people could help tikz staff to do the pending and 
definitive solution.
It's annoying to have to put workarrounds in production documents.

There is just a glad mkiv user ;-)


I reported that tikz is not working a few months ago, but after a few back and 
forth with Hans, could not get it to work. At that time, it appeared that I was 
the only have having issues, so I thought that I was making a mistake in how I 
was installing the package.

I have reverted to using mkiv for my course notes, because I heavily use 
pgfplots and that is not working in LMTX. (I was also using some nice new 
features of metafun, and have had to resort to compiling them externally using 
LMTX via the filter module and compiling the main doc with MkIV).

afaik tikz should work ok, so can you make a test file?

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


Re: [NTG-context] meta-imp-fen in mkxl?

2023-03-31 Thread Hans Hagen via ntg-context

On 3/30/2023 6:22 PM, Thomas A. Schmitz via ntg-context wrote:

Hi all,

I wanted to use a rightbrace as background for a table, as defined in 
meta-imp-fen.mkiv. Unfortunately, I can't get it to work, for 2 reasons:


1. meta-imp-fen doesn't appear to be ported to mkxl.

2. When I try to compile with the --luatex switch, I get this error 
message:


tex error   > tex error on line 101 in file 
/mnt/shared/lmtx/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv: ! Undefined control sequence


l.101 \newinteger
    \c_grph_replacement_n


So, I'm a bit stymied right now. What can be done?


\let\newinteger\newcount

i'll add that to mkiv

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


Re: [NTG-context] Numbering of figures after defining a new float

2023-03-31 Thread Willi Egger via ntg-context
Thank you Alan, I tried many different things but as Wolfgang pointed out I had 
a mistake in the float definition!

Kind regards

WIlli

> On 31 Mar 2023, at 00:08, Alan Braslau via ntg-context  
> wrote:
> 
> Have you tried:
> 
> \setuplist [figure] [partnumber=no]
> 
> ...
> 
> \placelistoffigures [criterium=part]
> 
> 
> 
> Alan
> 
> 
> On Thu, 30 Mar 2023 17:09:15 +0200
> Willi Egger via ntg-context  wrote:
> 
>> Hello everybody,
>> 
>> 
>> I am still working on the previously mentioned project, consisting
>> out of different parts. There are about 25 chapters in each part and
>> most of the chapters contain figures. When using the predefined
>> figure environment, then all figures in the figure-list are placed
>> correctly though at each part the numbering restarts.
>> 
>> Now I tried to implement for each part its own float environment,
>> which enables me to produce a figure-list per part with subtitels.
>> How ever in the newly defined floats there is no continuous numbering
>> i.e. chapternumber.serialnumber. Instead each float get the chapter
>> number only.
>> 
>> How to get the numbering right?
>> 
>> Kind regards
>> Willi
>> 
>> The following example shows what happens:
>> 
>> \useMPlibrary[dum]
>> 
>> \definefloat[Afigure][Afigures][figures]
>> \definefloat[Bfigure][Bfigures][figures]
>> 
>> \setuphead
>>  [part]
>>  [placehead=yes,
>>   page=yes]
>> 
>> \setuphead
>>  [chapter]
>>  [page=no]
>> 
>> \starttext
>> 
>> \starttitle[title=List of figures]
>>  \startsubject[title=Figures (predefined figureenvironment)]
>>\placelistoffigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures A]
>>  \placelistofAfigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures B]
>>\placelistofBfigures
>>  \stopsubject
>> \stoptitle
>> 
>> \startpart[title=Part ONE]
>> \startchapter[title={Chapter one in part one}] %les21
>> 
>> \startplaceAfigure
>>  [location=left,
>>   reference=fig:dumA,
>>   title={Dummy A}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \startplacefigure
>>  [location=left,
>>   reference=fig:dumB,
>>   title={Dummy B}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplacefigure
>> 
>> \startsection[title=Section A]
>> 
>> \startplaceAfigure
>>  [location=left,
>>   reference=fig:dumC,
>>   title={Dummy C}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \stopsection
>> \stopchapter
>> \stoppart
>> 
>> \startpart[title=Part TWO]
>> \startchapter[title=Chapter one in part two]
>> 
>> \startplaceBfigure
>>  [location=left,
>>   reference=fig:dumD,
>>   title={Dummy D}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceBfigure
>> \stopchapter
>> \stoppart
>> \stoptext
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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