[NTG-context] fatal error again in LMTX

2022-05-02 Thread Pablo Rodriguez via ntg-context
Hi Hans, as already reported (https://mailman.ntg.nl/pipermail/ntg-context/2022/105443.html), LMTX (from 2022.05.02 16:19) quits messaging only fatal error with such a sample: \starttext \startitemize \item one \stoptext I know that \stopitemize is missing above. But in real--world

[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-05-02 Thread Cron Daemon via ntg-context
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm install.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip

Re: [NTG-context] process list items differently depending on position in list

2022-05-02 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Hans Hagen > via ntg-context > Gesendet: Montag, 2. Mai 2022 12:34 > An: Denis Maier via ntg-context > Cc: Hans Hagen > Betreff: Re: [NTG-context] process list items differently depending on > position in list > > On

Re: [NTG-context] process list items differently depending on position in list

2022-05-02 Thread Hans Hagen via ntg-context
On 5/2/2022 12:09 PM, Denis Maier via ntg-context wrote: But, it’d still love to hear whether there is a solution on the tex side. \processtokens {[before]} {[between]} {[after]} {[space]} {{one}{two}{three}} \def\whatever{a,b,c,d} \getcommacommandsize[\whatever] \scratchcounterone

Re: [NTG-context] process list items differently depending on position in list

2022-05-02 Thread Denis Maier via ntg-context
Ok, in lua it's indeed simple: \startluacode list = {"foo", "bar", "baz"} \stopluacode \starttext \startluacode for i, v in ipairs(list) do if i == #list then tex.print("last:") tex.print(v) elseif i == 1 then tex.print("first:") tex.print(v) else

Re: [NTG-context] \getcommacommandsize not working in lmtx

2022-05-02 Thread Hans Hagen via ntg-context
On 5/2/2022 9:37 AM, Denis Maier via ntg-context wrote: Hi, I’ve just ran into a behaviour that runs against what is shown on the wiki, https://wiki.contextgarden.net/System_Macros/Comma_Separated_Lists Maybe a bug? More

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
Many thanks Denis. Very useful tip on the injectors and generalised command usage. That will definitely come in useful. My problem is that I already have a lot of XML data with the existing processing instructions in it. I know I could use an external preprocess in something like Python to change

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Denis Maier via ntg-context
That was too quick, sorry. Hi Duncan, I have used context’s own injectors for this : \startsetups xml:directive:injector:addlinetopage \adaptlayout[lines=+1] \stopsetups Or, for your line break example : \startsetups xml:directive:injector:newline \crlf \stopsetups Also, I have

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Denis Maier via ntg-context
Hi Duncan, I have used context’s own injectors for this : \startsetups xml:directive:injector:addlinetopage \adaptlayout[lines=+1] \stopsetups Or, for your line break example : Von: ntg-context Im Auftrag von Duncan Hothersall via ntg-context Gesendet: Montag, 2. Mai 2022 09:20 An:

[NTG-context] \getcommacommandsize not working in lmtx

2022-05-02 Thread Denis Maier via ntg-context
Hi, I've just ran into a behaviour that runs against what is shown on the wiki, https://wiki.contextgarden.net/System_Macros/Comma_Separated_Lists Maybe a bug? The wiki says you can use \getcommacommandsize to get the length of a comma separated list, but it does not seem to work. MWE below.

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
Apologies, there are two rogue * in the lxml.preprocessor code, but even when they are removed it doesn't work. On Mon, 2 May 2022 at 08:19, Duncan Hothersall wrote: > I have a big set of existing XML books (held in a derivative of DocBook) > which I'm looking to start processing directly with

[NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
I have a big set of existing XML books (held in a derivative of DocBook) which I'm looking to start processing directly with ConTeXt. (Up to now I have a system which converts the XML into ConTeXt code which is then processed, but this is inefficient and lots of the code is now unsupported.) I've

Re: [NTG-context] recursion in a table

2022-05-02 Thread Hans Hagen via ntg-context
On 5/2/2022 2:30 AM, Aditya Mahajan via ntg-context wrote: \expanded{\NC \recurselevel \noexpand\NC ... } There is no need for \noexpand before \NC. Even \NR is protected. In MKIV there are some more sensitive ones like \FR but in LMTX these are defined as \noaligned which permits them

[NTG-context] process list items differently depending on position in list

2022-05-02 Thread Denis Maier via ntg-context
Hi, I need to process a comma separated list, and adapt the formatting according to the position of an item in the list (example below). Expected output would be: {\bf foo }, {\em bar} and baz. Is that possible? Can I somehow get the position of an item in the list? (My understanding is that