Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sun, 21 Mar 2021, Hans Hagen wrote:

> On 3/20/2021 10:03 PM, Aditya Mahajan wrote:
> > On Sat, 20 Mar 2021, Hans Hagen wrote:
> > 
> > > > 
> > > > I wonder if we could have an environment, say \startluatemplate ...
> > > > \stopluatemplate, which is evaluated on the fly rather than when loading
> > > > a
> > > > file.
> > > 
> > > define 'evaluated on the fly'
> > 
> > Consider the following example:
> > 
> > \enablemode[A]
> > \starttext
> > \startluatemplate
> >
> >\starttyping
> >A and not B
> >\stoptyping
> >
> >\starttyping
> >not (A and not B)
> >\stoptyping
> >
> > \stopluatemplate
> > \stoptext
> > 
> > What I am thinking is that \startluatemplate ... \stopluatemplate grabs the
> > content (like a buffer) and then processes it using the mkix conversion
> > mechanism. Thus, in terms of output, it should be equivalent to:
> > 
> > \enablemode[A]
> > \starttext
> > \startbuffer[luatemplate]
> >
> >\starttyping
> >A and not B
> >\stoptyping
> >
> >\starttyping
> >not (A and not B)
> >\stoptyping
> >
> > \stopbuffer
> > \savebuffer[file={\jobname-luatemplate.mkix}, list={luatemplate}]
> > \input \jobname-luatemplate.mkix
> > \stoptext
> > 
> > but without the need to save to an external file.
> this is just for the mode right? in that case we can also can provide
> 
> 

:-)

I don't use templates too often, so I don't have other examples in mind where 
the \startluatemplate ... \stopluatemplate might be needed. So, just adding 
tex.enablemode at the lua will also work. We can see if another use case comes 
up in the future!

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

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


Re: [NTG-context] XML/MathML namespace handling bug

2021-03-20 Thread Hans Hagen

On 3/20/2021 10:52 PM, Hugo Landau wrote:

Thanks for ConTeXt, it is an amazing system.

The following test case demonstrates the bug.

   \usemodule[mathml]
   \starttext
   \xmlprocessdata{}{
   
   http://www.example.com/ns/foo; 
xmlns:m="http://www.w3.org/1998/Math/MathML;>
   
 ab
   
   
 ab
   
   
   }{}
   \stoptext

No output is produced. This has been verified with live.contextgarden.net.

In order for output to be produced,  must be changed to  and
 must be changed to , but these are in the wrong
namespace in this context. In other words, this bug applies to the keyword
element in an apply element.

in x-math.mkiv search for

   \startxmlsetups mml:apply

and replace this bit:

