Re: [NTG-context] METAPOST subpath rounding issue

2020-05-09 Thread Bruce Horrocks
> You can save extracting the xparts and yparts by using direct subtraction of 
> pairs and comparing with (0,0) like this:

Aaaargh, no, ignore that, it's nonsense. It's amazing how you can stare at 
something for minutes but only see the flaw the moment you press send. Sorry 
for the noise.

--
Bruce Horrocks
Hampshire, UK

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

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


Re: [NTG-context] METAPOST subpath rounding issue

2020-05-09 Thread Bruce Horrocks


> On 8 May 2020, at 13:58, Gerben Wierda  wrote:
> 
>> On 8 May 2020, at 00:46, n...@scorecrow.com wrote:
>> 
>>> On 7 May 2020, at 20:28, Gerben Wierda  wrote:
>>> 
>>> I have a METAPOST algorithm that splits a path at a certain time in two, 
>>> does something with both ends (not the ends where they were split) and then 
>>> rejoins them.
>>> 
>>> In very rare cases this crashes, because the subpath doesn’t work as 
>>> expected.
>>> 
>>>  firstPart := subpath (0,halfWayTime) of workingConn;
>>>  secondPart := subpath (halfWayTime,pathTimeLen) of workingConn;
>>> 
>>> may sometimes result in something like this:
>>> 
>>> metapost log> >> Path at line 0:
>>> metapost log> (273,-427)..controls (259.50,-427) and 
>>> (246.013335,-427)
>>> metapost log>  ..(232.520001,-427)
>>> metapost log> 
>>> metapost log> >> Path at line 0:
>>> metapost log> (232.519998,-427)..controls 
>>> (161.680001,-427) and (90.84000
>>> metapost log> 03,-427)
>>> metapost log>  ..(20,-427)
>>> 
>>> As can be seen in these (rare) cases the two calls to subpath result in a 
>>> different point resulting from both. so, when I later try to rejoin them 
>>> with & it fails:
>>> 
>>> metapost log> ! Paths don't touch; '&' will be changed to '..'.
>>> metapost log>  
>>> 
>>> Which means subpath doesn’t always exactly do what I expect it to do (and 
>>> many explanations, but not the official manual) state. Again, this is rare.
>>> 
>>> I’ve done this to work around it but I wondered if there was a better 
>>> (reliable) solution
>>> 
>>>  save cutFirstPart; path cutFirstPart; cutFirstPart := firstPart 
>>> maxcutbefore fromPicOutline;
>>>  save cutSecondPart; path cutSecondPart; cutSecondPart := secondPart 
>>> maxcutafter toPicOutline;
>>>  if ((xpart point 0 of cutSecondPart) <> (xpart point infinity of 
>>> cutFirstPart))
>>>or ((ypart point 0 of cutSecondPart) <> (ypart point infinity of 
>>> cutFirstPart)):
>>>resultConn := cutFirstPart--cutSecondPart;
>>>  else:
>>>resultConn := cutFirstPart & cutSecondPart;
>>>  fi
>> 
>> A crude test of 
>> 
>>  path pb;
>>  pb:=(5.5cm,0cm)--(5.5cm,0cm)--(10.5cm,0cm);
>>  draw pb;
>> 
>> gives no errors so why not just join using -- all the time and save the test?
> 
> Because the double exact points are also creating (different) problems in my 
> algorithm as they make the path have 'no direction' at that point (direction 
> is (0,0).

You can save extracting the xparts and yparts by using direct subtraction of 
pairs and comparing with (0,0) like this:

\starttext
\startMPcode
path cutFirstPart,cutSecondPart;

cutFirstPart := (0,0) -- (232.520001,-427);
cutSecondPart := (232.519998,-427) -- (999,-427);
%cutFirstPart := (0,0) -- (232.520001,-427);
%cutSecondPart := (232.520001,-427) -- (999,-427);

if (point infinity of cutFirstPart) - (point 0 of cutSecondPart) = (0,0) :
  label("same", (1cm,1cm))
else :
  label("different", (1cm,1cm))
fi;
\stopMPcode
\stoptext

*Except* that the example doesn't work with floats that are so close. Changing 
232.52_etc to 332.52_etc works as expected. I'm hoping that this is a "feature" 
of the parser reading in the example at a lower precision than the number of 
decimals provided. For your code, where the different values are created by 
calculation, the two pairs should be recognised as different.

--
Bruce Horrocks
Hampshire, UK

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

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


Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Hans Hagen

On 5/9/2020 9:15 PM, Rik Kabel wrote:


So, I did a clean install. It fails to properly install, reporting:



l.2982 \normalsupmarkmode



If this is not user error (mine), perhaps this is a win64 build problem?
I can't imagine, as I compile these win binaries here using the mingw 
cross compiler under WLS (1). I also compile native binaries (a little 
slower than the cross compiled but a smaller file) and clang binaries 
(much slower and larger). The farm also has a windows set up now for 
luametatex but I just use the ones I make here. So, what gets shipped, 
the mingw ones, should work ok. (The native ones are part of the the 
backup plan, as on enevrr knows what will happen with mingw, not that 
the compilation is demanding.)


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] error during the installation of luametatex

