[NTG-context] Tikz calendar problem.

2023-09-04 Thread Fabrice L
Dear list,

I have a problem with tikzCalendar on a recent installation. This minimal 
example :

8< 

\usemodule[tikz]
\usetikzlibrary[calendar]
 
\starttext
This should works:
\blank
\tikz  \calendar[dates=2000-01-01 to 2000-01-31,week list];
\blank
but this does not !
\stoptext

8< 

should work, but does not. The problem seems to be here:

open source > level 2, order 61, name 'tikzlibrarycalendar.code.tex'
modules > 'pgfcalendar' is not found
close source> level 2, order 61, name ‘tikzlibrarycalendar.code.tex'

The file « tikzlibrarycalendar.code.tex » is read, but the file « pgfcalendar » 
seems missing. I have reinstall a new standalone version of ConTeXt, with all 
the modules (with the new script from ConTeXt Garden), but nothing works. 


Thanks for any help,
Fabrice. ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] out of order sectionsblocks

2023-09-04 Thread Rik Kabel

The following example generates a log file which begins with the line

   structure   > lists > out of order sectionsblocks, maybe use
   \setsectionblock

My larger document has over a hundred of these at the beginning.

   \setupnote [endnote] [location=none]
   \starttext
 \startbodymatter
  \startchapter[title={Body}]
   \startparagraph
    \input knuthmath
    \startendnote
    \input knuth-gpt
    \stopendnote
   \stopparagraph
  \stopchapter
 \stopbodymatter
 \startbackmatter
  \startchapter[title={Notes}]
   \placenotes [endnote]
  \stopchapter
 \stopbackmatter
   \stoptext

Can the message be suppressed? Is there a better way to set up the 
document to have endnotes for text in other-than-backmatter 
sectionblocks appear in the backmatter sectionblock?


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

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

[NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter

2023-09-04 Thread jbf
That's kind of you Max, and I will definitely take a look at that, both 
for the current book I am working on, but also for the variations it can 
offer for other titles.


In the meantime, Wolfgang gently reminded me that I had overlooked one 
various obvious (and simple) approach using alternative=d, which I 
confess I had entirely overlooked!


Julian

On 5/9/23 08:43, Max Chernoff wrote:

Hi Julian,


I am attempting to get a TOC that looks like the following (in other
words with section titles and their relative page numbers in a block
below the chapter):
Has
anyone put together a TOC of this kind and might be able to give me a
hint to follow?

This is fairly close to what you're looking for I think (the manual, not
the package itself):


http://mirrors.ctan.org/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf

The source is a little messy, but I've used it in a bunch of other
documents and it seems fairly robust:


https://github.com/gucci-on-fleek/lua-widow-control/blob/7c4544/docs/manual/lwc-manual.mkxl#L167-L234

There aren't any page numbers for the subsections in that, but you
should be able to add those inside the definition of
\SubsectionTOCcommand with either #3 or \currentlistentrypagenumber.

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

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

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


[NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter

2023-09-04 Thread Max Chernoff


Hi Julian,

> I am attempting to get a TOC that looks like the following (in other 
> words with section titles and their relative page numbers in a block 
> below the chapter):

> Has 
> anyone put together a TOC of this kind and might be able to give me a 
> hint to follow?

This is fairly close to what you're looking for I think (the manual, not
the package itself):

   
http://mirrors.ctan.org/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf

The source is a little messy, but I've used it in a bunch of other
documents and it seems fairly robust:

   
https://github.com/gucci-on-fleek/lua-widow-control/blob/7c4544/docs/manual/lwc-manual.mkxl#L167-L234

There aren't any page numbers for the subsections in that, but you
should be able to add those inside the definition of
\SubsectionTOCcommand with either #3 or \currentlistentrypagenumber.

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


[NTG-context] Adjust width of section part of table of contents

2023-09-04 Thread Jeroen
The following is a setuplist for the table of contents. Is there a way to
have the section part only go to 80% of the page width, similar to
width=0.8\textwidth

\setuplist
  [chapter]
  [style={\bf}]

\setuplist
  [section]
  [style={\tfx}]

\setuplist
  [chapter,section]
  [headnumber=no]

\setuplist
  [section]
  [alternative=d]

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

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

[NTG-context] Re: Adjust pagenumbering while skipping first page

2023-09-04 Thread Jeroen
Pablo,

Thanks, even though I use LMTX, only this form works:

[\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax]

Thanks
Jeroen

Op ma 4 sep 2023 om 18:43 schreef Pablo Rodriguez :