\edef\mmlapplyaction{\xmlfilter{#1}{/*/tag()}}
\doifelsesetups {mml:apply:mml:\mmlapplyaction} {
\xmlsetup{#1}{mml:apply:mml:\mmlapplyaction}
 } {
\xmlsetup{#1}{mml:\mmlapplyaction}
 }

(btw, isn't content mathml more fun than presentation mathml?)

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] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen

On 3/20/2021 10:03 PM, Aditya Mahajan wrote:

On Sat, 20 Mar 2021, Hans Hagen wrote:



I wonder if we could have an environment, say \startluatemplate ...
\stopluatemplate, which is evaluated on the fly rather than when loading a
file.


define 'evaluated on the fly'


Consider the following example:

\enablemode[A]
\starttext
\startluatemplate
   
   \starttyping
   A and not B
   \stoptyping
   
   \starttyping
   not (A and not B)
   \stoptyping
   
\stopluatemplate
\stoptext

What I am thinking is that \startluatemplate ... \stopluatemplate grabs the 
content (like a buffer) and then processes it using the mkix conversion 
mechanism. Thus, in terms of output, it should be equivalent to:

\enablemode[A]
\starttext
\startbuffer[luatemplate]
   
   \starttyping
   A and not B
   \stoptyping
   
   \starttyping
   not (A and not B)
   \stoptyping
   
\stopbuffer
\savebuffer[file={\jobname-luatemplate.mkix}, list={luatemplate}]
\input \jobname-luatemplate.mkix
\stoptext

but without the need to save to an external file.

this is just for the mode right? in that case we can also can provide



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] Formula numbering including all prefix segments

2021-03-20 Thread Adam Reviczky
Hi,

Is there a way to have formula numbers showing all prefix segments?
When I use prefixsegments, I get the desired numbering in the placelist but
not in the formula number itself.

For example:
\starttext
\setupcaption[figure][way=bytext,prefixsegments=1:*]
\setupformulas[way=bytext,prefixsegments=1:*]
\startsection[title=Section]
\startsubsection[title=SubSection]
\startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stopsubsection
\stopsection
\placelistoffigures[criterium=all]
\placelist[formula][criterium=all]
\stoptext

The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
number 1.1 but is listed as 1.1.1.
I would like to have the formula numbered 1.1.1 as well (as referenced in
the placelist), so with section and subsection numbering.

Adam
___
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 subject)

2021-03-20 Thread Adam Reviczky
Hi,

Is there a way to have formula numbers showing all prefix segments?
When I use prefixsegments, I get the desired numbering in the placelist but
not in the formula number itself.

For example:
\starttext
\setupcaption[figure][way=bytext,prefixsegments=1:*]
\setupformulas[way=bytext,prefixsegments=1:*]
\startsection[title=Section]
\startsubsection[title=SubSection]
\startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stopsubsection
\stopsection
\placelistoffigures[criterium=all]
\placelist[formula][criterium=all]
\stoptext

The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
number 1.1 but is listed as 1.1.1.
I would like to have the formula numbered 1.1.1 as well (as referenced in
the placelist), so with section and subsection numbering.

Adam
___
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] XML/MathML namespace handling bug

2021-03-20 Thread Hugo Landau
Thanks for ConTeXt, it is an amazing system.

The following test case demonstrates the bug.

  \usemodule[mathml]
  \starttext
  \xmlprocessdata{}{
  
  http://www.example.com/ns/foo; 
xmlns:m="http://www.w3.org/1998/Math/MathML;>
  
ab
  
  
ab
  
  
  }{}
  \stoptext

No output is produced. This has been verified with live.contextgarden.net.

In order for output to be produced,  must be changed to  and
 must be changed to , but these are in the wrong
namespace in this context. In other words, this bug applies to the keyword
element in an apply element. 

Hugo Landau
___
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] Build fails on fresh installs

2021-03-20 Thread Pablo Rodriguez
On 3/20/21 8:11 PM, Thangalin wrote:
> [...]
> Actual
> Build fails.
>
> resolvers       > lua > loading file
> '/home/username/context/tex/texmf-context/tex/context/base/mkxl/spac-hor.lmt'
> succeeded
> tex error       > tex error on line 25 in file spac-hor.mkxl: Undefined
> control sequence
>  \bitwiseflip \normalizelinemode \flattendiscretionariescode
> 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.
> ...
> mtx-context     | error, no format found with name: cont-en, aborting