2020-05-09 Thread Hans Hagen

On 5/9/2020 6:26 PM, Giulio Bertellini wrote:

>>  sh-3.2# context metafun

Ha, I admit that I never tried that yet with lmtx. (The reason is that I 
then have to enter updating mode for all these new features. More 
something for end-of-the-year dark evenings with a stack of new cd's.)


>> mkiv lua stats> lua properties: engine: lua 5.4, used memory: 179 MB,
>> ctx: 166 MB, max: 168 MB, hash chars: min(64,40), symbol mask: utf (τεχ)
>>
>> mkiv lua stats> runtime: 20.702 seconds, 392 processed pages, 392
>> shipped pages, 18.936 pages/second

Ok, that is not bad (I think on my already old machine one run took some 
18 seconds for luatex and of course in mkii with pdftex I could watch a 
movie while processing the file.)


The memory footprint also looks ok, especially given all these graphics. 
(in most cases lmtx has a smaller memory footprint.)


>> Please consider that this mac mini is quite old and I am running mac
>> OS Catalina on an external SSD.   This was the first installation on
>> Mac of Context today. I am quite happy with the results.

because in the meantime even a raspberry pi has become useable, I wonder 
how this new microsoft arm (running at 3G) laptop will perform.


>> I also installed the same LMTX Context release on the Linux Subsystem
>> for  Microsoft Windows 10 and on different versions of Arch Linux.
>> with the same excellent results.

Good.

>> Thanks again for the excellent work,

Thanks.

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] \mathopen, \Uover and friends

2020-05-09 Thread Hans Hagen

On 5/9/2020 6:29 PM, Otared Kavian wrote:

Hi Hans,

Thanks for the quick fix of today's upload.
I could typeset your examples with \mathopen, \mathclose and these are great 
features in order to fine tune the spacing in math mode.

Regarding the new command \Uover, I thought maybe it would be more consistent 
to have the usual structure
${1} \Uover {2}$
like the more friendly ${1} \over {2}$ instead of having


That would involve backtracking and be a psin in the butt wrt control. 
One can't have it all.



$\Uover{1}{2}$
which is more like the \frac structure.


Watch out: these are low level primitives (it is actually a set of 
primitives that put stuff on top of each other). The \frac is the 
interfaced variant.



Also a structure like
$\Uover style \textstyle{1}{2}$
seems a little bit far from the usual ConTeXt atmposphere… Would it not be 
possible to have
${1} \Uover[style=textstyle] {2}$
instead?


That is what we have frac for (and one can define veriants that have set 
styles).



