[NTG-context] Re: No pagenumber on first page

2025-04-10 Thread Thomas Meyer

Hello Wolfgang,

thank you very much. I would never have figured that out on my own.

Greetings
Thomas

Am 09.04.25 um 22:04 schrieb Wolfgang Schuster:

Am 09.04.2025 um 21:29 schrieb Thomas Meyer:

Hi folks,

if I use this:

 \setupheadertexts[]

 \setuptexttexts
       [margin]
       []
[\unframed[align=middle,width=\outermarginwidth]{\pagenumber}]
[\unframed[align=middle,width=\outermarginwidth]{\pagenumber}]
       []


\setuptext[state=empty]


 \starttext

 \dorecurse{50}{\samplefile{tufte}\par}

 \stoptext

How can I avoid the pagenumber on the first page?
Thank you very much for your help!


Wolfgang

___ 

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


maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
(mirror)

archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Alternate text for images?

2025-04-10 Thread Pablo Rodriguez via ntg-context
On 4/10/25 15:38, Steffen Wolfrum wrote:
> In Acrobat Pro (2020 Mac) it looks like this, see attached.

Hi Steffen,

sorry, but I‘m afraid you might be testing a different PDF document.

The document I attached to the message you reply (b.pdf, SHA512 starting
with 9e6f566722d69b3e26d9f419c8107c52a97c479dcc4b8e2d3f14ae58bd24a86c13
and available at
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/YEWPKPJSPTGL7YG7HCDZJTDJA462ADQP/attachment/2/b.pdf)
looks like https://ngpdf.com displays (see attached screenshot).

I sent the final PDF document, because I had to edit it manually to make
it work. If you compiled the source testing-tagging.tex I also attached,
lpdf-tag-imp-testing.lmt should be reached by ConTeXt to have both
Figure and Formula tags.

As for the NonStruct PfadPfadPfadPfadPfadPfad, it may come from
navigationpage (which I thought it was the page number, but it doesn’t
seem to be that).

If you allow me a suggestion, use PNG as image format for screenshots
(unless they contain pictures).

Image size is smaller and the quality loss isn’t so perceptible. Besides
that, you can use pngquant to make them smaller (https://pngquant.org/).

I hope it is clearer now,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] curl missing from Docker image -> install-modules does not work

2025-04-10 Thread Marco Riggirello

Hello,

installing modules into the docker image is not possible since the curl 
command is not part of the image. If I run


   $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh
   -c "cd /context/tex/ && mtxrun --script install-module --install filter"

I get (see line 4)

mtx-install-modules | loading entries from file 
'/context/tex/texmf-context/tex/context/modules/third/mtx-install-imp-modules.lua'
mtx-install-modules | loading entries from file 
'/context/tex/texmf-context/tex/context/modules/third/mtx-install-imp-tikz.lua'

mtx-install-modules |
sh: 1: curl: not found
mtx-install-modules | unknown 
'https://modules.contextgarden.net/dl/t-filter.zip'

mtx-install-modules |
mtx-install-modules | renewing file database
mtx-install-modules |
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lud' 
stripped
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lud' 
stripped
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lud' 
stripped
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lud' 
stripped
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lud' 
stripped
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lud' 
stripped
system  | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud'
system  | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' 
stri

[NTG-context] Karl Berry "Wizard of Systems"

2025-04-10 Thread luigi scarso
https://x.com/TeXUsersGroup/status/1909459838838751675
"""
TUG news: Motion 2025.2 is almost unanimously (with Karl Berry abstaining)
approved. The motion awards Karl Berry with with a lifetime membership and
the title of "Wizard of Systems" in recognition of his outstanding
contributions to the TeX community.
"""

A pillar on which our community stands.
--
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Alternate text for images?

2025-04-10 Thread Steffen Wolfrum
In Acrobat Pro (2020 Mac) it looks like this, see attached.

Steffen