This thread
(https://mailman.ntg.nl/pipermail/ntg-context/2021/101645.html) reports
the same problem.

Latest from today has this problem either installing it from scratch or
updating it.

You need the binaries for Linux that Wolfgang provided (Linux and
Windows only):
https://www.dropbox.com/sh/liggfcfulksscvf/AAD1gIlsRaKFSUIebDx2vxiLa?dl=0.

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

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


Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sat, 20 Mar 2021, Hans Hagen wrote:

> > 
> > I wonder if we could have an environment, say \startluatemplate ...
> > \stopluatemplate, which is evaluated on the fly rather than when loading a
> > file.
> 
> define 'evaluated on the fly'

Consider the following example:

\enablemode[A]
\starttext
\startluatemplate
  
  \starttyping
  A and not B
  \stoptyping
  
  \starttyping
  not (A and not B)
  \stoptyping
  
\stopluatemplate
\stoptext

What I am thinking is that \startluatemplate ... \stopluatemplate grabs the 
content (like a buffer) and then processes it using the mkix conversion 
mechanism. Thus, in terms of output, it should be equivalent to:

\enablemode[A]
\starttext
\startbuffer[luatemplate]
  
  \starttyping
  A and not B
  \stoptyping
  
  \starttyping
  not (A and not B)
  \stoptyping
  
\stopbuffer
\savebuffer[file={\jobname-luatemplate.mkix}, list={luatemplate}]
\input \jobname-luatemplate.mkix
\stoptext

but without the need to save to an external file. 

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

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


Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen

On 3/20/2021 9:23 PM, Aditya Mahajan wrote:

On Sat, 20 Mar 2021, Hans Hagen wrote:


On 3/20/2021 4:00 PM, Christoph Reller wrote:

On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen mailto:j.ha...@xs4all.nl>> wrote:

 On 3/20/2021 8:24 AM, Aditya Mahajan wrote:
  > On Sat, 20 Mar 2021, Christoph Reller wrote:
  >> Of course we can do this in lua:
  >>
  >> if tex.modes["A"] and not tex.modes{"B"] then
  >> ...
  >> end
  >
  > ... which means that you can use that at the context end as well
 (old feature).
  > Save the following as test.mkix (or add "% macros=mkix" as the
 first line):
  >
  > ```
  > \starttext
  > 
  > \starttyping
  > A and not B
  > \stoptyping
  > 
  > \starttyping
  > not (A and not B)
  > \stoptyping
  > 
  > \stoptext
 a neat application!


Thank you for this hint, Aditya. This would be a very nice solution
indeed. But it does not seem to work:

% macros=mkix
\definemode[A][yes]
\starttext
\startluacode
    if tex.modes['A'] then
      context("A")
    end
\stopluacode

A

\stoptext

With ConTeXt LMTX 2021.03.17 the output of the above is a single "A". I
would expect two. What am I doing wrong?


When the file gets preprocessed the mode is not known

context --mode=A foo.tex

it does of course also work when you set the mode in a parent file and
then include foo.tex


I wonder if we could have an environment, say \startluatemplate ... 
\stopluatemplate, which is evaluated on the fly rather than when loading a file.


define 'evaluated on the fly'


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
___




--

-
  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] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sat, 20 Mar 2021, Hans Hagen wrote:

> On 3/20/2021 4:00 PM, Christoph Reller wrote:
> > On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen  > > wrote:
> > 
> > On 3/20/2021 8:24 AM, Aditya Mahajan wrote:
> >  > On Sat, 20 Mar 2021, Christoph Reller wrote:
> >  >> Of course we can do this in lua:
> >  >>
> >  >> if tex.modes["A"] and not tex.modes{"B"] then
> >  >> ...
> >  >> end
> >  >
> >  > ... which means that you can use that at the context end as well
> > (old feature).
> >  > Save the following as test.mkix (or add "% macros=mkix" as the
> > first line):
> >  >
> >  > ```
> >  > \starttext
> >  > 
> >  > \starttyping
> >  > A and not B
> >  > \stoptyping
> >  > 
> >  > \starttyping
> >  > not (A and not B)
> >  > \stoptyping
> >  > 
> >  > \stoptext
> > a neat application!
> > 
> > 
> > Thank you for this hint, Aditya. This would be a very nice solution 
> > indeed. But it does not seem to work:
> > 
> > % macros=mkix
> > \definemode[A][yes]
> > \starttext
> > \startluacode
> >    if tex.modes['A'] then
> >      context("A")
> >    end
> > \stopluacode
> > 
> > A
> > 
> > \stoptext
> > 
> > With ConTeXt LMTX 2021.03.17 the output of the above is a single "A". I 
> > would expect two. What am I doing wrong?
> 
> When the file gets preprocessed the mode is not known
> 
> context --mode=A foo.tex
> 
> it does of course also work when you set the mode in a parent file and 
> then include foo.tex

I wonder if we could have an environment, say \startluatemplate ... 
\stopluatemplate, which is evaluated on the fly rather than when loading a 
file. 

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
___


[NTG-context] Build fails on fresh installs

2021-03-20 Thread Thangalin
VirtualBox 6.1.18 + ConTeXt
Perform OS installations using defaults and the following values:

   - Set regular username to: username
   - Set guest computer name to: computer

Use ConTeXt binaries appropriate for OS:

   - FreeBSD -
   http://lmtx.pragma-ade.nl/install-lmtx/context-freebsd-amd64.zip
   - Xubuntu/Debian -
   http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip

ConTeXt version 2021.03.20 01:07. See questions at the end.

Instructions
After an OS is installed, complete the following steps:

   1. Start VirtualBox
   2. Install ISO
   3. Log in as root
   4. Open a terminal
   5. Install wget
   6. Install gcc
   7. Install Guest Additions (to enable copy/paste between guest/host)
   8. Log in as username
   9. Open a terminal
   10. mkdir context
   11. cd context
   12. Download OS-specific ConTeXt binary
   13. unzip *zip
   14. sh install.sh
   15. Export PATH environment variable (OS-specific; see below)
   16. context --version
   17. mkdir -p ../tex
   18. cd ../tex
   19. Create "hello.tex": \starttext Hello \stoptext
   20. context hello.tex
   21. Stop VirtualBox

Expected
A hello.pdf file is created.

Actual
Build fails.

resolvers   > lua > loading file
'/home/username/context/tex/texmf-context/tex/context/base/mkxl/spac-hor.lmt'
succeeded
tex error   > tex error on line 25 in file spac-hor.mkxl: Undefined
control sequence
 \bitwiseflip \normalizelinemode \flattendiscretionariescode
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.
...
mtx-context | error, no format found with name: cont-en, aborting

Debian 10.8.0

   -
   
https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.8.0-amd64-xfce.iso

Additional instructions:

   - usermod -aG sudo username
   - apt install wget gcc
   - export PATH=/home/username/context/tex/texmf-linux-64/bin:$PATH

Xubuntu 20.04.2

   -
   
http://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/20.04/release/xubuntu-20.04.2.0-desktop-amd64.iso

Additional instructions:

   - usermod -aG sudo username
   - apt install wget gcc
   - export PATH=/home/username/context/tex/texmf-linux-64/bin:$PATH

FreeBSD 12.2

   -
   
https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.2/FreeBSD-12.2-RELEASE-amd64-dvd1.iso.xz

Additional instructions:

   - pkg install security/sudo
   - pkg install wget gcc xor slim xfce
   - pw group mod wheel -m username
   - visudo (add username to sudoers)
   - export PATH=/home/username/context/tex/texmf-freebsd-amd64/bin:$PATH

Are there additional requirements that must be installed? If so, what are
they and is there a way for ConTeXt itself to list them for the user?

Thank you!
___
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] Problems with new ConTeXt in Linux