In any case, thanks a lot for the constant addition of cute features…
Some of these engine level extensions have been on my list for a while 
and eventually make implementing the user interfaced wrappers nicer (and 
sometimes more robust). Some is actually possible because some engine 
internals are a bit reorganized.


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] error during the installation of luametatex

2020-05-09 Thread Rik Kabel


On 5/9/2020 12:26, Giulio Bertellini wrote:

*
*
*about LuaMetaTeX, Version 2.06.02*  On Mac OS Catalina 10.15.4 .
Hope this may convey some useful information. On Mac OS Catalina 
10.15.4 ( Mac mini late 2012, I5, 16GB RAM), using the current LMTX 
version just downloaded from Pragma Ade, I installed Context LMTX and 
tested the download by compiling the Metafun manual sources as 
indicated below:



 sh-3.2# context metafun


resolvers | formats | executing runner 'run luametatex format': 
/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin/luametatex 
--jobname="metafun" 
--fmt=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt 
--lua=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui 
cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./metafun" 
--c:input="./metafun" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin"


This is LuaMetaTeX, Version 2.06.02

open source > level 1, order 1, name 'cont-yes.mkiv'

system>

system> ConTeXtver: 2020.05.09 15:37 MKIV betafmt: 2020.5.9int: 
english/english


system>

system> 'cont-new.mkiv' loaded

open source > level 2, order 2, name 
'/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'


system> beware: some patches loaded from cont-new.mkiv

close source> level 2, order 2, name 
'/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'


system> files > jobname 'metafun', input './metafun', result 'metafun'

*
*
*Final result of this compilation:*

mkiv lua stats> used engine: luametatex version: 2.0602, functionality 
level: 20200508, format id: 498, compiler: clang


mkiv lua stats> control sequences: 51925 of 65536 + 10

mkiv lua stats> lua properties: engine: lua 5.4, used memory: 179 MB, 
ctx: 166 MB, max: 168 MB, hash chars: min(64,40), symbol mask: utf (τεχ)


mkiv lua stats> runtime: 20.702 seconds, 392 processed pages, 392 
shipped pages, 18.936 pages/second


system| total runtime: 113.221 seconds of 113.291 seconds




Please consider that this mac mini is quite old and I am running mac 
OS Catalina on an external SSD.   This was the first installation on 
Mac of Context today. I am quite happy with the results.


I  wish to express my appreciation for the outstanding work that Hans 
and the entire Context contributors team have carried out with focus 
and perseverance through the years.  Hello to Otared and Luigi with 
whom I  was in contact many years ago at the time of MKII .


I also installed the same LMTX Context release on the Linux Subsystem 
for  Microsoft Windows 10 and on different versions of Arch Linux. 
with the same excellent results.


Thanks again for the excellent work,

Giulio

Giulio Bertellini

On Sat, May 9, 2020 at 4:41 PM Rik Kabel > wrote:



On 5/9/2020 09:33, Hans Hagen wrote:

On 5/9/2020 3:27 PM, Rik Kabel wrote:


On 5/9/2020 02:52, Hans Hagen wrote:

looks like a wrong binary .. should be 2.06.02 .. can you try
this binary:

http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the
legacy machine has gone off line which happens when osx updates
itself and gets stuck half way, i'll look into it)

Hans



I have the following update log entries (left column is EDT),
indicating a roll-back of the binary:

    2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
    2020.05.07T11:03
    2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
    2020-05-07T10:59:03  LuaMetaTeX functionality updated from
20200402
    to 20200506
    2020-05-07T10:59:03
    2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
    2020.05.08T20:50
    2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to
2.05.01
    2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
    20200506 to 20200402
    2020-05-08T15:14:26
    2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
    2020.05.09T08:55
    2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
    2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at
20200402
    2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

no, i uploaded a new lmtx only (not sure why the date is old then)


what version does the binary report?



It reports what the log says. My update program simply scrapes the
version report. The version report in full is:

This is LuaMetaTeX, Version 2.05.01

Execute 'luametatex --credits' for credits and version details.