> Am 09.04.2025 um 18:40 schrieb Pablo Rodriguez via ntg-context 
> mailto:ntg-context@ntg.nl>>:
> 
> On 4/9/25 11:41, Matthias Weber wrote:
>> Hi Pablo (and Hans)
>>> No, Acrobat reports an empty page when reading the text, and Preview
>> (on the Mac) doesn’t read anything either.
>> I can’t find the text when looking at the pdf in an editor.
> 
> Hi Matthias,
> 
> the attached PDF document should work now.
> 
> Unfortunately Acrobat Reader doesn’t work for me at all (reading texts
> alould). But I was able to see the value of /Alt (alternative text) with
> the editor from https://www.ngpdf.com/ .
> 
> There were two issues here:
> 
> First, image was originally tagged as /NonStruct instead of /Figure
> (which I changed with lpdf-tag-imp-testing.lmt).
> 
> Second, /Alt wasn’t properly placed. veraPDF rightly warns about no /Alt
> or /ActualText (after having the image tagged as figure).
> 
> /Alt is an entry in a /StructElem dictionary (the parent of /K, where
> ConTeXt places it now
> [https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#page=567
>  
> ]).
> 
> After manually placing /Alt in the parent dictionary of /K and both
> veraPDF and https://www.ngpdf.com/  work fine now.
> 
> BTW, when adding a formula (source plus mapping below), veraPDF warns
> about no /Alt or /ActualText for the formula (which is a requirement for
> PDF/UA-1, no mathml in this version [at least, no mention to mathml in
> the veraPDF validation rules]).
> 
> Hans, I’m afraid that this haven’t been visible due to images not tagged
> as figures. Could it be fixed?
> 
> Many thanks for your help,
> 
> Pablo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl  / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl 
> 
> webpage  : https://www.pragma-ade.nl  / 
> https://context.aanhet.net  (mirror)
> archive  : https://github.com/contextgarden/context 
> 
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: non standard tag for structure

2025-04-10 Thread Steffen Wolfrum
Hi Pablo,

meanwhile there is a new thread by Matthias Weber, called «Alternate text for 
images?»
Does this thread cover the same topic as this one, i.e. is Matthias’ thread the 
successor to this one here?

Best wishes, Steffen


> Am 25.03.2025 um 18:22 schrieb Pablo Rodriguez via ntg-context 
> :
> 
> On 3/23/25 14:47, Steffen Wolfrum wrote:
>> Hi Pablo, Wolfgang, Hans,
>> 
>> is there any news on the accessibility topic (text Alt on a specific
>> image element)?
> 
> Hi Steffen,
> 
> I’m afraid that the some delay in new versions because of the release of
> TeX Live 2025 has been one of the few recent messages to the list from Hans.
> 
> Not that anyone told me anything, but I guess he must be busy with other
> things (or he is just relaxing).
> 
> I’m also interested in other things related to ConTeXt (and parallel
> texts), but there was no reply.
> 
> So we will have to wait until Hans might have more time “to deal with
> the list”.
> 
> Sorry, but this is the best news we seem to have. Cheers,
> 
> Pablo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: non standard tag for structure

2025-04-10 Thread Pablo Rodriguez via ntg-context
On 4/10/25 15:44, Steffen Wolfrum wrote:
> Hi Pablo,
>
> meanwhile there is a new thread by Matthias Weber, called «Alternate
> text for images?»> Does this thread cover the same topic as this one, i.e. is 
> Matthias’
> thread the successor to this one here?
Hi Steffen,

you can forget this thread in favour of “Alternate text for images?”.

I was ignorant when I started the thread that there was:

  \enabledirectives [backend.usetags=crap]

This was the way to avoid the use of the right tagging for PDF/UA-1.

I hope it is clearer now,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \switchtobodyfont issue

2025-04-10 Thread Alan Bowen
Oops. I forgot the macro definition:

\def\modCyr#1{{\switchtobodyfont[dejavu]{#1}}}

On Thu, Apr 10, 2025 at 12:09 PM Alan Bowen  wrote:

> I have the following:
> \starttext
>
> A.
> \switchtobodyfont[10pt]{
> First published by Stojan Novaković in 1877 in his anthology
> \modCyr{\emph{Примери књижевности и jезика старога и српско-словенскога}}
>  (Belgrade/\modCyr{Београд: Издање и штампа државне штампариjе}, pp.\
> 504–505).
> }
>
> \blank[big,fixed]
>
> B.
> \switchtobodyfont[9pt]{
> First published by Stojan Novaković in 1877 in his anthology
> \modCyr{\emph{Примери књижевности и jезика старога и српско-словенскога}}
>  (Belgrade/\modCyrfn{Београд: Издање и штампа државне штампариjе}, pp.\
> 504–505).
> }
>
> \stoptext
>
> This works as expected at 10pt but fails at 9pt (no Russian is printed).
> The problem does not seem to be with dejavu.
>
> I have plainly missed something. But what?
>
> Alan
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \switchtobodyfont issue

2025-04-10 Thread Alan Bowen
I have the following:
\starttext

A.
\switchtobodyfont[10pt]{
First published by Stojan Novaković in 1877 in his anthology
\modCyr{\emph{Примери књижевности и jезика старога и српско-словенскога}}
 (Belgrade/\modCyr{Београд: Издање и штампа државне штампариjе}, pp.\
504–505).
}

\blank[big,fixed]

B.
\switchtobodyfont[9pt]{
First published by Stojan Novaković in 1877 in his anthology
\modCyr{\emph{Примери књижевности и jезика старога и српско-словенскога}}
 (Belgrade/\modCyrfn{Београд: Издање и штампа државне штампариjе}, pp.\
504–505).
}

\stoptext

This works as expected at 10pt but fails at 9pt (no Russian is printed).
The problem does not seem to be with dejavu.

I have plainly missed something. But what?

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Tagging Math

2025-04-10 Thread Matthias Weber
Dear All,


Following the instructions in tagging.pdf,

I tried

\setupbackend[format=pdf/ua-2]
\setuptagging[state=start]

\enabledirectives [backend.usetags=crap]

\registermathsymbol[default][en][ z ][the variable]
\registermathsymbol[default][en][ k ][the index]


\starttext
\startformula
\startalign
\NC \left|(z_0+h)^n -  z_0^n\right| \NC = \left|\sum_{k=1}^n \binom{n}{k}h^k 
z_0^{n-k}\right| \NR
\NC \NC =  \left |h \sum_{k=0}^{n-1} \binom{n}{k+1} h^k z_0^{n-1-k}\right| \NR
\NC \NC =  \left|h \sum_{k=0}^{n-1} \frac n {k+1} \binom{n-1}{k} h^k 
z_0^{n-1-k}\right| \NR
\NC \NC \le  n | h| \sum_{k=0}^{n-1}  \binom{n-1}{k} |h|^k |z_0|^{n-1-k} \NR
\NC \NC \le  n | h|   (|z_0|+|h|)^{n-1}  \NR
\stopalign
\stopformula
\stoptext

This creates within the pdf the XML attachment below:



math-0001.xml
Description: XML document


This XML  contains all the information from the formula. Wrapping it into

\usemodule[mathml]

\starttext
\xmlprocessdata{}{
% content of XML file
}{}
\stoptext

produces



Untitled.pdf
Description: Adobe PDF document


which is also what my Mac screen reads from the original PDF, but it is 
evidently not what I want.
Does someone have a working example that shows how to do this right?

Thanks,

Matthias


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \switchtobodyfont issue

2025-04-10 Thread Wolfgang Schuster

Am 10.04.2025 um 18:09 schrieb Alan Bowen:

I have the following:
\starttext

A.
\switchtobodyfont[10pt]{
First published by Stojan Novaković in 1877 in his anthology
\modCyr{\emph{Примери књижевности и jезика старога и српско- 
словенскога}}  (Belgrade/\modCyr{Београд: Издање и штампа државне 
штампариjе}, pp.\ 504–505).

}

\blank[big,fixed]

B.
\switchtobodyfont[9pt]{
First published by Stojan Novaković in 1877 in his anthology
\modCyr{\emph{Примери књижевности и jезика старога и српско- 
словенскога}}  (Belgrade/\modCyrfn{Београд: Издање и штампа државне 
штампариjе}, pp.\ 504–505).

}

\stoptext

This works as expected at 10pt but fails at 9pt (no Russian is printed). 
The problem does not seem to be with dejavu.


I have plainly missed something. But what?


Show us a complete working example because yours doesn't compile, the 
reason for this is the \modCyr command.


Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Help \setuparranging

2025-04-10 Thread Willi Egger
Hi,