2021-03-20 Thread Pablo Rodriguez
On 3/20/21 2:41 PM, Wolfgang Schuster wrote:
> Jairo A. del Rio schrieb am 20.03.2021 um 14:21:
>> I deleted the .tma files. I'm still having the same issue.
>
> You have to wait for newer binaries but you can also try the ones I put
> online (will be deleted in a few days):
>
> https://www.dropbox.com/sh/liggfcfulksscvf/AAD1gIlsRaKFSUIebDx2vxiLa?dl=0

Many thanks for the binaries, Wolfgang.

I ran into the same problem after updating ConTeXt.

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
___


Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen

On 3/20/2021 4:00 PM, Christoph Reller wrote:
On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen > wrote:


On 3/20/2021 8:24 AM, Aditya Mahajan wrote:
 > On Sat, 20 Mar 2021, Christoph Reller wrote:
 >> Of course we can do this in lua:
 >>
 >> if tex.modes["A"] and not tex.modes{"B"] then
 >> ...
 >> end
 >
 > ... which means that you can use that at the context end as well
(old feature).
 > Save the following as test.mkix (or add "% macros=mkix" as the
first line):
 >
 > ```
 > \starttext
 > 
 > \starttyping
 > A and not B
 > \stoptyping
 > 
 > \starttyping
 > not (A and not B)
 > \stoptyping
 > 
 > \stoptext
a neat application!


Thank you for this hint, Aditya. This would be a very nice solution 
indeed. But it does not seem to work:


% macros=mkix
\definemode[A][yes]
\starttext
\startluacode
   if tex.modes['A'] then
     context("A")
   end
\stopluacode

A

\stoptext

With ConTeXt LMTX 2021.03.17 the output of the above is a single "A". I 
would expect two. What am I doing wrong?


When the file gets preprocessed the mode is not known

context --mode=A foo.tex

it does of course also work when you set the mode in a parent file and 
then include foo.tex


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] Typing within doifmode leads to error

2021-03-20 Thread Christoph Reller
On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen  wrote:

> On 3/20/2021 8:24 AM, Aditya Mahajan wrote:
> > On Sat, 20 Mar 2021, Christoph Reller wrote:
> >> Of course we can do this in lua:
> >>
> >> if tex.modes["A"] and not tex.modes{"B"] then
> >> ...
> >> end
> >
> > ... which means that you can use that at the context end as well (old
> feature).
> > Save the following as test.mkix (or add "% macros=mkix" as the first
> line):
> >
> > ```
> > \starttext
> > 
> > \starttyping
> > A and not B
> > \stoptyping
> > 
> > \starttyping
> > not (A and not B)
> > \stoptyping
> > 
> > \stoptext
> a neat application!
>
>
Thank you for this hint, Aditya. This would be a very nice solution indeed.
But it does not seem to work:

% macros=mkix
\definemode[A][yes]
\starttext
\startluacode
  if tex.modes['A'] then
context("A")
  end
\stopluacode

A

\stoptext

With ConTeXt LMTX 2021.03.17 the output of the above is a single "A". I
would expect two. What am I doing wrong?

Christoph
___
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] Problems with new ConTeXt in Linux

2021-03-20 Thread Jairo A. del Rio
Thank you very much. For the moment, it solves the problem.

Jairo

El sáb, 20 de mar. de 2021 a la(s) 08:41, Wolfgang Schuster (
wolfgang.schuster.li...@gmail.com) escribió:

> Jairo A. del Rio schrieb am 20.03.2021 um 14:21:
> > I deleted the .tma files. I'm still having the same issue.
>
> You have to wait for newer binaries but you can also try the ones I put
> online (will be deleted in a few days):
>
> https://www.dropbox.com/sh/liggfcfulksscvf/AAD1gIlsRaKFSUIebDx2vxiLa?dl=0
>
> Wolfgang
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Problems with new ConTeXt in Linux

2021-03-20 Thread Werner Hennrich

not a Linux related Problem IMHO - I'm having none of that kind under
both Arch and Debian.
HTH! W

Am 20.03.21 um 08:13 schrieb Jairo A. del Rio:

When I update to ConTeXt LMTX version 2021.03.20 01:07, the following
happens during format generation:

tex error       > tex error on line 25 in file spac-hor.mkxl:
Undefined control sequence

 \bitwiseflip \normalizelinemode \flattendiscretionariescode



So, what is happening here?

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] Problems with new ConTeXt in Linux

2021-03-20 Thread Wolfgang Schuster

Jairo A. del Rio schrieb am 20.03.2021 um 14:21:

I deleted the .tma files. I'm still having the same issue.


You have to wait for newer binaries but you can also try the ones I put 
online (will be deleted in a few days):


https://www.dropbox.com/sh/liggfcfulksscvf/AAD1gIlsRaKFSUIebDx2vxiLa?dl=0

Wolfgang

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

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


Re: [NTG-context] Problems with new ConTeXt in Linux

2021-03-20 Thread Jairo A. del Rio
I deleted the .tma files. I'm still having the same issue.

Jairo

El sáb, 20 de mar. de 2021 a la(s) 06:00, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 3/20/2021 8:13 AM, Jairo A. del Rio wrote:
> > When I update to ConTeXt LMTX version 2021.03.20 01:07, the following
> > happens during format generation:
> >
> > tex error   > tex error on line 25 in file spac-hor.mkxl: Undefined
> > control sequence
> >
> >  \bitwiseflip \normalizelinemode \flattendiscretionariescode
> >
> > 
> >
> > So, what is happening here?
> are you sure that you have the new binary?
>
> -
>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] Keeping track of hyphenations

2021-03-20 Thread Hans Hagen

On 3/19/2021 9:49 PM, denis.ma...@ub.unibe.ch wrote:

Wow, Hans, that looks awesome. Thanks a lot.

This is a nice example:

\setuplayout[tight]

\usebodyfont[modern]
\usebodyfont[pagella]
\usebodyfont[ebgaramond]
\usebodyfont[dejavu]

% \enabletrackers[hyphenation.applied]
\enabletrackers[hyphenation.applied.visualize]
% \enabletrackers[hyphenation.applied.console]