> On 9/4/23 18:09, Jeroen wrote:
> > The following MWE shows pagenumbering starting at the second page with
> > page number 1. With the totalnumberofpages we end up with one page too
> > many. Is there a way to reduce this with 1?
>
> Hi Jeroen,
>
> this might do the work (LMTX only):
>
>   [\pagenumber{} of \the\numexpr{\totalnumberofpages - 1}]
>
> For MkIV, you would need:
>
>   [\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax]
>
> Just in case it helps,
>
> Pablo
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: ifxmlselfempty

2023-09-04 Thread Hans Hagen

On 9/4/2023 8:20 PM, Hans van der Meer wrote:

I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has 
been accidentally crept in (from  copying that line in ifxmlempty, the item 
above?)
Anyway, remade the format and now the result is as I expected it to be. See 
below in the output of the MWE from my first post on this subject. I added the 
relevant portion of the code for clarity.

I am sure the next update will reflect it in the source ;-)


only if you also test ifxmlempty as it has similar code

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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


[NTG-context] Re: ifxmlselfempty

2023-09-04 Thread Hans van der Meer via ntg-context
I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has been accidentally crept in (from  copying that line in ifxmlempty, the item above?)Anyway, remade the format and now the result is as I expected it to be. See below in the output of the MWE from my first post on this subject. I added the relevant portion of the code for clarity.I am sure the next update will reflect it in the source ;-)dr. Hans van der Meer   implement {        name      = "ifxmlselfempty",        public    = true,        usage     = "condition",        arguments = "argument",        actions   = function(id)--            return boolean_code, not checkedempty(getid(id)) and true            return boolean_code, checkedempty(getid(id)) and true        end    }