There is NO warranty. Redistribution of this software is
covered by the 

[NTG-context] \mathopen, \Uover and friends

2020-05-09 Thread Otared Kavian
Hi Hans,

Thanks for the quick fix of today's upload. 
I could typeset your examples with \mathopen, \mathclose and these are great 
features in order to fine tune the spacing in math mode.

Regarding the new command \Uover, I thought maybe it would be more consistent 
to have the usual structure 
${1} \Uover {2}$ 
like the more friendly ${1} \over {2}$ instead of having
$\Uover{1}{2}$ 
which is more like the \frac structure.

Also a structure like
$\Uover style \textstyle{1}{2}$
seems a little bit far from the usual ConTeXt atmposphere… Would it not be 
possible to have
${1} \Uover[style=textstyle] {2}$ 
instead?

In any case, thanks a lot for the constant addition of cute features…
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] error during the installation of luametatex

2020-05-09 Thread Giulio Bertellini
*about LuaMetaTeX, Version 2.06.02*   On Mac OS Catalina 10.15.4 .
Hope this may convey some useful information. On Mac OS Catalina 10.15.4 (
Mac mini late 2012, I5, 16GB RAM), using the current LMTX version just
downloaded from Pragma Ade, I installed Context LMTX and tested the
download by compiling the Metafun manual sources as indicated below:



   sh-3.2# context metafun


resolvers   | formats | executing runner 'run luametatex format':
/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin/luametatex
--jobname="metafun"
--fmt=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./metafun"
--c:input="./metafun" --c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin"

This is LuaMetaTeX, Version 2.06.02

open source > level 1, order 1, name 'cont-yes.mkiv'

system  >

system  > ConTeXt  ver: 2020.05.09 15:37 MKIV beta  fmt: 2020.5.9  int:
english/english

system  >

system  > 'cont-new.mkiv' loaded

open source > level 2, order 2, name
'/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > beware: some patches loaded from cont-new.mkiv

close source> level 2, order 2, name
'/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'metafun', input './metafun', result
'metafun'

*Final result of this compilation:*

mkiv lua stats  > used engine: luametatex version: 2.0602, functionality
level: 20200508, format id: 498, compiler: clang

mkiv lua stats  > control sequences: 51925 of 65536 + 10

mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 179 MB,
ctx: 166 MB, max: 168 MB, hash chars: min(64,40), symbol mask: utf (τεχ)

mkiv lua stats  > runtime: 20.702 seconds, 392 processed pages, 392 shipped
pages, 18.936 pages/second

system  | total runtime: 113.221 seconds of 113.291 seconds




Please consider that this mac mini is quite old and I am running mac OS
Catalina on an external SSD.   This was the first installation on Mac of
Context today. I am quite happy with the results.

I  wish to express my appreciation for the outstanding work that Hans and
the entire Context contributors team have carried out with focus and
perseverance through the years.  Hello to Otared and Luigi with whom I  was
in contact many years ago at the time of MKII .

I also installed the same LMTX Context release on the Linux Subsystem for
Microsoft Windows 10 and on different versions of Arch Linux. with the same
excellent results.

Thanks again for the excellent work,

Giulio

Giulio Bertellini

On Sat, May 9, 2020 at 4:41 PM Rik Kabel 
wrote:

>
> On 5/9/2020 09:33, Hans Hagen wrote:
>
> On 5/9/2020 3:27 PM, Rik Kabel wrote:
>
>
> On 5/9/2020 02:52, Hans Hagen wrote:
>
> looks like a wrong binary .. should be 2.06.02 .. can you try this binary:
>
> http://dl.contextgarden.net/build/luametatex/x86_64-darwin/
>
> (the farm generates two binaries for osx and it looks like the legacy
> machine has gone off line which happens when osx updates itself and gets
> stuck half way, i'll look into it)
>
> Hans
>
>
> I have the following update log entries (left column is EDT), indicating a
> roll-back of the binary:
>
> 2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
> 2020.05.07T11:03
> 2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
> 2020-05-07T10:59:03  LuaMetaTeX functionality updated from 20200402
> to 20200506
> 2020-05-07T10:59:03
> 2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
> 2020.05.08T20:50
> 2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to 2.05.01
> 2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
> 20200506 to 20200402
> 2020-05-08T15:14:26
> 2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
> 2020.05.09T08:55
> 2020-05-09T09:19:39LuaMetaTeX unchanged at 2.05.01
> 2020-05-09T09:19:39LuaMetaTeX functionality unchanged at 20200402
> 2020-05-09T09:19:39
>
> Perhaps there is an problem with the installation files?
>
> no, i uploaded a new lmtx only (not sure why the date is old then)
>
>
> what version does the binary report?
>
>
> It reports what the log says. My update program simply scrapes the version
> report. The version report in full is:
>
> This is LuaMetaTeX, Version 2.05.01
>
> Execute 'luametatex --credits' for credits and version details.
>
> There is NO warranty. Redistribution of this software is covered by the
> terms
> of the GNU General Public License, version 2 or (at your option) any later
> version. For more 

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel


On 5/9/2020 09:33, Hans Hagen wrote:

On 5/9/2020 3:27 PM, Rik Kabel wrote:


On 5/9/2020 02:52, Hans Hagen wrote:
looks like a wrong binary .. should be 2.06.02 .. can you try this 
binary:


http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the 
legacy machine has gone off line which happens when osx updates 
itself and gets stuck half way, i'll look into it)


Hans


I have the following update log entries (left column is EDT), 
indicating a roll-back of the binary:


    2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
    2020.05.07T11:03
    2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
    2020-05-07T10:59:03  LuaMetaTeX functionality updated from 20200402
    to 20200506
    2020-05-07T10:59:03
    2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
    2020.05.08T20:50
    2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to 2.05.01
    2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
    20200506 to 20200402
    2020-05-08T15:14:26
    2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
    2020.05.09T08:55
    2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
    2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at 
20200402

    2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

no, i uploaded a new lmtx only (not sure why the date is old then)


what version does the binary report?



It reports what the log says. My update program simply scrapes the 
version report. The version report in full is:


   This is LuaMetaTeX, Version 2.05.01

   Execute 'luametatex --credits' for credits and version details.

   There is NO warranty. Redistribution of this software is covered by
   the terms
   of the GNU General Public License, version 2 or (at your option) any
   later
   version. For more information about these matters, see the file
   named COPYING
   and the LuaTeX source.

   Functionality : level 20200402
   Support   : cont...@ntg.nl
   Copyright : The Lua(Meta)TeX Team(s) (2005-2020+)

   The LuaMetaTeX project is related to ConTeXt development. This macro
   package
   tightly integrates TeX and MetaPost in close cooperation with Lua.

And the context version report is:


   mtx-context | ConTeXt Process Management 1.03
   mtx-context |
   mtx-context | main context file:
   C:/LMTX/tex/texmf-context/tex/context/base/mkiv/context.mkiv
   mtx-context | current version: 2020.05.09 08:55
   mtx-context | main context file:
   C:/LMTX/tex/texmf-context/tex/context/base/mkiv/context.mkxl
   mtx-context | current version: 2020.05.09 08:55

--
Rik
___
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 during the installation of luametatex

2020-05-09 Thread Hans Hagen

On 5/9/2020 3:27 PM, Rik Kabel wrote:


On 5/9/2020 02:52, Hans Hagen wrote:
looks like a wrong binary .. should be 2.06.02 .. can you try this 
binary:


http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the legacy 
machine has gone off line which happens when osx updates itself and 
gets stuck half way, i'll look into it)


Hans


I have the following update log entries (left column is EDT), indicating 
a roll-back of the binary:


2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
2020.05.07T11:03
2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
2020-05-07T10:59:03  LuaMetaTeX functionality updated from 20200402
to 20200506
2020-05-07T10:59:03
2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
2020.05.08T20:50
2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to 2.05.01
2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
20200506 to 20200402
2020-05-08T15:14:26
2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
2020.05.09T08:55
2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at 20200402
2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

no, i uploaded a new lmtx only (not sure why the date is old then)


what version does the binary report?

-
  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] error during the installation of luametatex