\startbuffer
\samplefile{tufte}
\blank
{\hsize 4em \dorecurse{4}{x\discretionary{aa}{bb}{cc}x #1 }}
\blank
\stopbuffer

\starttext

\switchtobodyfont[modern] \getbuffer
\switchtobodyfont[pagella]\getbuffer
\switchtobodyfont[ebgaramond] \getbuffer
\switchtobodyfont[dejavu] \getbuffer

\stoptext

When tex had constructed lines, there are so called discretionary nodes 
left; the pre part gets appended at the end of a line, the postpart 
injected at the start of the next one. Officially the discretionaries 
stay although in mkiv/lmtx we wipe them from the lines.


In the example above you see 'red' glyphs that are the used pre part, 
'blue' ones that are the (seldom used) post parts and the 'green' ones 
are replacement texts (used when there is no cross linebreak treatment 
needed).


Maybe this helps you wikifying 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] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen

On 3/20/2021 8:24 AM, Aditya Mahajan wrote:

On Sat, 20 Mar 2021, Christoph Reller wrote:

Of course we can do this in lua:

if tex.modes["A"] and not tex.modes{"B"] then
...
end


... which means that you can use that at the context end as well (old feature).
Save the following as test.mkix (or add "% macros=mkix" as the first line):

```
\starttext

\starttyping
A and not B
\stoptyping

\starttyping
not (A and not B)
\stoptyping

\stoptext

a neat application!

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 "double-free glue_spec"

2021-03-20 Thread Hans Hagen

On 3/20/2021 7:16 AM, Christoph Reller wrote:

Hi,

For one of my projects ConTeXt LMTX 2021.03.17 17:46 fails with:

error (nodes): attempt to double-free glue_spec node 145, ignored
mtx-context     | fatal error: return code: 1


long time not seen, that one

Unfortunately, when I try to minimize the project, the error vanishes. I 
guess I have to send Hans the whole project, or are there other 
possibilities?
not really .. but you can try to put a \tracingall around the spit it 
happens and see in what macro we are


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] Problems with new ConTeXt in Linux

2021-03-20 Thread Hans Hagen

On 3/20/2021 8:13 AM, Jairo A. del Rio wrote:
When I update to ConTeXt LMTX version 2021.03.20 01:07, the following 
happens during format generation:


tex error       > tex error on line 25 in file spac-hor.mkxl: Undefined 
control sequence


 \bitwiseflip \normalizelinemode \flattendiscretionariescode



So, what is happening here?

are you sure that you have the new binary?

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : Zero size kerns with latest LMTX beta 2020-03-17

2021-03-20 Thread Hans Hagen

On 3/20/2021 10:00 AM, Joseph wrote:

Cheers, thanks a lot, would you advice to use that directive from now on ?

i uploaded a fix

the advance directive is kind of experimental but should work ok so you 
can test with it


another font related experiment is

\enableexperiments[fonts.compact]

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] RE : Zero size kerns with latest LMTX beta 2020-03-17

2021-03-20 Thread Joseph
Cheers, thanks a lot, would you advice to use that directive from now on ?BestJoseph De : Hans HagenEnvoyé le :vendredi 19 mars 2021 22:50À : mailing list for ConTeXt users; JosephObjet :Re: [NTG-context] Zero size kerns with latest LMTX beta 2020-03-17 On 3/19/2021 10:11 PM, Joseph wrote:> Dear list,> > Following MWE aims to reproduce the issue,> > \definefontfeature[default][default][kern=yes]> > \definefontfamily[mainfont][serif][EBGaramond]> > \setupbodyfont[mainfont]> > \showfontkerns> > \starttext> > Chapitre v.> > \stoptextah, went unnoticed because i run all with \enabledirectives[fonts.injections.method=advance] I'll fix 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] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sat, 20 Mar 2021, Christoph Reller wrote:
> Of course we can do this in lua:
> 
> if tex.modes["A"] and not tex.modes{"B"] then
> ...
> end

... which means that you can use that at the context end as well (old feature).
Save the following as test.mkix (or add "% macros=mkix" as the first line):

```
\starttext

\starttyping
A and not B
\stoptyping

\starttyping
not (A and not B)
\stoptyping

\stoptext
```

See the templates manual for more details: 
https://www.pragma-ade.com/general/manuals/templates-mkiv.pdf

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
___


[NTG-context] Problems with new ConTeXt in Linux

2021-03-20 Thread Jairo A. del Rio
When I update to ConTeXt LMTX version 2021.03.20 01:07, the following
happens during format generation:

tex error   > tex error on line 25 in file spac-hor.mkxl: Undefined
control sequence

 \bitwiseflip \normalizelinemode \flattendiscretionariescode



So, what is happening here?

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
___


[NTG-context] Error "double-free glue_spec"

2021-03-20 Thread Christoph Reller
Hi,

For one of my projects ConTeXt LMTX 2021.03.17 17:46 fails with:

error (nodes): attempt to double-free glue_spec node 145, ignored
mtx-context | fatal error: return code: 1

Unfortunately, when I try to minimize the project, the error vanishes. I
guess I have to send Hans the whole project, or are there other
possibilities?

Cheers,

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