xmlsetup-template.pdf
Description: Adobe PDF document
On 4 Sep 2023, at 10:05, denis.ma...@unibe.ch wrote:IDK. But why do have a setup for , which does not appear in your xml source (shouldn’t it be ?)?  Von: Hans van der Meer via ntg-context  Gesendet: Sonntag, 3. September 2023 14:11An: NTG ConTeXt Cc: Hans van der Meer Betreff: [NTG-context] ifxmlselfempty Is it possible that  the new \ifxmlselfempty has reversed its outcome? Or did I something wrong in this MWE?Here an MWE. yours sincerelydr. Hans van der Meer   \startbuffer[test]!not empty node!\stopbuffer \startxmlsetups xml:mysetups   \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*}\stopxmlsetups \xmlregistersetup{xml:mysetups} \startxmlsetups xml:emptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}attribute = \xmlatt{#1}{value}\elsecontent = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}content = \xmlflush{#1}\elseattribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups \startxmlsetups xml:notemptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}attribute = \xmlatt{#1}{value}\elsecontent = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}content = \xmlflush{#1}\elseattribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups \startxmlsetups xml:something\xmlall{#1}{./emptynode}\blank\xmlall{#1}{./notemptynode}\blank\stopxmlsetups \starttext\ConTeXt\ \contextversion\blank   \xmlprocessbuffer{main}{test}{}\stoptext___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

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

2023-09-04 Thread Cron Daemon
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 show-fil.pdf
 context/latest/
 context/latest/cont-lmt.zip
 context/latest/cont-mpd.zip
 context/latest/cont-ppc.zip
 context/latest/cont-sci.zip
 context/latest/cont-tmf.zip
 context/latest/cont-tst.7z
 context/latest/cont-tst.tar.xz
 context/latest/cont-tst.zip
 general/manuals/
 general/manuals/primitives.pdf
 
 sent 178,012 bytes  received 39,004,718 bytes  3,407,193.91 bytes/sec
 total size is 566,603,244  speedup is 14.46


Running archiver:

New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-09-04.20
235024088   
/var/www/aanhet.net/context//htdocs/archives/context-2023-09-04.20/latest
126745317   
/var/www/aanhet.net/context//htdocs/archives/context-2023-09-04.20/current
361773501   
/var/www/aanhet.net/context//htdocs/archives/context-2023-09-04.20
361773501   total
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: new upload

2023-09-04 Thread Pablo Rodriguez
On 9/4/23 19:22, Hans Hagen wrote:
> Hi,
>
> new upload with packed itemize fix .. hopefyully no side effects of some
> work in progress (but no crashes in test suite so likely ok)

Hi Hans,

many thanks for the ultrafast fix and upload.

Pablo

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

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


[NTG-context] Re: After compiling

2023-09-04 Thread Pablo Rodriguez
On 9/4/23 19:14, Hans Hagen wrote:
> here
>
> context \\localhost\c$\data\develop\tmp\oeps.tex
>
> seems to be processed (with result in current path)

Just in case it might be relevant, I was on W10.

I would say that a similar command was right for me.

But using Textadept 11.4 and invoking compilation from the editor
triggered the error in my case.

BTW, try "cd \\localhost\c$\data\develop\tmp" in the command prompt.

It was impossible for me on W10.

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

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


[NTG-context] new upload

2023-09-04 Thread Hans Hagen

Hi,

new upload with packed itemize fix .. hopefyully no side effects of some 
work in progress (but no crashes in test suite so likely ok)


Hans

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

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


[NTG-context] Re: After compiling

2023-09-04 Thread Hans Hagen

On 9/4/2023 7:03 PM, Pablo Rodriguez wrote:

On 9/4/23 12:25, Ursula Hermann wrote:

There is no pdf to read.
Uschi Hermann.
Sorry, dindn’t write my name in the first Mail Today.


Hi Uschi,

sorry for explaining what might be obvious to you now, but I think
knowing the cause might be worth it


After compiling the following example, which is from February 2021:


Unfortunately, there was no compilation (source not found).


"\\ub.univie.ac.at\U_Dom\Users G-L\Hermann\Documents\Texlive"
CMD.EXE wurde mit dem oben angegebenen Pfad als aktuellem Verzeichnis
gestartet.
UNC-Pfade werden nicht untersttzt.
Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.


This is the real problem: UNC paths and the command prompt (CMD.EXE).

UNC paths are a Windows way to access remote units (let’s say it so).

They are similar to: "\\remote-server\directory\subdirectory\file.tex".

CMD is required by ConTeXt to run, but CMD doesn’t understand UNC paths,
so it switches the directory to the %SYSTEMROOT% (usually, C:\Windows).

This directory shouldn’t be writable (without admin rights).

So the file cannot be found, since the directory is not the one that
contains the source.

Using Explorer, it is possible to give a path such as
"\\localhost\c$\Users\USERNAME\whatever\file.txt" and open it with your
favourite editor, but it will be impossible to compile.

UNC paths in common used are mapped as local units, such as (explained
in https://ss64.com/nt/net-use.html#e):

   net use X: "\\remote-server\directory\"

That way compiling x:\subdirectory\file.tex would be no problem.


runtime error : input file './blackrule1.tex' is not found, quitting


Hraban was right: there might be no %SYSTEMROOT%\blackrule1.tex.

Just in case it might help to understand was what wrong,

here

context \\localhost\c$\data\develop\tmp\oeps.tex

seems to be processed (with result in current  path)

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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

[NTG-context] Re: After compiling

2023-09-04 Thread Pablo Rodriguez
On 9/4/23 12:25, Ursula Hermann wrote:
> There is no pdf to read.
> Uschi Hermann.
> Sorry, dindn’t write my name in the first Mail Today.

Hi Uschi,

sorry for explaining what might be obvious to you now, but I think
knowing the cause might be worth it

> After compiling the following example, which is from February 2021:

Unfortunately, there was no compilation (source not found).

> "\\ub.univie.ac.at\U_Dom\Users G-L\Hermann\Documents\Texlive"
> CMD.EXE wurde mit dem oben angegebenen Pfad als aktuellem Verzeichnis
> gestartet.
> UNC-Pfade werden nicht untersttzt.
> Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.

This is the real problem: UNC paths and the command prompt (CMD.EXE).

UNC paths are a Windows way to access remote units (let’s say it so).

They are similar to: "\\remote-server\directory\subdirectory\file.tex".

CMD is required by ConTeXt to run, but CMD doesn’t understand UNC paths,
so it switches the directory to the %SYSTEMROOT% (usually, C:\Windows).

This directory shouldn’t be writable (without admin rights).

So the file cannot be found, since the directory is not the one that
contains the source.

Using Explorer, it is possible to give a path such as
"\\localhost\c$\Users\USERNAME\whatever\file.txt" and open it with your
favourite editor, but it will be impossible to compile.

UNC paths in common used are mapped as local units, such as (explained
in https://ss64.com/nt/net-use.html#e):

  net use X: "\\remote-server\directory\"

That way compiling x:\subdirectory\file.tex would be no problem.

> runtime error : input file './blackrule1.tex' is not found, quitting

Hraban was right: there might be no %SYSTEMROOT%\blackrule1.tex.

Just in case it might help to understand was what wrong,

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

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

[NTG-context] Re: Adjust pagenumbering while skipping first page

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 6:09 PM, Jeroen wrote:

The following MWE shows pagenumbering starting at the second page with page
number 1. With the totalnumberofpages we end up with one page too many. Is
there a way to reduce this with 1?



\setupfootertexts
   [title]
   [\pagenumber{} of \totalnumberofpages]

\setcounter
   [userpage]
   [0]

\setuppagenumbering
   [location=]

\startdocument

\setupfooter[state=stop]
\startfrontmatter
frontpage
\stopfrontmatter
\setupfooter[state=start]

\startbodymatter
\dorecurse{10}{\samplefile{lorem}}
\stopbodymatter

\stopdocument

\setupfootertexts
  [title]
  [\pagenumber\space of \lastpagenumber]


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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


[NTG-context] Re: no packed in current latest (LMTX only)

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 6:12 PM, Pablo Rodriguez wrote:

Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

   \starttext
   \startTEXpage[offset=1em]
   \startitemize[packed]
   \item item
   \item item
   \stopitemize
   \stopTEXpage
   \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,
hm, accidently removed line ... (there have been some 'additions' to 
itemize wrt tabulated items which makes things even more complex)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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

[NTG-context] Re: Adjust pagenumbering while skipping first page

2023-09-04 Thread Pablo Rodriguez
On 9/4/23 18:09, Jeroen wrote:
> The following MWE shows pagenumbering starting at the second page with
> page number 1. With the totalnumberofpages we end up with one page too
> many. Is there a way to reduce this with 1?

Hi Jeroen,

this might do the work (LMTX only):

  [\pagenumber{} of \the\numexpr{\totalnumberofpages - 1}]

For MkIV, you would need:

  [\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax]

Just in case it helps,

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

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

[NTG-context] Re: no packed in current latest (LMTX only)

2023-09-04 Thread Rik Kabel


On 9/4/2023 12:12 PM, Pablo Rodriguez wrote:

Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

   \starttext
   \startTEXpage[offset=1em]
   \startitemize[packed]
   \item item
   \item item
   \stopitemize
   \stopTEXpage
   \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

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



I can confirm the problem.

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

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

[NTG-context] no packed in current latest (LMTX only)

2023-09-04 Thread Pablo Rodriguez
Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

  \starttext
  \startTEXpage[offset=1em]
  \startitemize[packed]
  \item item
  \item item
  \stopitemize
  \stopTEXpage
  \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

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

[NTG-context] Adjust pagenumbering while skipping first page

2023-09-04 Thread Jeroen
The following MWE shows pagenumbering starting at the second page with page
number 1. With the totalnumberofpages we end up with one page too many. Is
there a way to reduce this with 1?



\setupfootertexts
  [title]
  [\pagenumber{} of \totalnumberofpages]

\setcounter
  [userpage]
  [0]

\setuppagenumbering
  [location=]

\startdocument

\setupfooter[state=stop]
\startfrontmatter
frontpage
\stopfrontmatter
\setupfooter[state=start]

\startbodymatter
\dorecurse{10}{\samplefile{lorem}}
\stopbodymatter

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

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

[NTG-context] Re: Trimming (rearranging) long section name

2023-09-04 Thread Lukas via ntg-context

Hello,

On 2023-09-04 12:06, Wolfgang Schuster wrote:

\mainlanguage[cz]

\setuphead
  [section]
  [distance=1.25em,
   style=\bfc,
   align={flushleft,broad,nothyphenated}]


that's it, thank you!

Lukas


\setupbodyfont[8pt]

\starttext

\chapter{Dummy}

\samplefile{lorem}

\section{Specifické požadavky pro předpokládanou technologii stavby 
(přístupy, přívody el. energie, skladovací plochy, montážní a pomocné 
plochy, montážní a pomocné konstrukce, ...)}


\stoptext

Wolfgang

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

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

[NTG-context] Re: Different Layout for First Page

2023-09-04 Thread Wolfgang Schuster

Jeroen schrieb am 04.09.2023 um 14:10:
I have a document with the first page in startfrontmatter and all 
other pages in  startbodymatter. The layout setting is as following


[...]

What would be the easiest way to change the layout only for the first 
page since it has no footer. For the first page, I would like to have 
the text run all the way to the bottom with \vfill where normally the 
footer would be.


You need the two settings

\setupheader[state=high]
\setupfooter[state=high]

to get rid of the header and footer on the page where the commands take 
effect.


The nice thing is that both values are reset on the following page and 
with \startsectionblockenvironment

you can make this layout change in the style file of your document.

\startsectionblockenvironment[frontpart]
\setupheader[state=high]
\setupfooter[state=high]
\stopsectionblockenvironment

\showframe

\starttext

\startfrontmatter
\samplefile{lorem}
\stopfrontmatter

\startbodymatter
\dorecurse{10}{\samplefile{lorem}}
\stopbodymatter

\stoptext

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

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

[NTG-context] Different Layout for First Page

2023-09-04 Thread Jeroen
I have a document with the first page in startfrontmatter and all other
pages in  startbodymatter. The layout setting is as following

\setuplayout
  [backspace=20mm,
   width=175mm,
   topspace=15mm,
   header=0mm,
   footer=2mm,
   height=275mm,
   bottomheight=1mm,
   footerdistance=10mm]

\setupfootertexts
  [title]
  [\pagenumber{} of \totalnumberofpages]

\setupfooter[state=stop]
\startfrontmatter
\input{frontpage.tex}
\stopfrontmatter
\setupfooter[state=start]

\startbodymatter
\input{introduction.tex}
\stopbodymatter

What would be the easiest way to change the layout only for the first page
since it has no footer. For the first page, I would like to have the text
run all the way to the bottom with \vfill where normally the footer would
be.

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

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

[NTG-context] Re: Trimming (rearranging) long section name

2023-09-04 Thread Wolfgang Schuster

Lukas via ntg-context schrieb am 04.09.2023 um 13:33:

Hello,

just

"
\setuphead[section][distance=1.25em]
\setuphead[section][style=\bfc]
"

Lukas


On 2023-09-04 11:25, Henning Hraban Ramm wrote:

Am 04.09.23 um 13:06 schrieb Lukas via ntg-context:

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they 
seem

not to affect section titles.


What’s your section setup, esp. the align settings?


Please try to provide a *working* minimal example the next time, 
otherwise we have

to fill the missing parts (\starttext ... \stoptext).

\mainlanguage[cz]

\setuphead
  [section]
  [distance=1.25em,
   style=\bfc,
   align={flushleft,broad,nothyphenated}]

\setupbodyfont[8pt]

\starttext

\chapter{Dummy}

\samplefile{lorem}

\section{Specifické požadavky pro předpokládanou technologii stavby 
(přístupy, přívody el. energie, skladovací plochy, montážní a pomocné 
plochy, montážní a pomocné konstrukce, ...)}


\stoptext

Wolfgang

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

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

[NTG-context] Re: Trimming (rearranging) long section name

2023-09-04 Thread Lukas via ntg-context

Hello,

just

"
\setuphead[section][distance=1.25em]
\setuphead[section][style=\bfc]
"

Lukas


On 2023-09-04 11:25, Henning Hraban Ramm wrote:

Am 04.09.23 um 13:06 schrieb Lukas via ntg-context:

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they 
seem

not to affect section titles.


What’s your section setup, esp. the align settings?

Hraban

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

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

[NTG-context] Re: Trimming (rearranging) long section name

2023-09-04 Thread Henning Hraban Ramm

Am 04.09.23 um 13:06 schrieb Lukas via ntg-context:

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they seem
not to affect section titles.


What’s your section setup, esp. the align settings?

Hraban

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

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

[NTG-context] Trimming (rearranging) long section name

2023-09-04 Thread Lukas via ntg-context

Hello,

is there a way to alter the section name to be

"
Specifické požadavky pro předpokládanou technologii
stavby (přístupy, přívody el. energie, skladovací plochy,
montážní a pomocné plochy, montážní a pomocné konstrukce,
...)
"

instead of

"
Specifické požadavky pro předpokládanou technologii stavby
(přístupy, přívody el. energie, skladovací plochy, mon-
tážní a pomocné plochy, montážní a pomocné konstrukce,
...)
"

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they seem
not to affect section titles.

(MkIV solution preferably.)

Best regards,

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

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

[NTG-context] Re: After compiling

2023-09-04 Thread Ursula Hermann
Dear Henning, 

Many thanks. That was the problem. 

Uschi Hermann 

-Ursprüngliche Nachricht-
Von: Henning Hraban Ramm  
Gesendet: Montag, 04. September 2023 12:43
An: mailing list for ConTeXt users 
Betreff: [NTG-context] Re: After compiling

Am 04.09.23 um 12:25 schrieb Ursula Hermann:

> After compiling the following example, which is from February 2021:
> I get:
> runtime error : input file './blackrule1.tex' is not found, quitting

Are you sure your file is called "blackrule1.tex" and exists in the same 
directory as you’re calling it?

Hraban

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net archive  : 
https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: After compiling

2023-09-04 Thread Henning Hraban Ramm

Am 04.09.23 um 12:25 schrieb Ursula Hermann:


After compiling the following example, which is from February 2021:
I get:
runtime error : input file './blackrule1.tex' is not found, quitting


Are you sure your file is called "blackrule1.tex" and exists in the same 
directory as you’re calling it?


Hraban

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

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

[NTG-context] After compiling

2023-09-04 Thread Ursula Hermann
There is no pdf to read.
Uschi Hermann.
Sorry, dindn't write my name in the first Mail Today.


Von: Ursula Hermann
Gesendet: Montag, 04. September 2023 11:44
An: 'ntg-context@ntg.nl' mailto:ntg-context@ntg.nl>>
Betreff:

Dear List,

After compiling the following example, which is from February 2021:
\setuppapersize[A8,landscape]
\setuplayout[leftmargin=2.5cm,
 leftmargindistance=0.2cm,
 backspace=2.9cm,
 width=4cm]
\showframe
\starttext
\margintext{\hairline\\{Me}}\dontleavehmode\hairline
\startformula
a^n + b^n = c^n.
\stopformula
\stoptext





I get:
Command Line:   context.exe --synctex=-1 "blackrule1.tex"
Startup Folder: 
\\ub.univie.ac.at\U_Dom\Users 
G-L\Hermann\Documents\Texlive


resolvers   | formats | executing runner 'run luametatex format': 
luametatex --jobname="./blackrule1.tex" --socket --shell-escape 
--fmt=C:/Users/Hermann/Downloads/context-mswin/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=C:/Users/Hermann/Downloads/context-mswin/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./blackrule1.tex" 
--c:input="./blackrule1.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:synctex="-1" 
--c:texmfbinpath="C:/Users/Hermann/Downloads/context-mswin/tex/texmf-mswin/bin"
"\\ub.univie.ac.at\U_Dom\Users 
G-L\Hermann\Documents\Texlive"
CMD.EXE wurde mit dem oben angegebenen Pfad als aktuellem Verzeichnis gestartet.
UNC-Pfade werden nicht untersttzt.
Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.
system  >
system  > ConTeXt  ver: 2023.09.03 19:03 LMTX  fmt: 2023.9.4  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'C:/Users/Hermann/Downloads/context-mswin/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'C:/Users/Hermann/Downloads/context-mswin/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './blackrule1', input './blackrule1.tex', 
result './blackrule1'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
system  > synctex functionality is enabled, expect 5-10 pct runtime 
overhead!
runtime error : input file './blackrule1.tex' is not found, quitting
mtx-context | fatal error: return code: 1

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

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

[NTG-context] Re:

2023-09-04 Thread Ursula Hermann
There is no pdf to read.
Uschi Hermann.
Sorry, dindn't write my name in the first Mail Today.


Von: Ursula Hermann
Gesendet: Montag, 04. September 2023 11:44
An: 'ntg-context@ntg.nl' 
Betreff:

Dear List,

After compiling the following example, which is from February 2021:
\setuppapersize[A8,landscape]
\setuplayout[leftmargin=2.5cm,
 leftmargindistance=0.2cm,
 backspace=2.9cm,
 width=4cm]
\showframe
\starttext
\margintext{\hairline\\{Me}}\dontleavehmode\hairline
\startformula
a^n + b^n = c^n.
\stopformula
\stoptext





I get:
Command Line:   context.exe --synctex=-1 "blackrule1.tex"
Startup Folder: 
\\ub.univie.ac.at\U_Dom\Users 
G-L\Hermann\Documents\Texlive


resolvers   | formats | executing runner 'run luametatex format': 
luametatex --jobname="./blackrule1.tex" --socket --shell-escape 
--fmt=C:/Users/Hermann/Downloads/context-mswin/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=C:/Users/Hermann/Downloads/context-mswin/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./blackrule1.tex" 
--c:input="./blackrule1.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:synctex="-1" 
--c:texmfbinpath="C:/Users/Hermann/Downloads/context-mswin/tex/texmf-mswin/bin"
"\\ub.univie.ac.at\U_Dom\Users 
G-L\Hermann\Documents\Texlive"
CMD.EXE wurde mit dem oben angegebenen Pfad als aktuellem Verzeichnis gestartet.
UNC-Pfade werden nicht untersttzt.
Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.
system  >
system  > ConTeXt  ver: 2023.09.03 19:03 LMTX  fmt: 2023.9.4  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'C:/Users/Hermann/Downloads/context-mswin/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'C:/Users/Hermann/Downloads/context-mswin/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './blackrule1', input './blackrule1.tex', 
result './blackrule1'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
system  > synctex functionality is enabled, expect 5-10 pct runtime 
overhead!
runtime error : input file './blackrule1.tex' is not found, quitting
mtx-context | fatal error: return code: 1


_

ConTeXt Compilation Report (Pages: 0)

Errors: 0   Warnings: 0   Bad Boxes: 0
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: Bug or feature? \numexpression and hashes

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 8:17 AM, Jairo A. del Rio wrote:

Hi, list. The following fails with a "Missing number, treated as zero"
error prompt:

\starttext
\expandedrepeat2{\expandedrepeat2{\the\numexpression#I+#P\relax\ }}
\stoptext

OTOH, \numexpr works seamlessly. Tested on ConTeXt 2023.09.03 19:03. Thanks
in advance.
bug or feature: just something not done yet (there are probably a few 
more places) ... i added it (no upload)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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


[NTG-context] Re: ifxmlselfempty

2023-09-04 Thread denis.maier
IDK. But why do have a setup for , which does not appear in your xml 
source (shouldn't it be ?)?


Von: Hans van der Meer via ntg-context 
Gesendet: Sonntag, 3. September 2023 14:11
An: NTG ConTeXt 
Cc: Hans van der Meer 
Betreff: [NTG-context] ifxmlselfempty

Is it possible that  the new \ifxmlselfempty has reversed its outcome? Or did I 
something wrong in this MWE?
Here an MWE.

yours sincerely
dr. Hans van der Meer



\startbuffer[test]


!not empty node!

\stopbuffer

\startxmlsetups xml:mysetups
   \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:mysetups}

\startxmlsetups xml:emptynode
node=\xmltag{#1}:\crlf
ifxmlselfempty-else-fi:\space
\ifxmlselfempty{#1}
attribute = \xmlatt{#1}{value}
\else
content = \xmlflush{#1}
\fi
\crlf
ifxmlselfempty-else-fi reversed:\space
\ifxmlselfempty{#1}
content = \xmlflush{#1}
\else
attribute = \xmlatt{#1}{value}
\fi
\blank
\stopxmlsetups

\startxmlsetups xml:notemptynode
node=\xmltag{#1}:\crlf
ifxmlselfempty-else-fi:\space
\ifxmlselfempty{#1}
attribute = \xmlatt{#1}{value}
\else
content = \xmlflush{#1}
\fi
\crlf
ifxmlselfempty-else-fi reversed:\space
\ifxmlselfempty{#1}
content = \xmlflush{#1}
\else
attribute = \xmlatt{#1}{value}
\fi
\blank
\stopxmlsetups

\startxmlsetups xml:something
\xmlall{#1}{./emptynode}\blank
\xmlall{#1}{./notemptynode}\blank
\stopxmlsetups

\starttext
\ConTeXt\ \contextversion\blank
   \xmlprocessbuffer{main}{test}{}
\stoptext

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

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

[NTG-context] Re: Reinserting a section title followed by (continued) after a page break

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 5:55 AM, Calvin Ross wrote:

On the off chance anyone seeing this is interested, I have a solution uploaded 
as part of a module I wrote for screenplay and stageplay writing: 
https://github.com/cjayross/drama.mkiv/blob/4a9b2576c8630fd03352d95f99456092f6e21190/drama.mkiv#L480


A few remarks:

- you can best name modules like t-drama and then t-drame-screenplay and 
so in order to avoid clashes with files in the tex tree


- you really have to be careful with defining additional intercace 
constants; as you don't define them for other interface languages there 
is no real reason for them


- be aware that when you add key sto existign commands, future clashes 
can occur


- best define new commands CamelCase so that ther ei sno clash with 
existing or future commands


- as you basically define in mkii style, you can use \setevalue {xxx} 
{\getvalue{yyy}} which is a bit more readable


If you load the module in lmtx you get an error on \checkparameters 
which is not available in lmtx (here \ifparameters is a primitive) 
because \doifelseassignment is the real tester (checkparameters is more 
an mkii thing).


However, when you \enabledirectives[overloadmode=error] loading will be 
aborted earlier on because you overload existing macros.


It sounds worse than it is because if you use mkiv/lmtx there are easier 
ways to define an enviroment, think:


\unprotect

\installnamespace  {Slug}
\installcommandhandler \Slug {Slug} \Slug

\protect

\setupSlug[this=that]

\Slugparameter{this}

etc

Which would reduce the amount of code.

Anyway, I advise users of LMTX to testtheir local definitions with

\enabledirectives[overloadmode=error]

or at least

\enabledirectives[overloadmode=warning]


The solution ended up being very detailed and tightly coupled to this 
particular problem. However, the general approach was to use box registers to 
capture the portions of dialog marked using a command sequence (`\continue` in 
this case) that designates acceptable locations to insert a page break in the 
dialog. The markup is then placed into the document in pieces with each 
placement testing the `\pagetotal` against the `\pagegoal` to measure whether 
the current piece will fit on the current page.

This solution had to up using `\synchronizeoutput` as opposed to 
`\triggerpagebuilder`. I'm not sure why there's a difference in behavior 
between the two, but the former seems to fix bugs where the `\pagetotal`s would 
output the measure of the previous page rather than the current one -- leading 
to sporadic page breaks.


This is indeed a problem. Forcing the page builder is not always the 
solution, but neither is synchronize output. The first one triggers a 
check for pending contributions while the second forces it using a 
penalty which can have side effects.


One problem is that pagegoal and pagetotal are not always reliable. 
There is a wrap up about this which isnot yet in the disibution because 
it is part of a larger experiment. In luametatex we have a few more ways 
to influence the page builder and also get more reliable info about the 
state so far. It is something Mikael and I are experimenting with (using 
large complex mixed text/math documents) in the perspective of par and 
page building. We will come back to this later this year but some 
already trickled into context lmtx.


So, keep an eye on what shows up,

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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


[NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter

2023-09-04 Thread Wolfgang Schuster

jbf schrieb am 04.09.2023 um 08:34:


I am attempting to get a TOC that looks like the following (in other 
words with section titles and their relative page numbers in a block 
below the chapter):


Chapter 1 ...5

Section 1   5, Section 2  6, Section 3  7,

Section 4   8, Section 5   9 etc

Chapter 2 10

Section 1   10, Section 2  11, Section 3  12,

Section 4   13, Section 5   14 etc

As I really had no idea how to do this, I found 
https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking 
it might help, but none of it compiles (for me) in LMTX. So I tried 
something different, e.g.


[...]

While that produces a result, it is nothing like what I want above. 
Has anyone put together a TOC of this kind and might be able to give 
me a hint to follow?




Please send *working* (which include some dummy content) examples.

The example below results in section entries which are listed as a 
paragraph, what output do you expect here.


\setuplist[chapter][alternative=c]
\setuplist[section][alternative=d]

\starttext

\completecontent

\dorecurse{2}
  {\chapter{Chapter #1}
   \dorecurse{10}{\section{Section ##1}}}

\stoptext

Wolfgang

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

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

[NTG-context] TOC with sections titles and page numbers like a paragraph beneath chapter

2023-09-04 Thread jbf
I am attempting to get a TOC that looks like the following (in other 
words with section titles and their relative page numbers in a block 
below the chapter):


Chapter 1 ...5

Section 1   5, Section 2  6, Section 3  7,

Section 4   8, Section 5   9 etc

Chapter 2 10

Section 1   10, Section 2  11, Section 3  12,

Section 4   13, Section 5   14 etc

As I really had no idea how to do this, I found 
https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking it 
might help, but none of it compiles (for me) in LMTX. So I tried 
something different, e.g.


\definelist[chapter]

\setuplist[chapter][label=yes,distance=1.5cm,alternative=c,style=normal,before=\blank] 



\definelist[section]

\setuplist[section] [textcommand=\setups{SecToc}]

\setupcombinedlist

[content]o

[list={chapter,section}]


\startsetups [SecToc]

\startframedtext [width=\textwidth, align=middle, frame=off]

\placelist [section]

[

criterium=chapter,

]

\stopframedtext

\stopsetups

While that produces a result, it is nothing like what I want above. Has 
anyone put together a TOC of this kind and might be able to give me a 
hint to follow?


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

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

[NTG-context] Bug or feature? \numexpression and hashes

2023-09-04 Thread Jairo A. del Rio
Hi, list. The following fails with a "Missing number, treated as zero"
error prompt:

\starttext
\expandedrepeat2{\expandedrepeat2{\the\numexpression#I+#P\relax\ }}
\stoptext

OTOH, \numexpr works seamlessly. Tested on ConTeXt 2023.09.03 19:03. Thanks
in advance.

Best regards,

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

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