2020-05-09 Thread Rik Kabel


On 5/9/2020 02:52, Hans Hagen wrote:
looks like a wrong binary .. should be 2.06.02 .. can you try this 
binary:


http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the legacy 
machine has gone off line which happens when osx updates itself and 
gets stuck half way, i'll look into it)


Hans


I have the following update log entries (left column is EDT), indicating 
a roll-back of the binary:


   2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
   2020.05.07T11:03
   2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
   2020-05-07T10:59:03  LuaMetaTeX functionality updated from 20200402
   to 20200506
   2020-05-07T10:59:03
   2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
   2020.05.08T20:50
   2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to 2.05.01
   2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
   20200506 to 20200402
   2020-05-08T15:14:26
   2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
   2020.05.09T08:55
   2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
   2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at 20200402
   2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

--
Rik

___
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] Use \unit for value and uncertainty

2020-05-09 Thread Otared Kavian
Hi Benjamin,

Thanks for sharing your nice code, which is very useful.
However I wanted to let you know that it seems it does not work correctly with 
LuaMetaTeX version 2020.04.30 11:10, even though it works fine with ConTeXt 
mkiv.

Best regards: Otared K.

> On 9 May 2020, at 12:39, Benjamin Buchmuller  
> wrote:
> 
> I know this is quite an old thread, but here is a minimal parser (\units with 
> an “s”) that wraps around \digits and \unit to produce an acceptable output. 
> 
> As I frequently need to write ranges (or measures of uncertainty), I find it 
> convenient to able to type
> 
> \units{4.0 to 5.0 centi meter} 
> 
> than 
> 
> \digits{4.0}\,to\,\unit{5.0 centi meter}.
> 
> Also, the parser will take care of exponents and bracket them accordingly. :D
> 
> ranges: keyword “to”: 4.0 – 5.0 cm
> SEM:keyword “se”: 4.5 ± 0.5 cm
> SD: keyword “sd”: 4.5 (0.5) cm
> 
> If no keyword is present, the default behaviour is \unit{…}.
> 
> The code is not perfect (and the level of abstraction potentially not yet 
> sufficient to make it part of the phys-dim.mkiv source), but maybe helpful.
> 
> \starttext
> 
> \startluacode
>   userdata = userdata or {}
>   
>   function userdata.units(input)
>   
>   tbl = string.explode(input)
>   
>   if tbl[2] == "to" then
>   context.digits(tbl[1])
>   context.phys_units_space()
>   context("--")
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 3))
>   elseif tbl[2] == "se" then
>   local sx1 = string.split(tbl[1], "e")
>   local sx2 = string.split(tbl[3], "e")
>   if (sx1[2] == sx2[2]) and not (sx1[2] == nil) then
>   context("(")
>   context.digits(sx1[1])
>   context.phys_units_space()
>   context("±")
>   context.phys_units_space()
>   context.digits(sx2[1])
>   context(")")
>   context.digits("e" .. sx1[2])
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 4))
>   else
>   context.digits(tbl[1])
>   context.phys_units_space()
>   context("±")
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 3))
>   end
>   elseif tbl[2] == "sd" then
>   local sx1 = string.split(tbl[1], "e")
>   local sx2 = string.split(tbl[3], "e")
>   if (sx1[2] == sx2[2]) and not (sx1[2] == nil) then
>   context.digits(sx1[1])
>   context.phys_units_space()
>   context("(")
>   context.digits(sx2[1])
>   context(")")
>   context.digits("e" .. sx1[2])
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 4))
>   else
>   context.digits(tbl[1])
>   context.phys_units_space()
>   context("(")
>   context.digits(tbl[3])
>   context(")")
>   context.unit(table.concat(tbl, " ", 4))
>   end
>   else
>   context.unit(table.concat(tbl, " "))
>   end
>   
>   end
> \stopluacode
> 
> \def\units#1{\ctxlua{userdata.units("#1")}}
> 
> Car 1 drives \units{4 to 5.2 kilo meter per hour}.
> 
> Car 2 drives \units{30.1 to 40.5 kilo meter per hour}.
> 
> Car 3 drives \units{40.= to 50.= kilo meter per hour}.
> 
> The average speed was \units{35,000 se 5000 meter per hour}.
> 
> The average speed was \units{35e3 se 0.5e3 meter per hour}.
> 
> The average speed was \units{35.2e3 se 5e2 meter per hour}.
> 
> \stoptext
> 
> The average speed was \units{35.2 se 5e2 meter per hour}.
> 
> The average speed was \units{_3.2 sd 5 meter per hour}.
> ___
> 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] Use \unit for value and uncertainty