is there a specific reason why you want to have 12 pages pers section?
A standard section normally carries 16 pages.
If 16 pages is good for you then you can use \setuparranging[2*2*4] will do 
this. I.e. you will get 4 sheets of paper with 2 pages on the front and 
backside of each sheet.

Best

Willi

> On 8 Apr 2025, at 11:00, Henning Hraban Ramm  wrote:
> 
> Am 08.04.25 um 08:35 schrieb Alan Caruanambo:
>> Hello, I need to arrange A5 paper inside A4, in order to save paper and so 
>> that the cut line always remains inside and the original edge outside.
> 
>> I have this code. How can I modify it to achieve what I want?
>> \setuppapersize[A5][A4,landscape]
>> \setuparranging[2UP,2SIDE]
> 
> You can only use one imposition schema at once, 2UP should be the right one.
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Tagging Math

2025-04-10 Thread Matthias Weber
Thank you Mikael,

What I would like to to is to have what \placenotes[mathnote] produces added to 
the pdf as a tag so that a screen reader would be able to read the math. Right 
now,
with your example, it reads the typeset math in an extremely garbled way (but 
the mathnotes at leats make sense).


So the question is how to get the content of the mathnotes into the PDF tags…

Matthias

> On Apr 10, 2025, at 2:20 PM, Mikael Sundqvist  wrote:
> 
> Hi,
> 
> I don't know what you expect, but you can try
> 
> %%%
> \setupbackend[format=pdf/ua-2]
> 
> \setuptagging[state=start]
> 
> \registermathsymbol[default][en]["1D467][the variable]
> \registermathsymbol[default][en]["1D458][the index]
> 
> \enabletrackers[math.textblobs]
> 
> \setupnote
>  [mathnote]
>  [location=margin]
> 
> \starttext
> \startformula
>  \abs {(z__0 + h)^n -  z__0^n }
>  \alignhere
>  = \abs {\sum_{k = 1}^n \binom{n}{k} h^k z__0^{n - k} }
>  \breakhere
>  = \abs {h \sum_{k = 0}^{n - 1} \binom{n}{k + 1} h^k z__0^{n - 1 - k} }
>  \breakhere
>  = \abs {h \sum_{k = 0}^{n - 1} \frac {n}{k + 1} \binom{n - 1}{k} h^k
> z__0^{n - 1 - k} }
>  \breakhere
>  \le  n \abs{h} \sum_{k = 0}^{n - 1}  \binom{n - 1}{k} \abs{h}^k
> \abs{z__0}^{n - 1 - k}
>  \breakhere
>  \le  n \abs{h} (\abs{z__0} + \abs{h})^{n - 1}
> \stopformula
> 
> \placenotes[mathnote]
> 
> \registermathsymbol[default][en][lowercasebold][the vector]
> 
> \startformula
>  (\alpha + \beta) \mathbf{u} = \alpha \mathbf{u} + \beta \mathbf{u}
> \stopformula
> 
> \placenotes[mathnote]
> 
> \stoptext
> %%%
> 
> As you see in the text the z and k are now interpreted as variable and
> index. The second example gives "the vector" for all lowercasebold.
> 
> I will not paste the mathml blob from the bigger formula, but the
> smaller one looks like this:
> 
> 
> 
> (
> 𝛼
> +
> 𝛽
> )
> 𝐮
> =
> 𝛼
> 𝐮
> +
> 𝛽
> 𝐮
> 
> 
> 
> /Mikael
> 
> 
> On Thu, Apr 10, 2025 at 7:58 PM Matthias Weber
>  wrote:
>> 
>> Dear All,
>> 
>> 
>> Following the instructions in tagging.pdf,
>> 
>> I tried
>> 
>> \setupbackend[format=pdf/ua-2]
>> \setuptagging[state=start]
>> 
>> \enabledirectives [backend.usetags=crap]
>> 
>> \registermathsymbol[default][en][ z ][the variable]
>> \registermathsymbol[default][en][ k ][the index]
>> 
>> 
>> \starttext
>> \startformula
>> \startalign
>> \NC \left|(z_0+h)^n -  z_0^n\right| \NC = \left|\sum_{k=1}^n \binom{n}{k}h^k 
>> z_0^{n-k}\right| \NR
>> \NC \NC =  \left |h \sum_{k=0}^{n-1} \binom{n}{k+1} h^k z_0^{n-1-k}\right| 
>> \NR
>> \NC \NC =  \left|h \sum_{k=0}^{n-1} \frac n {k+1} \binom{n-1}{k} h^k 
>> z_0^{n-1-k}\right| \NR
>> \NC \NC \le  n | h| \sum_{k=0}^{n-1}  \binom{n-1}{k} |h|^k |z_0|^{n-1-k} \NR
>> \NC \NC \le  n | h|   (|z_0|+|h|)^{n-1}  \NR
>> \stopalign
>> \stopformula
>> \stoptext
>> 
>> This creates within the pdf the XML attachment below:
>> 
>> 
>> 
>> This XML  contains all the information from the formula. Wrapping it into
>> 
>> \usemodule[mathml]
>> 
>> \starttext
>> \xmlprocessdata{}{
>> % content of XML file
>> }{}
>> \stoptext
>> 
>> produces
>> 
>> 
>> 
>> which is also what my Mac screen reads from the original PDF, but it is 
>> evidently not what I want.
>> Does someone have a working example that shows how to do this right?
>> 
>> Thanks,
>> 
>> Matthias
>> 
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \switchtobodyfont issue

2025-04-10 Thread Wolfgang Schuster

Am 10.04.2025 um 18:28 schrieb Alan Bowen:

Oops. I forgot the macro definition:

\def\modCyr#1{{\switchtobodyfont[dejavu]{#1}}}


To get your text in dejavu add

\usebodyfont  [dejavu]
\setupbodyfont[modern]

at the begin of the document to preload the typescript, otherwise you 
load the font in a local group where the settings are forgotten at the 
end of the group.



Be also be aware of \switchtobodyfont being an argumentless switch, this 
means the form


\switchtobodyfont[]{...}

is wrong and the correct form is

{\switchtobodyfont[]...}

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \switchtobodyfont issue

2025-04-10 Thread Alan Bowen
 Sorry, Wolfgang. Here is the complete file:

\def\modCyr#1{{\switchtobodyfont[dejavu]{#1}}}

\starttext

A.
\switchtobodyfont[10pt]{
First published by Stojan Novaković in 1877 in his anthology
\modCyr{\emph{Примери књижевности и jезика старога и српско-словенскога}}
 (Belgrade/\modCyr{Београд: Издање и штампа државне штампариjе}, pp.\
504–505). }

\blank[big,fixed]

B.
\switchtobodyfont[9pt]{
First published by Stojan Novaković in 1877 in his anthology
\modCyr{\emph{Примери књижевности и jезика старога и српско-словенскога}}
 (Belgrade/\modCyr{Београд: Издање и штампа државне штампариjе}, pp.\
504–505). }

\stoptext

Alan


On Apr 10, 2025 at 13:44:01, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Am 10.04.2025 um 18:09 schrieb Alan Bowen:
>
> I have the following:
>
> \starttext
>
>
> A.
>
> \switchtobodyfont[10pt]{
>
> First published by Stojan Novaković in 1877 in his anthology
>
> \modCyr{\emph{Примери књижевности и jезика старога и српско-
>
> словенскога}}  (Belgrade/\modCyr{Београд: Издање и штампа државне
>
> штампариjе}, pp.\ 504–505).
>
> }
>
>
> \blank[big,fixed]
>
>
> B.
>
> \switchtobodyfont[9pt]{
>
> First published by Stojan Novaković in 1877 in his anthology
>
> \modCyr{\emph{Примери књижевности и jезика старога и српско-
>
> словенскога}}  (Belgrade/\modCyrfn{Београд: Издање и штампа државне
>
> штампариjе}, pp.\ 504–505).
>
> }
>
>
> \stoptext
>
>
> This works as expected at 10pt but fails at 9pt (no Russian is printed).
>
> The problem does not seem to be with dejavu.
>
>
> I have plainly missed something. But what?
>
>
> Show us a complete working example because yours doesn't compile, the
> reason for this is the \modCyr command.
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Tagging Math

2025-04-10 Thread Mikael Sundqvist
Hi,

I don't know what you expect, but you can try

%%%
\setupbackend[format=pdf/ua-2]

\setuptagging[state=start]

\registermathsymbol[default][en]["1D467][the variable]
\registermathsymbol[default][en]["1D458][the index]

\enabletrackers[math.textblobs]

\setupnote
  [mathnote]
  [location=margin]

\starttext
\startformula
  \abs {(z__0 + h)^n -  z__0^n }
  \alignhere
  = \abs {\sum_{k = 1}^n \binom{n}{k} h^k z__0^{n - k} }
  \breakhere
  = \abs {h \sum_{k = 0}^{n - 1} \binom{n}{k + 1} h^k z__0^{n - 1 - k} }
  \breakhere
  = \abs {h \sum_{k = 0}^{n - 1} \frac {n}{k + 1} \binom{n - 1}{k} h^k
z__0^{n - 1 - k} }
  \breakhere
  \le  n \abs{h} \sum_{k = 0}^{n - 1}  \binom{n - 1}{k} \abs{h}^k
\abs{z__0}^{n - 1 - k}
  \breakhere
  \le  n \abs{h} (\abs{z__0} + \abs{h})^{n - 1}
\stopformula

\placenotes[mathnote]

\registermathsymbol[default][en][lowercasebold][the vector]

\startformula
  (\alpha + \beta) \mathbf{u} = \alpha \mathbf{u} + \beta \mathbf{u}
\stopformula

\placenotes[mathnote]

\stoptext
%%%

As you see in the text the z and k are now interpreted as variable and
index. The second example gives "the vector" for all lowercasebold.

I will not paste the mathml blob from the bigger formula, but the
smaller one looks like this:



(
𝛼
+
𝛽
)
𝐮
=
𝛼
𝐮
+
𝛽
𝐮



/Mikael


On Thu, Apr 10, 2025 at 7:58 PM Matthias Weber
 wrote:
>
> Dear All,
>
>
> Following the instructions in tagging.pdf,
>
> I tried
>
> \setupbackend[format=pdf/ua-2]
> \setuptagging[state=start]
>
> \enabledirectives [backend.usetags=crap]
>
> \registermathsymbol[default][en][ z ][the variable]
> \registermathsymbol[default][en][ k ][the index]
>
>
> \starttext
> \startformula
> \startalign
> \NC \left|(z_0+h)^n -  z_0^n\right| \NC = \left|\sum_{k=1}^n \binom{n}{k}h^k 
> z_0^{n-k}\right| \NR
> \NC \NC =  \left |h \sum_{k=0}^{n-1} \binom{n}{k+1} h^k z_0^{n-1-k}\right| \NR
> \NC \NC =  \left|h \sum_{k=0}^{n-1} \frac n {k+1} \binom{n-1}{k} h^k 
> z_0^{n-1-k}\right| \NR
> \NC \NC \le  n | h| \sum_{k=0}^{n-1}  \binom{n-1}{k} |h|^k |z_0|^{n-1-k} \NR
> \NC \NC \le  n | h|   (|z_0|+|h|)^{n-1}  \NR
> \stopalign
> \stopformula
> \stoptext
>
> This creates within the pdf the XML attachment below:
>
>
>
> This XML  contains all the information from the formula. Wrapping it into
>
> \usemodule[mathml]
>
> \starttext
> \xmlprocessdata{}{
> % content of XML file
> }{}
> \stoptext
>
> produces
>
>
>
> which is also what my Mac screen reads from the original PDF, but it is 
> evidently not what I want.
> Does someone have a working example that shows how to do this right?
>
> Thanks,
>
> Matthias
>
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: curl missing from Docker image -> install-modules does not work

2025-04-10 Thread Bruce Horrocks

> On 10 Apr 2025, at 13:14, Marco Riggirello  
> wrote:
> 
> installing modules into the docker image is not possible since the curl 
> command is not part of the image. If I run
> $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh -c "cd 
> /context/tex/ && mtxrun --script install-module --install filter"

Hi Marco,

I don't know who produces the contextgarden/context:lmtx build (presumably it's 
now part of the build farm?) but according to 
 it is supposed to have all 
modules already installed.

However, running 

 $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh -c "cd 
/context/tex && mtxrun --script install-modules --installed"

suggests that there aren't any installed. So maybe Hans could prod whoever 
supports the build farm to look into it?

In the meantime, if you build your own container image using the Dockerfile on 
the Wiki 

 it is easy to include 'curl' - just add it after 'unzip' - however that 
doesn't seem to fix your problem since:

$ docker build -t context .
$ docker run --rm --entrypoint "" context /bin/sh -c "cd /opt/context/tex/ && 
mtxrun --script install-module --install filter"

appears to do something and there is no obvious error message in the visible 
output, but

$ docker run --rm --entrypoint "" context /bin/sh -c "cd /opt/context/tex && 
mtxrun --script install-modules --installed"

shows that the filter module still wasn't installed.

Sorry I can't help you any further right now - I'm not familiar enough with the 
install script to be able to quickly zero in on the problem

Regards,


—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Thesis in ConTeXt

2025-04-10 Thread Max Chernoff via ntg-context
Hi Gerion,

On Fri, 2025-04-11 at 00:36 +0200, Gerion Entrup wrote:
> I just published my PhD thesis in ConTeXt (with graphics in LaTeX/TikZ)

> I published the source code here [2] to maybe give something back.

Wow, that looks great, thanks for sharing!

> In general, I find ConTeXt way more consistent than LaTeX. I really
> like the key value interface for most functions. It also feels like (and
> is) a complete system (not like LaTeX as a system consisting of _a lot
> of_ different modules, most of them playing together just most of the
> times).

Agreed.

> BTW, does a public Lua interface of ConTeXt exist with a reference
> what ConTeXt specific functions can be called directly in Lua?

"cld-mkiv.pdf" is the main manual, although there's lots not listed
there. Most of the newer manuals mention the Lua interfaces for their
specific topic, but they don't usually go into too much depth. Often,
you'll have to check the Wiki, check the mailing list archives, or refer
to the source.

> I find the ConTeXt source code hard to read. I dug around in the
> source code for typesetting references to personalize them and needed
> time to find the files that are responsible for this and understand the
> relevant variable and function names therein.

Yeah, I agree that it's not the easiest to read, but it's certainly
*far* better than LaTeX. And the newer code is usually pretty nice, so
it's often only the older code (or the code that does inherently complex
stuff, like for fonts) that's tricky. And you do get used to it after
awhile, although it took a couple years for me.

> When searching (grep) for a command, I often got some really long
> lists of commands containing the one I searched for, but I had a hard
> time finding the TeX and Lua code that implemented that specific
> command.

Most of the commands are just \def'ed, so searching for
"\def\yourmacroname" will often work. "\define" and "\let" are also
sometimes used. For the Lua-based commands, their names look like
\clf_yourmacroname and are defined by interfaces.implement, so you can
usually search for "name\s*=\s*['\"]yourmacroname['\"]"

You can also run

mtxrun --script interface --meaning yourmacroname

although I admittedly never use that one myself.

> I also needed some time to find out that manuals exist for most parts
> (first source for information was the wiki). When I found them, though,
> they were really helpful, especially for more low level knowledge (and
> as code examples).

Yeah, some of the manuals are super obvious (like for math and metafun),
but others are rather hidden. Like, "cld-mkiv.pdf" is for Lua,
"details.pdf" is for grid snapping, etc. Some other good manuals to look
into are "onandon.pdf", "lowlevel.pdf", "ontarget.pdf", and
"evenmore.pdf".

(Also, what happened to "primitives.pdf"? That was one of my favourite
documents!)

> Also, ConTeXt is way faster than LaTeX

Yes, indeed, this is one of my favourite parts of ConTeXt.

> (though much slower than Typst but AFAIK, Typst is not as complete as 
> ConTeXt).

Yeah, Typst is faster than pretty much anything, but they put in _a lot_
of work to get it that way, and it comes with quite a few limitations:

https://www.researchgate.net/publication/364622490

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Thesis in ConTeXt

2025-04-10 Thread Gerion Entrup
Hi,

I just published my PhD thesis in ConTeXt (with graphics in LaTeX/TikZ) [1].
For a lot of typesetting tasks I got great help here.
Thank you for making ConTeXt and thank you for helping me here!

I published the source code here [2] to maybe give something back.
For this community, probably the most interesting part are the data and 
acronyms "modules".

## Data
For scientific papers, often you need to embed some measurement data. The 
simple approach here is to let some programs produce the data and then just 
copy them data for data into the text.
This, however, is a really tedious and error-prone task when you do it multiple 
times.
Thus, a colleague of mine develops versuchung [3] and dataref [4].
The first one is a Python library to output measurement data in a defined 
format and the latter is a LaTeX/PGF library to embed that data referenced by 
its key into a LaTeX document.

For ConTeXt, this was not possible. Therefore, Versuchung is now able to 
directly output lua tables and "data.lua" [5] provides minimal tooling to read 
that data in a ConTeXt document.
The idea is to have a function "get_experiment" to get all data of a specific 
experiment. The function returns another function that allows to give a 
specific string (the keys in the Lua table) to get the actual data.
The meaning of returning another function is to be able to track all usages of 
the data (for example one can generate a datagraphy with this).
Example usages are here [6] and here [7].

## Acronyms
I wrote the thesis in German but had the problem that a lot of computer science 
acronyms are in English. I therefore decided to use either the German long 
version (correctly declined) or the English acronym. However, this should 
happen in an automated way (I want to always write down the acronym in the 
source code) and it should track that the acronym is _always_ fully described 
before using it.
This behavior is similar to the acronym package of LaTeX [8].
To simplify data transfer the logic and the acronyms are entirely in Lua and I 
just provided an interface for ConTeXt/TeX.
The acronym logic is here [9], the TeX interface here [10]. It provides mainly 
the \acr command with a few arguments:
\acr[f, l, p, g, d, a, b]{my-acronym}
- f (full) to get the full acronym: acronym in long form in German, English 
long form and acronym
- l (long) to get the acronym written out
- p (plural) to get the plural form
- g (genitive) to get the genitive form
- d (dative) to get the dative form
- a (accusative) to get the accusative form
- b (bestimmt) to get the definite form (indefinite otherwise)

A test document is also provided [11] (I attached the generated PDF for that 
document).
This is _not_ generically usable. It works for the acronyms used in the thesis. 
I had a hard time figure out patterns for endings in German (I'm not a 
linguist) and basically provide exactly the patterns for the acronyms in the 
thesis. It may be useful anyway.

## General experience with ConTeXt so far
I used LaTeX a lot, I've written my master's and PhD thesis in ConTeXt now. 
Recently, I also experimented with Typst.
In general, I find ConTeXt way more consistent than LaTeX. I really like the 
key value interface for most functions. It also feels like (and is) a complete 
system (not like LaTeX as a system consisting of _a lot of_ different modules, 
most of them playing together just most of the times).
I find Lua way easier to use as TeX as a programming language, therefore I 
prefer writing everything that contains programming logic in Lua. AFAIK, this 
aligns with ConTeXt. BTW, does a public Lua interface of ConTeXt exist with a 
reference what ConTeXt specific functions can be called directly in Lua?
I find the ConTeXt source code hard to read. I dug around in the source code 
for typesetting references to personalize them and needed time to find the 
files that are responsible for this and understand the relevant variable and 
function names therein. When searching (grep) for a command, I often got some 
really long lists of commands containing the one I searched for, but I had a 
hard time finding the TeX and Lua code that implemented that specific command.
I also needed some time to find out that manuals exist for most parts (first 
source for information was the wiki). When I found them, though, they were 
really helpful, especially for more low level knowledge (and as code examples).
The context command line program is way better than the ones LaTeX provides 
(something like latexmk for example is simply not needed).
Also, ConTeXt is way faster than LaTeX (though much slower than Typst but 
AFAIK, Typst is not as complete as ConTeXt).

Best,
Gerion

[1] https://repo.uni-hannover.de/handle/123456789/18862
[2] https://codeberg.org/gerion/phd
[3] https://github.com/stettberger/versuchung
[4] https://www.ctan.org/pkg/dataref
[5] https://codeberg.org/gerion/phd/src/branch/main/data.lua
[6] https://codeberg.org/gerion/phd/src/branch/main/diss-st