2020-05-09 Thread Benjamin Buchmuller
I know this is quite an old thread, but here is a minimal parser (\units with 
an “s”) that wraps around \digits and \unit to produce an acceptable output. 

As I frequently need to write ranges (or measures of uncertainty), I find it 
convenient to able to type

\units{4.0 to 5.0 centi meter} 

than 

\digits{4.0}\,to\,\unit{5.0 centi meter}.

Also, the parser will take care of exponents and bracket them accordingly. :D

ranges: keyword “to”: 4.0 – 5.0 cm
SEM:keyword “se”: 4.5 ± 0.5 cm
SD: keyword “sd”: 4.5 (0.5) cm

If no keyword is present, the default behaviour is \unit{…}.

The code is not perfect (and the level of abstraction potentially not yet 
sufficient to make it part of the phys-dim.mkiv source), but maybe helpful.

\starttext

\startluacode
userdata = userdata or {}

function userdata.units(input)

tbl = string.explode(input)

if tbl[2] == "to" then
context.digits(tbl[1])
context.phys_units_space()
context("--")
context.phys_units_space()
context.unit(table.concat(tbl, " ", 3))
elseif tbl[2] == "se" then
local sx1 = string.split(tbl[1], "e")
local sx2 = string.split(tbl[3], "e")
if (sx1[2] == sx2[2]) and not (sx1[2] == nil) then
context("(")
context.digits(sx1[1])
context.phys_units_space()
context("±")
context.phys_units_space()
context.digits(sx2[1])
context(")")
context.digits("e" .. sx1[2])
context.phys_units_space()
context.unit(table.concat(tbl, " ", 4))
else
context.digits(tbl[1])
context.phys_units_space()
context("±")
context.phys_units_space()
context.unit(table.concat(tbl, " ", 3))
end
elseif tbl[2] == "sd" then
local sx1 = string.split(tbl[1], "e")
local sx2 = string.split(tbl[3], "e")
if (sx1[2] == sx2[2]) and not (sx1[2] == nil) then
context.digits(sx1[1])
context.phys_units_space()
context("(")
context.digits(sx2[1])
context(")")
context.digits("e" .. sx1[2])
context.phys_units_space()
context.unit(table.concat(tbl, " ", 4))
else
context.digits(tbl[1])
context.phys_units_space()
context("(")
context.digits(tbl[3])
context(")")
context.unit(table.concat(tbl, " ", 4))
end
else
context.unit(table.concat(tbl, " "))
end

end
\stopluacode

\def\units#1{\ctxlua{userdata.units("#1")}}

Car 1 drives \units{4 to 5.2 kilo meter per hour}.

Car 2 drives \units{30.1 to 40.5 kilo meter per hour}.

Car 3 drives \units{40.= to 50.= kilo meter per hour}.

The average speed was \units{35,000 se 5000 meter per hour}.

The average speed was \units{35e3 se 0.5e3 meter per hour}.

The average speed was \units{35.2e3 se 5e2 meter per hour}.

\stoptext

The average speed was \units{35.2 se 5e2 meter per hour}.

The average speed was \units{_3.2 sd 5 meter per hour}.
___
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] Current version 2020.05.09 08:55 not working

2020-05-09 Thread Otared Kavian
Hi Hans,

I just updated to the latest version 2020.05.09 08:55 but when trying your 
examples with \mathopenup and friends noticed that ConTeXt is stuck with 

resolvers > lua > loading file 
'/context-osx-64/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' succeeded

or with

context report > file: cont-en-status.html

and other such messages.

Actually even with a simple example like

\starttext
Test
\stoptext

one cannot run the latest version at least on MacOS X (I did remove the texmf 
cache).

When in a Terminal window I issue the commands

context --make -all

I see that there is an error message like:

tex error > tex error on line 2981 in file math-ini.mkxl: ! Undefined 
control sequence

l.2981 \normalsupmarkmode
 \plusone % 2 also disable ^[^+] in text mode 

 

The control sequence at the end of the top line of your error message 
was never \def'ed. You can just continue as I'll forget about whatever was 
undefined.

Best regards: OK
___
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 during the installation of luametatex

2020-05-09 Thread Hans Hagen

On 5/9/2020 4:50 AM, Jeong Dal wrote:

Hi,

I tried to update luametatex which was running well(it was installed 
following the process in the wiki>installation> MacOsX catalina), but I 
got the following error after all the files are downloaded.


resolvers       > lua > loading file 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' 
succeeded


tex error       > tex error on line 2960 in file math-ini.mkxl: ! 
Undefined control sequence


l.2960 \normalsupmarkmode
                        \plusone % 2 also disable ^[^+] in text mode




The control sequence at the end of the top line of your error message 
was never

\def'ed. You can just continue as I'll forget about whatever was undefined.

looks like a wrong binary .. should be 2.06.02 .. can you try this binary:

http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the legacy 
machine has gone off line which happens when osx updates itself and gets 
stuck half way, i'll look into 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
___


[NTG-context] error during the installation of luametatex

2020-05-09 Thread Jeong Dal
Hi,

I tried to update luametatex which was running well(it was installed following 
the process in the wiki>installation> MacOsX catalina), but I got the following 
error after all the files are downloaded.

resolvers   > lua > loading file 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' 
succeeded

tex error   > tex error on line 2960 in file math-ini.mkxl: ! Undefined 
control sequence

l.2960 \normalsupmarkmode
   \plusone % 2 also disable ^[^+] in text mode




The control sequence at the end of the top line of your error message was never
\def'ed. You can just continue as I'll forget about whatever was undefined.


resolvers   | formats |
resolvers   | formats | binary path  : 
/Users/graph/ConTeXtL/tex/texmf-osx-64/bin
resolvers   | formats | format path  : 
/Users/graph/ConTeXtL/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex
resolvers   | formats | luatex engine: luametatex


However, the installation continues to end. 
But the same error appears when I compile a tex file.

***
resolvers   > lua > loading file 
'/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' 
succeeded

tex error   > tex error on line 2960 in file math-ini.mkxl: ! Undefined 
control sequence

l.2960 \normalsupmarkmode
   \plusone % 2 also disable ^[^+] in text mode




The control sequence at the end of the top line of your error message was never
\def'ed. You can just continue as I'll forget about whatever was undefined.


resolvers   | formats |
resolvers   | formats | binary path  : 
/Users/graph/ConTeXtLM/tex/texmf-osx-64/bin
resolvers   | formats | format path  : 
/Users/graph/ConTeXtLM/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex
resolvers   | formats | luatex engine: luametatex
resolvers   | formats | lua startup file : 
/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
resolvers   | formats | context file : 
/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/cont-en.mkxl
*

I’d like to know what is wrong in this process.

Thank you for reading.

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
___