[NTG-context] Re: start/stopregister

2024-04-26 Thread Hans Hagen

On 4/26/2024 9:54 AM, Thomas A. Schmitz wrote:

On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
 A\index{A} B \page
 A\startregister [index] {A} B\startregister [index] [B] {B}
 \dorecurse {10} {\input tufte}
 A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext


And I'm not even sure if this is allowed to say anymore, but: works in 
mkii...

That's because mkii is AI enhanced. Can you try this:

\setuppapersize [A6]

\starttext

A\index{A} B \page


\stopregister [index] [A]
B>
\stopregister [index] [B]

\page

\placeregister[index]

\stoptext

(Watch the [A] vs {A} usage where [A] is the label used for matching the 
potentially weiord nested start/stop ... maybe we need different aliases 
for these, like \fromregister and \toregister.)


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://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: start/stopregister

2024-04-26 Thread Thomas A. Schmitz

On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
     A\index{A} B \page
     A\startregister [index] {A} B\startregister [index] [B] {B}
     \dorecurse {10} {\input tufte}
     A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext


And I'm not even sure if this is allowed to say anymore, but: works in 
mkii...


Thomas
___
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: start/stopregister

2024-04-26 Thread Thomas A. Schmitz

On 4/25/24 6:27 PM, Thomas A. Schmitz wrote:
Ah, simple typo! After fixing abel to label, startregister gives the 
expected results again! Thanks Hans! I may be back with more register 
questions soon...


And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
A\index{A} B \page
A\startregister [index] {A} B\startregister [index] [B] {B}
\dorecurse {10} {\input tufte}
A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext
___
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: start/stopregister

2024-04-25 Thread Hans Hagen

On 4/25/2024 4:51 PM, Taco Hoekwater wrote:




On 25 Apr 2024, at 16:45, Thomas A. Schmitz  wrote:

On 4/25/24 16:13, Henning Hraban Ramm wrote:

I’m using it like
\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]
i.e. very similar to your example, and can confirm it doesn’t result in a page 
range in the index. Also gives no error.


Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from 
a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in 
the references table, mkxl doesn't. This appears to be the relevant bit, and it is 
connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt

references.lastrealpage = texgetcount(c_realpageno)


Let's seen if we can make Thomas more of an expert as he's zooming in on 
the issue:


extendregister {
metadata   = { name =  name },
references = { abel =  label },
}

Let me know if you't see it.


Possibly related: I noticed last week that mkxl does not update the legacy 
counter \pageno any more for every page.

i'll check it

Hans

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

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

maillist : ntg-context@ntg.nl / 
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: start/stopregister

2024-04-25 Thread Taco Hoekwater


> On 25 Apr 2024, at 16:45, Thomas A. Schmitz  
> wrote:
> 
> On 4/25/24 16:13, Henning Hraban Ramm wrote:
>> I’m using it like
>> \startregister[index][bibliografie]{Bibliografie}
>> …
>> \stopregister[index][bibliografie]
>> i.e. very similar to your example, and can confirm it doesn’t result in a 
>> page range in the index. Also gives no error.
> 
> Since I've become an expert on tuc files since yesterday (ha!): if I compare 
> the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry 
> ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be 
> the relevant bit, and it is connected with the replacement of realpageno by 
> c_realpageno in line 638 of strc-reg.lmt
> 
> references.lastrealpage = texgetcount(c_realpageno)

Possibly related: I noticed last week that mkxl does not update the legacy 
counter \pageno any more for every page.

Best wishes,
Taco

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)


___
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: start/stopregister

2024-04-25 Thread Thomas A. Schmitz

On 4/25/24 16:13, Henning Hraban Ramm wrote:

I’m using it like

\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]

i.e. very similar to your example, and can confirm it doesn’t result in 
a page range in the index. Also gives no error.


Since I've become an expert on tuc files since yesterday (ha!): if I 
compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an 
entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This 
appears to be the relevant bit, and it is connected with the replacement 
of realpageno by c_realpageno in line 638 of strc-reg.lmt


references.lastrealpage = texgetcount(c_realpageno)

But that's as far as I could get...

Thomas
___
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: start/stopregister

2024-04-25 Thread Henning Hraban Ramm

Am 25.04.24 um 15:44 schrieb Thomas A. Schmitz:

Hi all,

has \startregister been superseded in luametatex or is it not yet 
implemented? I tried to read strc-reg.lmt but couldn't figure out what 
is going on. The following silly minimal test produces the expected 
result with mkiv but not in mkxl.


All best

Thomas

\setuppapersize [A6]

\starttext
 A\index{A} B\startregister [index] [B] {B}
 \dorecurse {10} {\input tufte}
 A\index{A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext



I’m using it like

\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]

i.e. very similar to your example, and can confirm it doesn’t result in 
a page range in the index. Also gives no error.


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
___


[NTG-context] start/stopregister

2024-04-25 Thread Thomas A. Schmitz

Hi all,

has \startregister been superseded in luametatex or is it not yet 
implemented? I tried to read strc-reg.lmt but couldn't figure out what 
is going on. The following silly minimal test produces the expected 
result with mkiv but not in mkxl.


All best

Thomas

\setuppapersize [A6]

\starttext
A\index{A} B\startregister [index] [B] {B}
\dorecurse {10} {\input tufte}
A\index{A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext
___
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: Mikael’s missing math manual

2024-03-18 Thread Hraban Ramm

Am 18.03.24 um 07:36 schrieb Mikael Sundqvist:

Hi,

On Sun, Mar 17, 2024 at 10:57 PM Hraban Ramm  wrote:

… and another thing that came up in my workshops and in discussions at
our booth: the math manual is eagerly awaited! (My book too, but I can’t
answer most questions about math.)

Oh, I see. So, I should really try to get something out. It is
difficult to find enough time working on it, in particular since Hans
is always adding new (not only math) stuff, but I will try. It is fun
to participate in the development, and I do not want to delay it
(somebody has to push him and test, and so on...)

But I should probably get something out, even if that is not really
finished/polished. All the basics are there. Then it can be a
work-in-progress document, adding/modifying new stuff.


Yes, please! The version that you gave me a year ago is already really 
interesting and helpful, and Hans’ manuals are also often "in progress". 
A visible TODO marker might help – I’m using the following in my book to 
keep track of incomplete sections:


\defineregister[todos]
\define[1]\TODO{\inouter{\tt\color[red]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[red]{\bf
 #1}\autoinsertnextspace}

…
\startsection[title=Lists]
\TODO{Research the options of \tex{setupitemgroup}!}
\stopsection
…

\startchapter[title=Work list]
  Sections that still need work.\blank

  \placetodos
\stopchapter

So I get a prominent marker in the content and the title of the affected 
section as an index.



There have been many changes along the way, and maybe at some time
some things were not really working, but later fixed.


I thought so, too.

For promotion I’d like to have a few examples where the difference 
between TeX/LaTeX default rendering and new ConTeXt rendering is visible.


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
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-14 Thread Jim
Max (et al),

were you hoping the ConTeXt distribution would ship its own
pgfutil-context.def, or were you hoping that someone could convince Henri
to put the RGB change in?

And, if anyone has the will to push this (or add it in to a ConTeXt
distribution version), I'd still like the cmyk support, even if there is no
ability to specify colour profiles:

\def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil
{
\pgfmathsetmacro{\@red@}{(1 - #2) * (1 - #5)}%
\pgfmathsetmacro{\@green@}{(1 - #3) * (1 - #5)}%
\pgfmathsetmacro{\@blue@}{(1 - #4) * (1 - #5)}% 
\expandafter\edef\csname\string\color@#1\endcsname
{\noexpand\xcolor@ {}{}{rgb}{\@red@,\@green@,\@blue@}}
}

I don't see that it would hurt anything, even if it doesn't give complete
cmyk support.

Cheers.
Jim

On Thu, Mar 14, 2024 at 17:18 (-0600), Max Chernoff wrote:

> Hi all,

> I've had a few patches applied to my installation for a little while
> now, so I figured that I should send them in. There's a diff at the end
> of the email, and the modified files are attached [but rejected by the
> mailing list, so sent separately to Hans]

>  * In the definition of "featurecreep()" in "lpdf-mis.lmt",
>"structures.pages.tobesaved[i].status" should be "[...].state" to
> match the definition of "pages.save" in "strc-pag.lua". 

>  * For the "resultof" runner in "util-sbx.lmt", the current io.popen
> mode only works with Windows. See the definition of "l_checkmodep" in
>"liolib.c".

>  * Some of the pgfplots 3D shaders appear to be broken,
> see https://tex.stackexchange.com/a/708121 .

>  * The TikZ "RGB" colour model does not currently work properly. This is
> internally used by "\usepgfplotslibrary[colorbrewer]" among others.
> See https://github.com/pgf-tikz/pgf/pull/1130 .

> Thanks,
> -- Max


> diff --git a/tex/generic/pgf/utilities/pgfutil-context.def 
> b/tex/generic/pgf/utilities/pgfutil-context.def
> index eddab09ab..66edb0980 100644
> --- a/tex/generic/pgf/utilities/pgfutil-context.def
> +++ b/tex/generic/pgf/utilities/pgfutil-context.def
> @@ -26,8 +26,17 @@
>  \def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil}

>  
> \def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}}
> -\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}}
> +\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{gray}{#2}}}
>  
> \def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{cmyk}{#2,#3,#4,#5}}}
> +\def\pgfutil@emu@RGB#1#2,#3,#4\@nil{%
> +\begingroup
> +\pgfmathdivide@{#2}{255}\let\pgfutil@emu@RGB@r\pgfmathresult
> +\pgfmathdivide@{#3}{255}\let\pgfutil@emu@RGB@g\pgfmathresult
> +\pgfmathdivide@{#4}{255}\let\pgfutil@emu@RGB@b\pgfmathresult
> +
> \edef\pgf@marshal{\def\expandafter\noexpand\csname\string\color@#1\endcsname{%
> +
> \noexpand\xcolor@{}{}{rgb}{\pgfutil@emu@RGB@r,\pgfutil@emu@RGB@g,\pgfutil@emu@RGB@b}}}%
> +\expandafter\endgroup\pgf@marshal
> +}


>  % no need for x colors (users can load it if needed)
> diff --git a/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex 
> b/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
> index 60d6274..106c490 100644
> --- a/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
> +++ b/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
> @@ -2804,6 +2804,9 @@
>  \def\pgfplotsretval{4}%
>  \fi
>  \fi
> + \if0\pgfplotsretval
> + \def\pgfplotsretval{5}
> + \fi
>  \pgfkeyslet{/pgfplots/surf shading/shading type}\pgfplotsretval%
>  %
>  \pgfplotsplothandlermesh@set@shader@colormap
> diff --git 
> a/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def 
> b/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
> index 0046daa..b563732 100644
> --- 
> a/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
> +++ 
> b/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
> @@ -61,7 +61,7 @@
>  \pgfplotslibrarysurfusepath
>  \endpgfpicture
>  }%
> - \immediate\saveboxresource resources{
> + \saveboxresource resources{
>  /Pattern << \pgfplots@glob@TMPa >> % write the pattern resource dictionary
>  }\pgfutil@tempboxa
>  \leavevmode
> diff --git a/tex/context/base/mkxl/util-sbx.lmt 
> b/tex/context/base/mkxl/util-sbx.lmt
> index b48d4a9..0ee8a16 100644
> --- a/tex/context/base/mkxl/util-sbx.lmt
> +++ b/tex/context/base/mkxl/util-sbx.lmt
> @@ -393,7 +393,7 @@ local runners = {

[NTG-context] PDF, runner, and TikZ patches

2024-03-14 Thread Max Chernoff
Hi all,

I've had a few patches applied to my installation for a little while
now, so I figured that I should send them in. There's a diff at the end
of the email, and the modified files are attached [but rejected by the
mailing list, so sent separately to Hans]

 * In the definition of "featurecreep()" in "lpdf-mis.lmt",
   "structures.pages.tobesaved[i].status" should be "[...].state" to
   match the definition of "pages.save" in "strc-pag.lua". 
   
 * For the "resultof" runner in "util-sbx.lmt", the current io.popen
   mode only works with Windows. See the definition of "l_checkmodep" in
   "liolib.c".
   
 * Some of the pgfplots 3D shaders appear to be broken,
   see https://tex.stackexchange.com/a/708121 .
   
 * The TikZ "RGB" colour model does not currently work properly. This is
   internally used by "\usepgfplotslibrary[colorbrewer]" among others.
   See https://github.com/pgf-tikz/pgf/pull/1130 .
   
Thanks,
-- Max


diff --git a/tex/generic/pgf/utilities/pgfutil-context.def 
b/tex/generic/pgf/utilities/pgfutil-context.def
index eddab09ab..66edb0980 100644
--- a/tex/generic/pgf/utilities/pgfutil-context.def
+++ b/tex/generic/pgf/utilities/pgfutil-context.def
@@ -26,8 +26,17 @@
 \def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil}

 
\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}}
-\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}}
+\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{gray}{#2}}}
 
\def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{cmyk}{#2,#3,#4,#5}}}
+\def\pgfutil@emu@RGB#1#2,#3,#4\@nil{%
+\begingroup
+\pgfmathdivide@{#2}{255}\let\pgfutil@emu@RGB@r\pgfmathresult
+\pgfmathdivide@{#3}{255}\let\pgfutil@emu@RGB@g\pgfmathresult
+\pgfmathdivide@{#4}{255}\let\pgfutil@emu@RGB@b\pgfmathresult
+
\edef\pgf@marshal{\def\expandafter\noexpand\csname\string\color@#1\endcsname{%
+
\noexpand\xcolor@{}{}{rgb}{\pgfutil@emu@RGB@r,\pgfutil@emu@RGB@g,\pgfutil@emu@RGB@b}}}%
+\expandafter\endgroup\pgf@marshal
+}


 % no need for x colors (users can load it if needed)
diff --git a/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex 
b/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
index 60d6274..106c490 100644
--- a/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
+++ b/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
@@ -2804,6 +2804,9 @@
 \def\pgfplotsretval{4}%
 \fi
 \fi
+ \if0\pgfplotsretval
+ \def\pgfplotsretval{5}
+ \fi
 \pgfkeyslet{/pgfplots/surf shading/shading type}\pgfplotsretval%
 %
 \pgfplotsplothandlermesh@set@shader@colormap
diff --git 
a/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def 
b/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
index 0046daa..b563732 100644
--- a/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
+++ b/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
@@ -61,7 +61,7 @@
 \pgfplotslibrarysurfusepath
 \endpgfpicture
 }%
- \immediate\saveboxresource resources{
+ \saveboxresource resources{
 /Pattern << \pgfplots@glob@TMPa >> % write the pattern resource dictionary
 }\pgfutil@tempboxa
 \leavevmode
diff --git a/tex/context/base/mkxl/util-sbx.lmt 
b/tex/context/base/mkxl/util-sbx.lmt
index b48d4a9..0ee8a16 100644
--- a/tex/context/base/mkxl/util-sbx.lmt
+++ b/tex/context/base/mkxl/util-sbx.lmt
@@ -393,7 +393,7 @@ local runners = {
 if trace then
 report("resultof: %s",command)
 end
-local handle = iopopen(command,"rb") -- already has flush
+local handle = iopopen(command,"r") -- already has flush
 if handle then
     local result = handle:read("*all") or ""
 handle:close()
diff --git a/tex/context/base/mkxl/lpdf-mis.lmt 
b/tex/context/base/mkxl/lpdf-mis.lmt
index 0f21cf9..a9cfe02 100644
--- a/tex/context/base/mkxl/lpdf-mis.lmt
+++ b/tex/context/base/mkxl/lpdf-mis.lmt
@@ -510,7 +510,7 @@ local function featurecreep()
 return -- fatal error
 end
 local label = p.viewerprefix or ""
-if p.status == v_stop then
+if p.state == v_stop then
 if not stopped then
 list[#list+1] = i - 1 -- pdf starts numbering at 0
 list[#list+1] = pdfdictionary {


___
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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 I'm not understanding in a much much larger document how I sold this, as I've 
tired placing \dontleavehmode in different places, but no success. 

On Wednesday, March 13, 2024 at 04:46:54 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 13.03.2024 um 23:27:
> After many hours of trial-and-error, I was able to recreate the problem 
> in a minimum working example:
> 
> file main.tex only contains:
> 
> \starttext
> 
>      \index{birds}
>      \index{insects}
> 
>      \input secondary
> 
>      \placeindex
> 
> \stoptext
> 
> file secondary.tex only contains:
> 
> 
>     \index{turtles}
> 
> For reasons I can't understand, the index produces the same [entry not 
> flushed] error. It seems here happening when contents are input.

The message appears even without the external file.

> My code is so simple, I can't understand what I've typed wrong.

Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).

\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\placeindex

\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://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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 What is an anchor? Does that mean the index needs to me next to some items, 
like placed next to some text?

On Wednesday, March 13, 2024 at 04:46:54 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 13.03.2024 um 23:27:
> After many hours of trial-and-error, I was able to recreate the problem 
> in a minimum working example:
> 
> file main.tex only contains:
> 
> \starttext
> 
>      \index{birds}
>      \index{insects}
> 
>      \input secondary
> 
>      \placeindex
> 
> \stoptext
> 
> file secondary.tex only contains:
> 
> 
>     \index{turtles}
> 
> For reasons I can't understand, the index produces the same [entry not 
> flushed] error. It seems here happening when contents are input.

The message appears even without the external file.

> My code is so simple, I can't understand what I've typed wrong.

Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).

\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\placeindex

\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://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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 13.03.2024 um 23:27:
After many hours of trial-and-error, I was able to recreate the problem 
in a minimum working example:


file main.tex only contains:

\starttext

     \index{birds}
     \index{insects}

     \input secondary

     \placeindex

\stoptext

file secondary.tex only contains:


    \index{turtles}

For reasons I can't understand, the index produces the same [entry not 
flushed] error. It seems here happening when contents are input.


The message appears even without the external file.


My code is so simple, I can't understand what I've typed wrong.


Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).


\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\placeindex

\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://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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 After many hours of trial-and-error, I was able to recreate the problem in a 
minimum working example:
file main.tex only contains:

\starttext

    \index{birds}
    \index{insects}
    
    \input secondary
    
    \placeindex
    
\stoptext
file secondary.tex only contains:


   \index{turtles}

For reasons I can't understand, the index produces the same [entry not flushed] 
error. It seems here happening when contents are input.
My code is so simple, I can't understand what I've typed wrong.

--Joel


On Wednesday, March 13, 2024 at 12:51:56 PM MDT, Joel via ntg-context 
 wrote:  
 
  Okay, I maybe made some progress. I traced the code back and back through the 
various documents and found I have some items inside:

\startnointerference\startnointerference
My intent is to have items that are "there" but invisible to viewers, taking up 
no space on screen, but treated as being present, so the index will still point 
to that particular page.
This solution seems to be what's causing the [entry not flushed] error in the 
index.
Is there another solution instead of startnointerferencethat will hide text or 
any content but still allow page references to link to that blank spot?

--Joel

On Wednesday, March 13, 2024 at 07:53:21 AM MDT, Joel via ntg-context 
 wrote:  
 
 I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \stopchapter
\stoptext


___
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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 Okay, I maybe made some progress. I traced the code back and back through the 
various documents and found I have some items inside:

\startnointerference\startnointerference
My intent is to have items that are "there" but invisible to viewers, taking up 
no space on screen, but treated as being present, so the index will still point 
to that particular page.
This solution seems to be what's causing the [entry not flushed] error in the 
index.
Is there another solution instead of startnointerferencethat will hide text or 
any content but still allow page references to link to that blank spot?

--Joel

On Wednesday, March 13, 2024 at 07:53:21 AM MDT, Joel via ntg-context 
 wrote:  
 
 I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \stopchapter
\stoptext


___
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] How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \stopchapter
\stoptext


___
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: Strange error at lxml-mms.lmt:749

2024-02-25 Thread Andres Conrado Montoya
Apologies, I sent the wrong file, this is the relevant log portion after
compiling with the change:

pages   > flushing realpage 133, userpage 133, subpage 133

푡
0.975
∗
   

푡
0.025
∗
   
pages   > flushing realpage 134, userpage 134, subpage 134
pages   > flushing realpage 135, userpage 135, subpage 135
structures  > bookmark: Prueba de homogeneidad
structure   > sectioning > section @ level 3 : 0.7.2 -> Prueba de
homogeneidad
structures  > bookmark: Hipótesis
structure   > sectioning > subsubsection @ level 5 : 0.7.2.0.1 ->
Hipótesis
structures  > bookmark: Estadístico de prueba
structure   > sectioning > subsubsection @ level 5 : 0.7.2.0.2 ->
Estadístico de prueba
structures  > bookmark: Aplicación de la homogeneidad
structure   > sectioning > subsection @ level 4 : 0.7.2.1 -> Aplicación
de la homogeneidad
pages   > flushing realpage 136, userpage 136, subpage 136
floatblocks > order disturbed
floatblocks > '51' placed (force)
pages   > flushing realpage 137, userpage 137, subpage 137
floatblocks > order disturbed
floatblocks > '52' placed (force)
pages   > flushing realpage 138, userpage 138, subpage 138
close source> level 2, order 29, name
'include/content/Aplicación-prueba-ji-cuadrado.tex'
pages   > flushing realpage 139, userpage 139, subpage 139

   ∑
  
tex error   > tex error on line 85 in file ./IntroEstadísticaNP.tex:

lua error:

registered function call [250]:
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:750: attempt to
index a nil value (local 'a2')
stack traceback:
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:750: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:284: in
upvalue 'expandfenced'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:585: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:798: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:350: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:952: in
upvalue 'expand'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:808: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:605: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:952: in
upvalue 'expand'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:899: in
upvalue 'expandone'
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:1019:
in field 'verbose'
...mtx/tex/texmf-context/tex/context/base/mkxl/math-tag.lmt:985: in
field 'gettextblob'
...mtx/tex/texmf-context/tex/context/base/mkxl/lpdf-tag.lmt:391: in
upvalue 'makeelement'
...mtx/tex/texmf-context/tex/context/base/mkxl/lpdf-tag.lmt:715: in
upvalue 'structures_tags_handler'
[string "local tonut  = nodes.tonut..."]:21: in function <[string
"local tonut  = nodes.tonut..."]:12>
(...tail calls...)
...mtx/tex/texmf-context/tex/context/base/mkxl/node-shp.lmt:38: in
function <...mtx/tex/texmf-context/tex/context/base/mkxl/node-shp.lmt:37>
(...tail calls...)

El dom, 25 feb 2024 a las 16:41, Andres Conrado Montoya (<
andresconr...@gmail.com>) escribió:

> IntroEstadisticaNP-error.log:
>
> return {
>  ["filename"]="./IntroEstadísticaNP.tex",
>  ["lastcontext"]="",
>  ["lastluaerror"]="registered function call [250]:
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:490: attempt to
> index a nil value (local 'a2')\nstack traceback:\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:490: in upvalue
> 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:261: in upvalue
> 'expandfenced'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:373: in upvalue
> 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:532: in upvalue
> 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:383: in upvalue
> 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:669: in upvalue
> 'expand'\n ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:544:
> in upvalue 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:383: in upvalue
> 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:669: in upvalue
> 'expand'\n ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:621:
> in upvalue 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:669

[NTG-context] Re: Strange error at lxml-mms.lmt:749

2024-02-25 Thread Andres Conrado Montoya
Another remark: It seems this behavior is consistent: if I comment out the
last equation before the one I told you before, again the next formula
works fine,

El dom, 25 feb 2024 a las 15:38, Andres Conrado Montoya (<
andresconr...@gmail.com>) escribió:

> A remark: A few lines above the error triggering point, I found a single
> digit presented as math: \math{5}. Removing this and leaving the 5 in text
> mode removes the error below it.
> Could it be a bug in the distribution?
>
> El dom, 25 feb 2024 a las 15:24, Andres Conrado Montoya (<
> andresconr...@gmail.com>) escribió:
>
>> I keep bumping into this error, I have no idea what may be causing it, in
>> a statistics book with lots of math:
>>
>> registered function call [250]:
>> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:749: attempt to
>> index a nil value (local 'a2')
>>
>> I have checked everything. I have tried commenting out many things and
>> the weird part is that it fails in a simple math expression: \math{E_{i}j}.
>> Even a simple $y$ or \math{a+b} will trigger the error. However, this same
>> file Im working on has many formulas before that, those work fine. I
>> changed all the $...$ to \math{...} just in case, but with no success.
>>
>> Already tried remaking, regenerating, updating the distribution.
>>
>> Do you have any ideas to work this out? I don't know how to provide a MWE
>> for this because it's a very big project (statistics book).
>>
>> I have tried 2 versions, the system-wide one, just upgraded:
>> mtx-context | ConTeXt Process Management 1.06
>> mtx-context | current version: 2024.02.22 18:31
>>
>> And a less recent version, attached to the project:
>> mtx-context | ConTeXt Process Management 1.05
>> mtx-context | current version: 2024.02.14 13:38
>>
>>
>> Any help will be much appreciated.
>>
>> --
>> Andrés Conrado Montoya
>> Andi Kú
>> andresconr...@gmail.com
>> http://sesentaycuatro.com
>> http://messier87.com
>> http://chiquitico.org
>> 
>> Los fines no justifican los medios, porque la medida verdadera de nuestro
>> carácter está dada por los medios que estamos dispuestos a utilizar, no por
>> los fines que proclamamos.
>> 
>>
>> “You develop an instant global consciousness, a people orientation, an
>> intense dissatisfaction with the state of the world, and a compulsion to do
>> something about it. From out there on the moon, international politics look
>> so petty. You want to grab a politician by the scruff of the neck and drag
>> him a quarter of a million miles out and say, ‘Look at that, you son of a
>> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>>
>
>
> --
> Andrés Conrado Montoya
> Andi Kú
> andresconr...@gmail.com
> http://sesentaycuatro.com
> http://messier87.com
> http://chiquitico.org
> 
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
> 
>
> “You develop an instant global consciousness, a people orientation, an
> intense dissatisfaction with the state of the world, and a compulsion to do
> something about it. From out there on the moon, international politics look
> so petty. You want to grab a politician by the scruff of the neck and drag
> him a quarter of a million miles out and say, ‘Look at that, you son of a
> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>


-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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: Strange error at lxml-mms.lmt:749

2024-02-25 Thread Andres Conrado Montoya
A remark: A few lines above the error triggering point, I found a single
digit presented as math: \math{5}. Removing this and leaving the 5 in text
mode removes the error below it.
Could it be a bug in the distribution?

El dom, 25 feb 2024 a las 15:24, Andres Conrado Montoya (<
andresconr...@gmail.com>) escribió:

> I keep bumping into this error, I have no idea what may be causing it, in
> a statistics book with lots of math:
>
> registered function call [250]:
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:749: attempt to
> index a nil value (local 'a2')
>
> I have checked everything. I have tried commenting out many things and the
> weird part is that it fails in a simple math expression: \math{E_{i}j}.
> Even a simple $y$ or \math{a+b} will trigger the error. However, this same
> file Im working on has many formulas before that, those work fine. I
> changed all the $...$ to \math{...} just in case, but with no success.
>
> Already tried remaking, regenerating, updating the distribution.
>
> Do you have any ideas to work this out? I don't know how to provide a MWE
> for this because it's a very big project (statistics book).
>
> I have tried 2 versions, the system-wide one, just upgraded:
> mtx-context | ConTeXt Process Management 1.06
> mtx-context | current version: 2024.02.22 18:31
>
> And a less recent version, attached to the project:
> mtx-context | ConTeXt Process Management 1.05
> mtx-context | current version: 2024.02.14 13:38
>
>
> Any help will be much appreciated.
>
> --
> Andrés Conrado Montoya
> Andi Kú
> andresconr...@gmail.com
> http://sesentaycuatro.com
> http://messier87.com
> http://chiquitico.org
> 
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
> 
>
> “You develop an instant global consciousness, a people orientation, an
> intense dissatisfaction with the state of the world, and a compulsion to do
> something about it. From out there on the moon, international politics look
> so petty. You want to grab a politician by the scruff of the neck and drag
> him a quarter of a million miles out and say, ‘Look at that, you son of a
> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>


-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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] Strange error at lxml-mms.lmt:749

2024-02-25 Thread Andres Conrado Montoya
I keep bumping into this error, I have no idea what may be causing it, in a
statistics book with lots of math:

registered function call [250]:
...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:749: attempt to
index a nil value (local 'a2')

I have checked everything. I have tried commenting out many things and the
weird part is that it fails in a simple math expression: \math{E_{i}j}.
Even a simple $y$ or \math{a+b} will trigger the error. However, this same
file Im working on has many formulas before that, those work fine. I
changed all the $...$ to \math{...} just in case, but with no success.

Already tried remaking, regenerating, updating the distribution.

Do you have any ideas to work this out? I don't know how to provide a MWE
for this because it's a very big project (statistics book).

I have tried 2 versions, the system-wide one, just upgraded:
mtx-context | ConTeXt Process Management 1.06
mtx-context | current version: 2024.02.22 18:31

And a less recent version, attached to the project:
mtx-context | ConTeXt Process Management 1.05
mtx-context | current version: 2024.02.14 13:38


Any help will be much appreciated.

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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: An announcement of my new book.

2024-02-13 Thread Peter Hopcroft via ntg-context
Thank you Sir Coleman. I’m a Context beginner and I’d love a good book 
introducing me to Context. I’ve wasted many hours trying to figure out how to 
do things that turned out to be simple.

The answer is often/sometimes buried in the documentation, and what would 
really help me is a book that is more of an index to the existing documentation 
that is not out of date, with perhaps some simple examples. One case that comes 
to mind is to pass a couple of numbers to Lua, have it do a calculation and use 
the result in Context.

Regards,
Peter

> On 14/02/2024, at 9:03 AM, Sir Coleman via ntg-context  
> wrote:
> 
> Acknowledged.
> 
> However, this does reinforce my point, that the documentation needs to be 
> updated. The examples on the wiki still use \getcounter, and naturally they 
> all fail to compile. Hence, my ambition to create a book to serve as the 
> documentation, which I find is a better medium for communication rather than 
> wikis.
> 
> Now, as to my question, to understand the low level TeX programming language, 
> will the manuals "Low Level TeX" be enough?
> 
> Thanks.
> ___
> 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: chronological TOC

2024-01-30 Thread BPJ
Den tis 30 jan. 2024 09:06Henning Hraban Ramm  skrev:

> Am 29.01.24 um 21:45 schrieb jbf:
> > And indeed this is the best solution I could find, though it obviously
> > meant that something like '29 April 2017' was no good for sorting on...
> > it has to be the US date format YY-MM-DD
>
> How did you expect a simple sorting algorithm to sort by verbose dates?
> BTW, -MM-DD is ISO 8601.
>

Just out of curiosity from an occasional user: is it possible in indices to
specify a separate sort key and displayed term as you can with makeindex? I
remember back in the nineties I used numeric sort keys for a Sanskrit index
where the letters were Latin (with lots of diacritics) but the sort order
was Indic (a, ā, i, ī, ... k, kh, g, gh, ...). I assigned a two-digit
"number" (01, 02, 03, ...) to each grapheme and the sort key consisted of
hyphen-separated such numbers.


> 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: chronological TOC

2024-01-29 Thread jbf
And indeed this is the best solution I could find, though it obviously 
meant that something like '29 April 2017' was no good for sorting on... 
it has to be the US date format YY-MM-DD


Julian

On 30/1/24 06:15, Wolfgang Schuster wrote:

Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a 
separate TOC which needs to be in chronological order at the back of 
the book (i.e. not in page number order, although I need the page 
numbers to show up in the TOC. There is the normal TOC at the front 
of the book, according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, 
but have not succeeded in the chronological order! Here is what I 
have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed 
(as an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the 
date (e.g. 29 April 2017) to be the ordering factor in the list. I 
assume it will be something to do with criterium, but am clueless at 
the moment on how to indicate this.


I don’t know if it works this way (the wizards will know a way), but 
for special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to 
your chapter command and setup the index at will.


Lists have a sort option but this is no use here because you can't use 
the title to have a chronological sorted list.


\starttext

\placelist[section][order=title]

\section{Hans}

\section{Peter}

\section{Anton}

\stoptext

Using the register mechanism as you suggest seems to be the best 
option in this case.


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: chronological TOC

2024-01-29 Thread Bruce Horrocks
On 29 Jan 2024, at 19:15, Wolfgang Schuster  
wrote:
> 
> Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:
>> Am 26.01.24 um 23:46 schrieb jbf:
>>> I wonder if someone can point me in the right direction for a separate TOC 
>>> which needs to be in chronological order at the back of the book (i.e. not 
>>> in page number order, although I need the page numbers to show up in the 
>>> TOC. There is the normal TOC at the front of the book, according to chapter 
>>> titles.
>>> 
>>> I have succeeded in defining a separate TOC to place at the back, but have 
>>> not succeeded in the chronological order! Here is what I have done:
>>> 
>>> \definelist[chron][criterium=all,alternative=c]
>>> 
>>> At the back of the book:
>>> 
>>> \placelist[chron][criterium=all]
>>> 
>>> Then at an appropriate point after each \startchapter I have placed (as an 
>>> example):
>>> 
>>> \writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}
>>> 
>>> This gives me my list, but in page number order. How do I get the date 
>>> (e.g. 29 April 2017) to be the ordering factor in the list. I assume it 
>>> will be something to do with criterium, but am clueless at the moment on 
>>> how to indicate this.
>> I don’t know if it works this way (the wizards will know a way), but for 
>> special needs I’m (ab)using indexes:
>> just add something like \index[2017-04-29]{Speech, Panama City} to your 
>> chapter command and setup the index at will.
> 
> Lists have a sort option but this is no use here because you can't use the 
> title to have a chronological sorted list.
> 
> \starttext
> 
> \placelist[section][order=title]
> 
> \section{Hans}
> 
> \section{Peter}
> 
> \section{Anton}
> 
> \stoptext
> 
> Using the register mechanism as you suggest seems to be the best option in 
> this case.

The order= mechanism doesn't seem to work for \definelist lists as opposed to 
the built-in ones, viz:

\definelist[chron]
\starttext

\placelist[section][order=title]

\section{Hans}
\writetolist[chron]{}{Hans}

\section{Peter}
\writetolist[chron]{}{Peter}

\section{Anton}
\writetolist[chron]{}{Anton}

\placelist[chron][criterium=all,order=title]
\stoptext


—
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: chronological TOC

2024-01-29 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a separate 
TOC which needs to be in chronological order at the back of the book 
(i.e. not in page number order, although I need the page numbers to 
show up in the TOC. There is the normal TOC at the front of the book, 
according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, but 
have not succeeded in the chronological order! Here is what I have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed 
(as an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the date 
(e.g. 29 April 2017) to be the ordering factor in the list. I assume 
it will be something to do with criterium, but am clueless at the 
moment on how to indicate this.


I don’t know if it works this way (the wizards will know a way), but for 
special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to your 
chapter command and setup the index at will.


Lists have a sort option but this is no use here because you can't use 
the title to have a chronological sorted list.


\starttext

\placelist[section][order=title]

\section{Hans}

\section{Peter}

\section{Anton}

\stoptext

Using the register mechanism as you suggest seems to be the best option 
in this case.


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: chronological TOC

2024-01-27 Thread Henning Hraban Ramm

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a separate 
TOC which needs to be in chronological order at the back of the book 
(i.e. not in page number order, although I need the page numbers to show 
up in the TOC. There is the normal TOC at the front of the book, 
according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, but 
have not succeeded in the chronological order! Here is what I have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed (as 
an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the date 
(e.g. 29 April 2017) to be the ordering factor in the list. I assume it 
will be something to do with criterium, but am clueless at the moment on 
how to indicate this.


I don’t know if it works this way (the wizards will know a way), but for 
special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to your 
chapter command and setup the index at will.


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
___


[NTG-context] Re: upload

2024-01-18 Thread Hans Hagen

On 1/18/2024 3:27 PM, Otared Kavian wrote:

Dear Dalyoung, dear Mikael,

I installed anew the whole LMTX tree and now everything is working fine.
I don’t know whether this is related or not, somehow in my previous tree 
I had a directory (or folder in the MacOS language) named « texmf-osx-64 
» instead « texmf-osx-arm64 » and this apparently had consequences.


In any case everything works fine now.

Thanks to Hans, Mikael and all the people on this list!

concerning the prime, use

  $x\prime$ and not $x^\prime$ as you might want $x^2\prime$ some day

in the first case it's really a prime, in the second case a prime symbol 
in a superscript; in lmtx we have for each nucleus a presubscript, 
presuperscript, subscript, superscript and primescript (plus index ones)


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://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] Suggestions and problems of the manuals

2024-01-17 Thread Gerion Entrup
ollected, 0 deltas, 0 shared partials, 
0 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.10.11, 
functionality level: 20231231, format id: 698, compiler: gcc
mkiv lua stats  > tex properties: 807097 hash slots used of 2097152, 
50666 control sequences, approximate memory usage: 49 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 84 MB, 
ctx: 80 MB, max: 80 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.528 seconds, 1 processed pages, 1 shipped 
pages, 1.895 pages/second
mtx-context | purged files: 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.log, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tmp, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tuc
system  | total runtime: 1.044 seconds of 1.071 seconds

buffers > typeset > no changes in 'demo-4', processing skipped
floatblocks > '3' limited
floatblocks > 3 saved
pages   > flushing realpage 14, userpage 12, subpage 14
floatblocks > 1 moved
floatblocks > 2 moved
floatblocks > 3 moved
pages   > flushing realpage 15, userpage 13, subpage 15
pages   > flushing realpage 16, userpage 14, subpage 16
pages   > flushing realpage 17, userpage 15, subpage 17
pages   > flushing realpage 18, userpage 16, subpage 18
pages   > flushing realpage 19, userpage 17, subpage 19
structure   > sectioning > section @ level 3 : 0.3.1 -> Scripts
tex error   > tex error on line 370 in file 
/home/gerion/src/context/doc/context/sources/general/manuals/math/math-spacing.tex:
 Math error: parameter 'subshiftdown' with id 49 in style 2 is not set

 \math_m_nop
#1->\relax \ifmmode #1\else \normalstartimath 
\usemathstyleparameter \mathematicsparameter \c!mathstyle \expand 
\everyinsidemathematics \relax \begingroup #1\endgroup \normalstopimath
\fi

{\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b}
} {Cambria}

360 font can be very detailed in where italic correction is to be 
applied and how
361 advanced stepwise kerns are used, but not many fonts have 
extensive information.
362 Here are some differences in rendering. In \OPENTYPE\ the 
super- and subscript of
363 an integral are moved right and left half of the italic 
correction.
364
365 \startlinecorrection
366 \startcombination[6*1]
367 {\switchtobodyfont  [modern]\math{F_j = \int\nolimits 
_a^b}} {Latin Modern}
368 {\switchtobodyfont [pagella]\math{F_j = \int\nolimits 
_a^b}} {Pagella}
369 {\switchtobodyfont  [dejavu]\math{F_j = \int\nolimits 
_a^b}} {Dejavu}
370 >>  {\switchtobodyfont [cambria]\math{F_j = \int\nolimits 
_a^b}} {Cambria}
371 {\switchtobodyfont[lucidaot]\math{F_j = \int\nolimits 
_a^b}} {Lucida OT}
372 {\switchtobodyfont[xits]\math{F_j = \int\nolimits 
_a^b}} {Xits}
373 \stopcombination
374 \stoplinecorrection
375
376 \stopsection
377
378 \startsection[title=Bad fonts]
379
380 There might be fonts out there where the italic correction is 
supposed to be
Sorry, but I can't typeset math unless various parameters have been 
set. This is
normally done by loading special math fonts into the math family slots. 
Your font
set is lacking at least the parameter mentioned earlier.
mtx-context | fatal error: return code: 1
- I tried to find a prebuild version and found 
https://mirror.contextgarden.net/general/manuals/math-mkiv.pdf.
  However, this document seems to be from 2021 and has a kind of wobbly
  rendering in Okular/Poppler (I remember the same phenomena with early
  LMTX). See the screenshot attached (math-mkiv-online.png). Is there a
  newer version somewhere? Maybe it is meaningful to delete the old
  version.


Best
Gerion
From 187f2bf0901d414bf55869054d29ee2c4bec1a64 Mon Sep 17 00:00:00 2001
From: Gerion Entrup 
Date: Tue, 16 Jan 2024 23:40:40 +0100
Subject: [PATCH] units-mkiv: improve

- typos
- remove getbuffer without context
- demonstrate usage of pm and to
---
 doc/context/sources/general/manuals/units/units-mkiv.tex | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/context/sources/general/manuals/units/units-mkiv.tex b/doc/context/sources/general/manuals/units/units-mkiv.tex
index d70c7221f..a1631aadb 100644
--- a/doc/context/sources/general/manuals/units/units-mkiv.tex
+++ b/doc/context/sources/general/manu

[NTG-context] Re: Linebreak in formual

2024-01-15 Thread Shiv Shankar Dayal
Thanks a lot, Aditya.

On Mon, Jan 15, 2024 at 8:41 PM Aditya Mahajan  wrote:

> On Mon, 15 Jan 2024, Mikael Sundqvist wrote:
>
> > Hi,
> >
> > you can try something like
> >
> > \sum_{\mstack{k=0, k\equiv p + 1 (\mtext{mod }2)}}^{p -1}
> >
> > but it will not be too pretty with such a large sub-index to the sum.
>
> There is also
>
> \sum_{\startsubstack \NC a \NR \NC b \NR \stopsubstack}
>
> which imitates the \substack command from latex.
>
> OT but it is better to use one of \mod, \pmod, \bmod, rather than explicit
> \mtext{mod }.
>
> Aditya
>
> ___
> 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
>
> ___
>


-- 
Respect,
Shiv Shankar Dayal
___
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: Linebreak in formual

2024-01-15 Thread Aditya Mahajan
On Mon, 15 Jan 2024, Mikael Sundqvist wrote:

> Hi,
> 
> you can try something like
> 
> \sum_{\mstack{k=0, k\equiv p + 1 (\mtext{mod }2)}}^{p -1}
> 
> but it will not be too pretty with such a large sub-index to the sum.

There is also 

\sum_{\startsubstack \NC a \NR \NC b \NR \stopsubstack}

which imitates the \substack command from latex. 

OT but it is better to use one of \mod, \pmod, \bmod, rather than explicit 
\mtext{mod }. 

Aditya
___
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: Linebreak in formual

2024-01-15 Thread Shiv Shankar Dayal
It works nicely. You are a lifesaver. Thanks a lot.

On Mon, Jan 15, 2024 at 7:30 PM Mikael Sundqvist  wrote:

> Hi,
>
> you can try something like
>
> \sum_{\mstack{k=0, k\equiv p + 1 (\mtext{mod }2)}}^{p -1}
>
> but it will not be too pretty with such a large sub-index to the sum.
>
> /Mikael
>
> On Mon, Jan 15, 2024 at 2:41 PM Shiv Shankar Dayal
>  wrote:
> >
> > I have following formula
> > \sum_{k=0\\ k\equiv p + 1(\mathrm{mod}\;2)}^{p -1} but the \\ does not
> break the line below Sigma. How can I achieve this because AFAIK it will
> work in LaTeX?
> >
> > --
> > Respect,
> > Shiv Shankar Dayal
> >
> ___
> > 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
>
> ___
>


-- 
Respect,
Shiv Shankar Dayal
___
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: Linebreak in formual

2024-01-15 Thread Mikael Sundqvist
Hi,

you can try something like

\sum_{\mstack{k=0, k\equiv p + 1 (\mtext{mod }2)}}^{p -1}

but it will not be too pretty with such a large sub-index to the sum.

/Mikael

On Mon, Jan 15, 2024 at 2:41 PM Shiv Shankar Dayal
 wrote:
>
> I have following formula
> \sum_{k=0\\ k\equiv p + 1(\mathrm{mod}\;2)}^{p -1} but the \\ does not break 
> the line below Sigma. How can I achieve this because AFAIK it will work in 
> LaTeX?
>
> --
> Respect,
> Shiv Shankar Dayal
> ___
> 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: font error in float placement?

2024-01-14 Thread Hans Hagen via ntg-context

Hi,


to index a nil value (field 'embed')

fixed in next upload (this merge upgrade is a bit work in progress)

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://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] font error in float placement?

2024-01-13 Thread Henning Hraban Ramm

(LMTX, latest beta with self-compiled binary on OSX-intel.)

With my book, I run into an Lua error while placing a sidefloat.
If I comment \externalfigure or replace the image with a different one, 
the error disappears.


I can’t reproduce it in a minimal example, so I guess it depends on the 
current surroundings.


Since it points to some font handling and the figure is a PDF containing 
fonts, I guess it might depend on the new handling of fonts in PDFs, but 
it doesn’t change regardless of 
\setupexternalfigures[compact=preset:merge] or other settings.


Here’s the image:
https://yemaya.fiee.net/s/8TqwfcP7mLMmy9p
(In a simple document it works.)

Hraban

"""
lua error   > lua error on line 516 in file de/c_feinheiten.tex:

registered function call [1565]: 
...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:596: attempt 
to index a nil value (field 'embed')

stack traceback:
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:596: in 
local 'handler'
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:709: in 
upvalue 'plugin'
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:938: in 
upvalue 'lpdf_epdf_fontplugin'
	[string "local lpdf_epdf_fontplugin = lpdf.epdf.fontpl..."]:3: in local 
'runner'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:97: in 
upvalue 'lpdf_epdf_contentplugin'
	[string "local lpdf_epdf_contentplugin = lpdf.epdf.con..."]:3: in local 
'runner'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:119: in 
field 'pageplugin'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:1371: in 
upvalue 'copypage'
	...-10/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:112: in 
function <...-10/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:97>
	...-10/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1680: in 
function <...-10/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1665>

(...tail calls...)
506 \startsubsection[title=Schriftwahl]
…
513
514 \startplacefigure[title={Beispiele für gebrochene Schriften, 
halbherzig von Hand ausgeglichen},location=right,reference=abb:fraktur]

515 \externalfigure[gebrochene_schriften][width=.5\textwidth]
516 >>  \stopplacefigure
"""
___
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: \setupsynonyms textstyle=cap failing

2023-12-24 Thread Wolfgang Schuster

Garulfo schrieb am 23.12.2023 um 12:41:

Hi all,

the following  minimum working example is properly typesetted with 
textstyle=bold,

but it fails with textstyle=cap (ConTeXt version : 2023.09.26 18:19)

A number should have been here; I inserted '0'. (If you can't figure 
out why I
needed to see a number, look up 'weird error' in the index to The 
TeXbook.)

mtx-context | fatal error: return code: 1

It works on https://context-on-web.eu (ConTeXt version : 2022.12.22 22:17)


\definesynonyms    [abbreviation] [abbreviations] [\AbbreviationsFull]
\setupsynonyms [abbreviation] [textstyle=bold]

\starttext

\contextversion
\abbreviation{NTG}{Nederlandstalige TeX Gebruikersgroep}

Test 1 : \NTG .

Test 2 : \AbbreviationsFull{NTG}.

\stoptext

Any clue ?


Hans made changes on the capitals mode and now the following two lines 
have to be added to typo-cap.mkxl on line 52 and 53.


\definecapitals[\v!cap] [\v!capital]
\definecapitals[\v!Cap] [\v!Capital]

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: \setupsynonyms textstyle=cap failing

2023-12-23 Thread Bruce Horrocks


> On 23 Dec 2023, at 11:41, Garulfo  wrote:
> 
> Hi all,
> 
> the following  minimum working example is properly typesetted with 
> textstyle=bold,
> but it fails with textstyle=cap (ConTeXt version : 2023.09.26 18:19)
> 
> A number should have been here; I inserted '0'. (If you can't figure out why 
> I 
> needed to see a number, look up 'weird error' in the index to The TeXbook.) 
> mtx-context | fatal error: return code: 1
> 
> It works on https://context-on-web.eu (ConTeXt version : 2022.12.22 22:17)
> 
> 
> \definesynonyms[abbreviation] [abbreviations] [\AbbreviationsFull]
> \setupsynonyms [abbreviation] [textstyle=bold]
> 
> \starttext
> 
> \contextversion
> \abbreviation{NTG}{Nederlandstalige TeX Gebruikersgroep}
> 
> Test 1 : \NTG .
> 
> Test 2 : \AbbreviationsFull{NTG}.
> 
> \stoptext

I'm not sure why textstyle=cap fails but textstyle=sc works. However 
textstyle=\cap (i.e. as a command) works. Also \abbreviation is already defined 
so you don't need to define it again. Thus your MWE becomes:

%\definesynonyms[abbreviation] [abbreviations] [\AbbreviationsFull]
\setupsynonyms [abbreviation] [textstyle=\cap]

\starttext

\contextversion
\abbreviation{NTG}{Nederlandstalige TeX Gebruikersgroep}

Test 1 : \NTG .

Test 2 : \infull{NTG} %\AbbreviationsFull{NTG}.

\stoptext

—
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] \setupsynonyms textstyle=cap failing

2023-12-23 Thread Garulfo

Hi all,

the following  minimum working example is properly typesetted with 
textstyle=bold,

but it fails with textstyle=cap (ConTeXt version : 2023.09.26 18:19)

A number should have been here; I inserted '0'. (If you can't figure out 
why I

needed to see a number, look up 'weird error' in the index to The TeXbook.)
mtx-context | fatal error: return code: 1

It works on https://context-on-web.eu (ConTeXt version : 2022.12.22 22:17)


\definesynonyms    [abbreviation] [abbreviations] [\AbbreviationsFull]
\setupsynonyms [abbreviation] [textstyle=bold]

\starttext

\contextversion
\abbreviation{NTG}{Nederlandstalige TeX Gebruikersgroep}

Test 1 : \NTG .

Test 2 : \AbbreviationsFull{NTG}.

\stoptext




Any clue ?___
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: xmlpos values doubled

2023-11-22 Thread Hans Hagen

On 11/22/2023 2:30 AM, Benjamin Buchmuller wrote:

Hi list,

I came across this old thread as I was trying to use \xmlpos{#1} to 
"dynamically" create references such as \item[mystep:\xmlpos{#1}] to be 
referenced when other elements of this node are parsed at a later point.

In fact, it seems that \xmlpos{#1} returns duplicate values. This might indeed 
be the intended meaning of \xmlpos{#1} as it seems related to the XML query 
foo/bar/index() which only looks up the position in the parent node. (I noticed 
that if I run this repeatedly, I get somehow different values from times to 
times. I can't say why.)

Anyways, I was wondering if there is a TeX command to access the absolute 
position of an element in the tree? Similar to foo/bar[rootposition()] (or 
foo/bar[order()]? – Can't make sense of the entry in the XML manual.)
normally elements are unique, and within n xml instance #1 itself is 
rather unique (but the same even over runs i.e. when it goes via the tuc 
file)


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://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: xmlpos values doubled

2023-11-21 Thread Benjamin Buchmuller
Hi list,

I came across this old thread as I was trying to use \xmlpos{#1} to 
"dynamically" create references such as \item[mystep:\xmlpos{#1}] to be 
referenced when other elements of this node are parsed at a later point. 

In fact, it seems that \xmlpos{#1} returns duplicate values. This might indeed 
be the intended meaning of \xmlpos{#1} as it seems related to the XML query 
foo/bar/index() which only looks up the position in the parent node. (I noticed 
that if I run this repeatedly, I get somehow different values from times to 
times. I can't say why.)

Anyways, I was wondering if there is a TeX command to access the absolute 
position of an element in the tree? Similar to foo/bar[rootposition()] (or 
foo/bar[order()]? – Can't make sense of the entry in the XML manual.)

Thank you for your help!


Benjamin


> Hi Ben,
> 
> I think that both \xmlpos and \xmldepth give weird results.
> 
> With this minimal sample:
> 
> \startbuffer[text]
> first level
> second level
> third level
> third level
> 
> second level
> third level
> third level
> 
> second level
> third level
> third level
> 
> 
> \stopbuffer
> 
> \startxmlsetups xml:text
> \xmlsetsetup{#1}{doc|s|ss}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:text}
> 
> \startxmlsetups xml:doc
> \chapter{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> \stopxmlsetups
> 
> \startxmlsetups xml:s
> \section{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> \stopxmlsetups
> 
> \startxmlsetups xml:ss
> \subsection{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> \stopxmlsetups
> 
> \setuphead[chapter,section,subsection][before=,after=,]
> \starttext
> \xmlprocessbuffer{main}{text}{}
> \stoptext
> 
> \xmldepth shows values that I think are +1 than they should be.
> 
> \xmlpos counts in pairs and not in units (as you wrote, 2, 4, 6...).
> 
> Hans, could you check whether this is working as expected?
> 
> Sorry, but if this isn’t a bug, I have no idea of what I may be missing.
> 
> 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] Problem with textstyle

2023-11-17 Thread Rik Kabel

Hello list,

The following example does not compile, complaining “Missing number, 
treated as zero

needed to see a number, look up 'weird error' in the index to The TeXbook”:

   \setuphead   [chapter]
 [
  textstyle=cap,
 ]
   \starttext
   \startchapter    [title={Oops!}]
   \input knuth-gpt \par
   \stopchapter
   \stoptext

Replacing the textstyle /cap/ by any of /bold/, /slanted/, /smallcaps/, 
and /italic/ results in a clean compilation but the indicated style is 
not applied. Using a style description like /em/, /\em/, /bf/, /\bf/, 
/\sc,/ does produce the suggested result. The wiki and mail repository 
are full of examples with the former style names.


Using /style=cap/ (which would change the number as well) also results 
in a failed compilation, while using /style=bolditalic/ works as it should.


ConTeXt  ver: 2023.09.26 18:19 LMTX  fmt: 2023.10.9  int: english/english

--
Rik

___
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: typearea

2023-10-29 Thread Thomas Meyer

Oh, I found something about in the archive!

Am 29.10.23 um 11:37 schrieb Thomas Meyer:

Hi,
I'm new to ConTeXt and try to use the module typearea 
(https://modules.contextgarden.net/cgi-bin/module.cgi/action=find/name=typearea).

But the example doesn't work:

\usemodule[typearea]
\setupTypeArea[bcor=0mm,alphabets=3.1]
\setuppagenumbering[alternative=doublesided]
\starttext
\dorecurse4{\framed[width=\textwidth,height=\textheight]{test}\page}
\stoptext

I got:

texmf-dist/tex/context/third/typearea/t-typearea.tex'
loading > Something like KOMA-TypeArea
tex error   > tex error on line 89 in file 
/usr/local/texlive/2023/texmf-dist/tex/context/third/typearea/t-typearea.tex: 
Missing number, treated as zero






    {
 \TA@alphabets
 \par \PageWidth =\dimexpr \paperwidth -\TA@bcor \relax \par \edef 
\Ratio {\withoutpt {
    \the \dimexpr 2\paperheight /(\PageWidth /32768)\relax }} \par 
\setbox \scratchbox \hbox {\dorecurse {26}{\character \recurselevel }} 
\Width =\dimexpr \TA@alphabet


    \setupTypeArea[bcor=0pt,oneside=no,alphabets=2.6]

79  height=\the\Height,
80  width=\the\Width,
81  header=2\lineheight,
82  headerdistance=\lineheight,
83  footer=2\lineheight,
84  footerdistance=3\lineheight,
85  topspace=\Top]
86 }
87 \protect
88
89 >>  \setupTypeArea[bcor=0pt,oneside=no,alphabets=2.6]
90
91 \doifnotmode{demo}{\endinput}
92
93 %D Usage example:
94 \usemodule[typearea]
95 \setupTypeArea[bcor=0mm,alphabets=3.1]
96 \setuppagenumbering[alternative=doublesided]
97 \starttext
98 \dorecurse4{\framed[width=\textwidth,height=\textheight]{test}\page}
99 \stoptext
A number should have been here; I inserted '0'. (If you can't figure 
out why I
needed to see a number, look up 'weird error' in the index to The 
TeXbook.)

mtx-context | fatal error: return code: 1


Line 89 in the module should be the problem. But how can I solve it? I 
think some lines in the module should be commented out. (An example 
directly in the module?)


I thank you for any hint.

Greetings
Thomas

___
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] typearea

2023-10-29 Thread Thomas Meyer

Hi,
I'm new to ConTeXt and try to use the module typearea 
(https://modules.contextgarden.net/cgi-bin/module.cgi/action=find/name=typearea).

But the example doesn't work:

\usemodule[typearea]
\setupTypeArea[bcor=0mm,alphabets=3.1]
\setuppagenumbering[alternative=doublesided]
\starttext
\dorecurse4{\framed[width=\textwidth,height=\textheight]{test}\page}
\stoptext

I got:

texmf-dist/tex/context/third/typearea/t-typearea.tex'
loading > Something like KOMA-TypeArea
tex error   > tex error on line 89 in file 
/usr/local/texlive/2023/texmf-dist/tex/context/third/typearea/t-typearea.tex: 
Missing number, treated as zero






    {
 \TA@alphabets
 \par \PageWidth =\dimexpr \paperwidth -\TA@bcor \relax \par \edef 
\Ratio {\withoutpt {
    \the \dimexpr 2\paperheight /(\PageWidth /32768)\relax }} \par 
\setbox \scratchbox \hbox {\dorecurse {26}{\character \recurselevel }} 
\Width =\dimexpr \TA@alphabet


    \setupTypeArea[bcor=0pt,oneside=no,alphabets=2.6]

79  height=\the\Height,
80  width=\the\Width,
81  header=2\lineheight,
82  headerdistance=\lineheight,
83  footer=2\lineheight,
84  footerdistance=3\lineheight,
85  topspace=\Top]
86 }
87 \protect
88
89 >>  \setupTypeArea[bcor=0pt,oneside=no,alphabets=2.6]
90
91 \doifnotmode{demo}{\endinput}
92
93 %D Usage example:
94 \usemodule[typearea]
95 \setupTypeArea[bcor=0mm,alphabets=3.1]
96 \setuppagenumbering[alternative=doublesided]
97 \starttext
98 \dorecurse4{\framed[width=\textwidth,height=\textheight]{test}\page}
99 \stoptext
A number should have been here; I inserted '0'. (If you can't figure out 
why I

needed to see a number, look up 'weird error' in the index to The TeXbook.)
mtx-context | fatal error: return code: 1


Line 89 in the module should be the problem. But how can I solve it? I 
think some lines in the module should be commented out. (An example 
directly in the module?)


I thank you for any hint.

Greetings
Thomas___
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: Issue : compilation error when using mathcases with pagella fonts (and others)

2023-09-24 Thread Hans Hagen

On 9/24/2023 5:17 PM, Pablo Rodriguez wrote:

On 9/24/23 15:49, Mikael Sundqvist wrote:

Hi,

Not that it helps you much, but your example works fine here, and it
gives the expected result.


Hi Mikael,

I get exactly the same compilation error as Vicent.

I tried a brand new installation (with
http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip) and I got
the same error again.

Just in case it might help,

Pablo

PS: here is the error again:

tex error   > tex error on line 10 in file ./a.tex:

lua error:

run callback [44]:
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: table
index is nil
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: in
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:104: in
function <...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:62>
[C]: in upvalue 'builders_kernel_mlisttohlist'
[string "local tonut  = nodes.tonut..."]:43: in function <[string
"local tonut  = nodes.tonut..."]:18>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2986: in
function <...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2984>

  1 \setupbodyfont[pagella]
  2
  3 \starttext
  4 \startformula
  5 \delta_{ij} =
  6  \startmathcases
  7  \NC 1 \NC \text{if } i = j \NR
  8  \NC 0 \NC \text{otherwise} \NR
  9  \stopmathcases
10 >>  \stopformula
11 \stoptext
i'll check it tomorrow (witk mikael who has a newer bin and first we 
need to test some other math things) ... i probably need some temp hack 
because the build farm is still down (an extra callback argument was 
added a while ago)


-
  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: Issue : compilation error when using mathcases with pagella fonts (and others)

2023-09-24 Thread Pablo Rodriguez
On 9/24/23 15:49, Mikael Sundqvist wrote:
> Hi,
>
> Not that it helps you much, but your example works fine here, and it
> gives the expected result.

Hi Mikael,

I get exactly the same compilation error as Vicent.

I tried a brand new installation (with
http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip) and I got
the same error again.

Just in case it might help,

Pablo

PS: here is the error again:

tex error   > tex error on line 10 in file ./a.tex:

lua error:

run callback [44]:
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: table
index is nil
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: in
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:104: in
function <...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:62>
[C]: in upvalue 'builders_kernel_mlisttohlist'
[string "local tonut  = nodes.tonut..."]:43: in function <[string
"local tonut  = nodes.tonut..."]:18>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2986: in
function <...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2984>

 1 \setupbodyfont[pagella]
 2
 3 \starttext
 4 \startformula
 5 \delta_{ij} =
 6  \startmathcases
 7  \NC 1 \NC \text{if } i = j \NR
 8  \NC 0 \NC \text{otherwise} \NR
 9  \stopmathcases
10 >>  \stopformula
11 \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: Issue : compilation error when using mathcases with pagella fonts (and others)

2023-09-24 Thread Mikael Sundqvist
Hi,

Not that it helps you much, but your example works fine here, and it
gives the expected result.

/Mikael

On Sun, Sep 24, 2023 at 1:42 PM Vincent Picard  wrote:
>
> Hello,
>
> Since ConTexT last upgrade (ltmx 2023.09.18 21:13), I have a document that 
> won't compile with ConTexT. The problem seems to occur when using mathcases 
> with some ConTeXt provided fonts, including pagella. This is a minimal not 
> working example :
>
> \setupbodyfont[pagella]
>
> \starttext
> \startformula
> \delta_{ij} =
>  \startmathcases
>  \NC 1 \NC \text{if } i = j \NR
>  \NC 0 \NC \text{otherwise} \NR
>  \stopmathcases
> \stopformula
> \stoptext
>
> The error is :
> run callback [44]: 
> ...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: table index 
> is nil\nstack traceback:\n 
> ...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: in metamethod 
> 'index'\n ...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:104: in 
> function <...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:62>\n 
> [C]: in upvalue 'builders_kernel_mlisttohlist'\n [string \"local tonut  = 
> nodes.tonut...\"]:43: in function <[string \"local tonut  = 
> nodes.tonut...\"]:18>\n (...tail calls...)\n 
> ...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2986: in function 
> <...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2984>
>
> My system is : FreeBSD 64bits
>
> Thank you for any help.
> Sincerely,
> Vincent Picard
> ___
> 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] Issue : compilation error when using mathcases with pagella fonts (and others)

2023-09-24 Thread Vincent Picard
Hello,

Since ConTexT last upgrade (ltmx 2023.09.18 21:13), I have a document that
won't compile with ConTexT. The problem seems to occur when using mathcases
with some ConTeXt provided fonts, including pagella. This is a minimal not
working example :

\setupbodyfont[pagella]

\starttext
\startformula
\delta_{ij} =
 \startmathcases
 \NC 1 \NC \text{if } i = j \NR
 \NC 0 \NC \text{otherwise} \NR
 \stopmathcases
\stopformula
\stoptext

The error is :
run callback [44]:
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: table index
is nil\nstack traceback:\n
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: in
metamethod 'index'\n
...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:104: in
function <...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:62>\n
[C]: in upvalue 'builders_kernel_mlisttohlist'\n [string \"local tonut  =
nodes.tonut...\"]:43: in function <[string \"local tonut  =
nodes.tonut...\"]:18>\n (...tail calls...)\n
...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2986: in
function <...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2984>

My system is : FreeBSD 64bits

Thank you for any help.
Sincerely,
Vincent Picard
___
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: (feature proposal) link to attachments: /GoToE

2023-09-03 Thread Hans Hagen

On 9/3/2023 12:17 PM, Pablo Rodriguez wrote:

Hi Hans,

having attachments in PDF is very useful, but the vast majority of
people don’t know how to handle them (even with the attachment pane
displayed when Acrobat opens the document, or with file annotation).

It would be really useful to have a link with destination that it would
open the embedded document (when clicked).

Since in its basic functionality, this is very similar to links to
external documents (GoToR), I wonder whether it would be possible to
implement links to embedded documents (GoToE,
https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2048909).

At least to begin with, only links to embedded children documents would
be required.

If this GoToR is generated by ConTeXt from
"\goto{whatever}[destination-doc::page(15)]":

   17 0 obj
   <<
 /D [ 14 /Fit ]
 /F (destination-doc.pdf)
 /NewWindow true
 /S /GoToR
   >>
   endobj

A GoToE destination for "\attachment[file=destination-doc.pdf,
method=hidden]" would read:

   1 0 obj
<<
 /S /GoToE
 /D [ 14 /Fit ]
 /NewWindow true
 /T << /R /C
   /N (destination-doc.pdf) >>
>>
   endobj

With EmbeddedFiles, the F entry from GoToR is a target dictionary (T
key) in GoToE.

The T dictionary contains the relation (R key) to the destination file
(only C, child, needed) and the name (N) from EmbeddedFiles/Names for
the attachment.

This is the most basic implementation that allows to link to an
attachment.

What the spec describes as “a complete facility for linking between a
file in a hierarchy of nested embedded files and another file in the
same or different hierarchy” is probably unnecesarily complex (even to
use).

With file annotations, instead of the name from EmbeddedFiles/Names in
the target dictionary, it requires the keys P and A (as numbers or
strings).

   P gives the page number which contains the file annotation:
   zero-based as number, or named destination as string.

   A gives the annotation: zero-based index of the annotation in the
   Annots array, or NM entry value from the annotation object.

As for the interface, it would be great that GoToR links could be
converted automatically in "\goto{some text}[file::page(number)]" for
attached files.

This basic implementation of GoToE links would be extremely helpful to
access embedded documents (believe it or not, this is something I
explain almost every week at work).

I would be happy to provide the code to implement this, but I’m
afraid this is way beyond my knowledge.
remind me in a month or so ... i'm not going to touch that part of the 
code now (some other priorities)


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] (feature proposal) link to attachments: /GoToE

2023-09-03 Thread Pablo Rodriguez
Hi Hans,

having attachments in PDF is very useful, but the vast majority of
people don’t know how to handle them (even with the attachment pane
displayed when Acrobat opens the document, or with file annotation).

It would be really useful to have a link with destination that it would
open the embedded document (when clicked).

Since in its basic functionality, this is very similar to links to
external documents (GoToR), I wonder whether it would be possible to
implement links to embedded documents (GoToE,
https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2048909).

At least to begin with, only links to embedded children documents would
be required.

If this GoToR is generated by ConTeXt from
"\goto{whatever}[destination-doc::page(15)]":

  17 0 obj
  <<
/D [ 14 /Fit ]
/F (destination-doc.pdf)
/NewWindow true
/S /GoToR
  >>
  endobj

A GoToE destination for "\attachment[file=destination-doc.pdf,
method=hidden]" would read:

  1 0 obj
   <<
/S /GoToE
/D [ 14 /Fit ]
/NewWindow true
/T << /R /C
  /N (destination-doc.pdf) >>
   >>
  endobj

With EmbeddedFiles, the F entry from GoToR is a target dictionary (T
key) in GoToE.

The T dictionary contains the relation (R key) to the destination file
(only C, child, needed) and the name (N) from EmbeddedFiles/Names for
the attachment.

This is the most basic implementation that allows to link to an
attachment.

What the spec describes as “a complete facility for linking between a
file in a hierarchy of nested embedded files and another file in the
same or different hierarchy” is probably unnecesarily complex (even to
use).

With file annotations, instead of the name from EmbeddedFiles/Names in
the target dictionary, it requires the keys P and A (as numbers or
strings).

  P gives the page number which contains the file annotation:
  zero-based as number, or named destination as string.

  A gives the annotation: zero-based index of the annotation in the
  Annots array, or NM entry value from the annotation object.

As for the interface, it would be great that GoToR links could be
converted automatically in "\goto{some text}[file::page(number)]" for
attached files.

This basic implementation of GoToE links would be extremely helpful to
access embedded documents (believe it or not, this is something I
explain almost every week at work).

I would be happy to provide the code to implement this, but I’m
afraid this is way beyond my knowledge.

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] Re: your opinion about list structures

2023-08-22 Thread denis.maier
Hi Hraban,

a late reply concerning the ToCs in your book: maybe you could an 
two-toc-approach like in the Memoir manual? One could show only the chapters, 
another would contain everything.

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Henning Hraban Ramm 
> Gesendet: Donnerstag, 10. August 2023 15:22
> An: mailing list for ConTeXt users 
> Betreff: [NTG-context] your opinion about list structures
> 
> Hi, this is about my ConTeXt book again.
> 
> [ToC]
> 
> At the moment, my table of contents has chapters and sections and is 8 pages
> long. I would probably hardly use it.
> 
> Maybe it would be better to show only chapters (29 content + 12 appendix = 2
> pages) and include a list of sections after the chapter title (or not at all).
> 
> [Registers]
> 
> I split between command and topic index (9 pages each), because I find it
> annoying to have the commands between the topics.
> I also include the topics that are mentioned in titles in the index, because 
> I hate
> it if I must look in two places.
> (Otherwise I wouldn't think about omitting the sections from the ToC.)
> 
> At the moment there's also an index of todo items, but that will disappear
> before print.
> 
> [Glossary]
> 
> There's a short dictionary of technical terms in the appendix (8.5 p.).
> Each lemma is also included in the index.
> 
> Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG.?) They're
> in the index and explained where they matter - I don't think the meaning of
> many abbreviations like file types is important.
> 
> [Other lists]
> 
> Should I include a list of colors, like the output of \showcolor[crayola]? (I 
> think
> it would only bloat the book, and everyone can create the list themselves.)
> 
> I have lists of supported languages (should get checked), fonts in the
> distribution and all math fonts, because these are not easily reproducible
> (AFAIK).
> 
> 
> So, what do you think, and how do you like to work with technical books?
> What kind of information (about ConTeXt or documents/printing in
> general) do you find hard to find?
> 
> Hraban
> ___
> 
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl /
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
> .ntg.nl%2Fmailman%2Flistinfo%2Fntg-
> context=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5f7a14d8
> 5386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7C1%7C0
> %7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4
> wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%
> 7C%7C%7C=wp5lFDSJq9915y4de%2BNuNiULb09yT%2FpDr%2FWXrq
> OcdVI%3D=0
> webpage  :
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
> .pragma-
> ade.nl%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5f7a14
> d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7C1%7
> C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000
> %7C%7C%7C=TLdBrqOp1GuhmQRLiaydxRox1aeaO%2BWASrA%2FBa
> OAs%2BI%3D=0 /
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontex
> t.aanhet.net%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5
> f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7
> C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWI
> joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> 3000%7C%7C%7C=T%2FP42p3V5RzC%2B%2BwX5vByYtXy3LFOHce5
> Eues%2F8PPsug%3D=0
> archive  :
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbu
> cket.org%2Fphg%2Fcontext-
> mirror%2Fcommits%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6
> e26b5f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d79
> 77e%7C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d
> 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C3000%7C%7C%7C=MR51GITNqb9ludzBJMwmu4AqE%2BaWw
> 0%2BIPpPm76Nwv%2BE%3D=0
> wiki :
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fconte
> xtgarden.net%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b
> 5f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%
> 7C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJ
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
> %7C3000%7C%7C%7C=ubpCSLzX4vdgb7WNlaK7ASRwd94Ugv0TtuF8
> wzDnnts%3D=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: An error which is not in .log file

2023-08-15 Thread Wolfgang Schuster
The error message is about line 276 in one of your included files but we 
need the content of the faulty file.
To get the faulty file comment your input line until the error 
disappears, ensure to delete the tuc file (context --purge) because 
sometimes index/register entries are the problem.


There is also something wrong with the structure of your document when 
need \page[yes] after each file.


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: An error which is not in .log file

2023-08-15 Thread Hans Hagen

On 8/15/2023 4:50 PM, Xavier B. wrote:

After trying to compile a long file with LMTX (previously with MKIV all 
compiles perfectly), I get an error

structures  > bookmark: Referències
structure   > sectioning > chapter @ level 2 : 0.1 -> Referències
publications> list > collecting entries using method 'global' and sort 
order 'default'
pages   > flushing realpage 296, userpage 294, subpage 296
structures  > bookmark: Índex alfabètic
structure   > sectioning > chapter @ level 2 : 0.2 -> \headtext {index}
pages   > flushing realpage 297, userpage 295, subpage 297
structures  > end of sectionblock 'backpart'
close source> level 1, order 147, name './ng-exercicis.conTeXt'
(\end occurred inside a group at level 8)
8:0: semisimple group entered at line 276: \begingroup


so check what starts at line 276 and see what should match

-
  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] An error which is not in .log file

2023-08-15 Thread Xavier B.
After trying to compile a long file with LMTX (previously with MKIV all 
compiles perfectly), I get an error

structures  > bookmark: Referències
structure   > sectioning > chapter @ level 2 : 0.1 -> Referències
publications> list > collecting entries using method 'global' and sort 
order 'default'
pages   > flushing realpage 296, userpage 294, subpage 296
structures  > bookmark: Índex alfabètic
structure   > sectioning > chapter @ level 2 : 0.2 -> \headtext {index}
pages   > flushing realpage 297, userpage 295, subpage 297
structures  > end of sectionblock 'backpart'
close source> level 1, order 147, name './ng-exercicis.conTeXt'
(\end occurred inside a group at level 8)
8:0: semisimple group entered at line 276: \begingroup
7:0: semisimple group entered at line 5: \begingroup
6:0: semisimple group entered at line 5: \begingroup
5:0: semisimple group entered at line 114: \begingroup
4:0: semisimple group entered at line 114: \begingroup
3:0: semisimple group entered at line 5: \begingroup
2:0: semisimple group entered at line 5: \begingroup
1:0: semisimple group entered at line 27: \begingroup
0:0: bottomlevel
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/home/xan/bin/context-current/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.004 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 240 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 512 modules (0.181 sec), 105 tables 
(0.010 sec), 617 chunks (0.191 sec)
mkiv lua stats  > traced context: maxstack: 1715, freed: 2, unreachable: 1713
mkiv lua stats  > cleaned up reserved nodes: 85 nodes, 11 lists of 671
mkiv lua stats  > node memory usage: 291 attribute, 62 dir, 91 glue, 3281 
gluespec, 1 glyph, 1 hlist, 1 kern, 2 math, 645 mathspec, 4 penalty, 18 rule, 2 
temp, 66305 whatsit
mkiv lua stats  > node list callback tasks: 16 unique task lists, 18 instances 
(re)created, 119367 calls
mkiv lua stats  > h-node processing time: 0.653 seconds including kernel
mkiv lua stats  > attribute processing time: 0.119 seconds front- and backend
mkiv lua stats  > driver time: 0.693 seconds
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.054 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: file: 69204, saved: 309548, direct: 957, function: 
244605, value: 7598, message: 0, bytecode: 617, late 0, total: 632529 (0 per 
page)
mkiv lua stats  > randomizer: initialized with value 0.45060333164985
mkiv lua stats  > v-node processing time: 0.259 seconds
mkiv lua stats  > loaded tex modules: 4 requested, 1 found (*-tikz), 3 missing 
(*-pgfmat *-pgfmath *-pgfrcs)
mkiv lua stats  > loaded patterns: ca::65 en::1, load time: 0.000
mkiv lua stats  > interactive elements: 74 references, 950 destinations
mkiv lua stats  > loaded fonts: 13 files: latinmodern-math.otf, 
lmmono10-regular.otf, lmroman10-bold.otf, lmroman10-italic.otf, 
lmroman10-regular.otf, lmromancaps10-regular.otf, lmromanslant10-regular.otf, 
lmsans10-bold.otf, lmsans10-boldoblique.otf, lmsans10-regular.otf, 
texgyreschola-bold.otf, texgyreschola-math.otf, texgyreschola-regular.otf
mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 68 instances, 
51 shared in backend, 8 common vectors, 43 common hashes, load time 1.181 
seconds
mkiv lua stats  > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 
4pt 5pt 6pt 7pt 8pt 9pt, undefined: 11.2pt 12.8pt 14pt 16.8pt 16pt 19.2pt 24pt 
30pt 36pt
mkiv lua stats  > metapost: 0.000 seconds, loading: 0.033, execution: 0.000, n: 
3, average: 0.011, instances: 1, luacalls: 14196 (file: 13784, text: 0, script: 
393, log: 19), memory: 3.881 M
mkiv lua stats  > math tweaking time: 0.474 seconds, 84 math goodie tables
mkiv lua stats  > math processing time: 0.292 seconds
mkiv lua stats  > graphics processing time: 1.768 seconds including tex, 268 
processed images, 57 unique asked, 27 bad names
mkiv lua stats  > publications load time: 0.005 seconds, 2963 bytes, 11 
definitions, 0 shortcuts
mkiv lua stats  > pdf annotations: 74 links (74 unique), 0 special
mkiv lua stats  > font embedding time: 0.018 seconds, 13 fonts
mkiv lua stats  > result saved in file: ng-exercicis.pdf, compresslevel 1, 
objectcompresslevel 3
mkiv lua stats  > positions: 311 collected, 0 deltas, 307 shared partials, 133 
partial entries
mkiv lua stats  > cross referencing: 713 identified, 269 unknown
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.10.10, functionality 
level: 20230803, format id: 697, compiler: gcc
mkiv lua stats  > tex properties: 806417 hash slots used of 2097152, 70025 
control sequen

[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Hans Hagen via ntg-context

On 8/12/2023 7:19 PM, Thangalin wrote:

Thanks Hans.

The \newinteger approach would always increment the value, regardless of
conditionals within the MetaPost code (i.e., it was like legend :=
"\ConcurrentTextGet" would always invoke the macro just be referencing the
MPgraphic and nothing would prevent its execution). This meant that the Get
indexes would not correspond to the Set indexes. Switching to \definenumber
resolved the issue. There were a few other oddities, such as the "Get"
counter incrementing twice. Here's the code:


you could remove the \localcontrolled around the advance


\definenumber[ConcurrentTextSetCounter][prefix=no]
\definenumber[ConcurrentTextGetCounter][prefix=no]

\setnumber[ConcurrentTextSetCounter][0]
\setnumber[ConcurrentTextGetCounter][0]

% Map each label as global key/value pairs.
\def\ConcurrentTextSet#1{%
   \incrementnumber[ConcurrentTextSetCounter]%
   \setxvariable
 {concurrent}
 {text:\rawcountervalue[ConcurrentTextSetCounter]}
 {#1}}

% Account for the counter incrementing twice and the index being 1-based.
\def\ConcurrentTextGet{%
   \incrementnumber[ConcurrentTextGetCounter]%
   \getvariable
 {concurrent}


why twice ? you only have to typeset the text once, right?


{text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}}

\startuseMPgraphic{GraphicConcurrent}
   numeric index;
   index := 1;

   % Differentiate between new text blocks and those crossing pages.
   if (multikind[ index ] = "single") or (multikind[ index ] = "first"):
 string legend;
 legend := "\ConcurrentTextGet";

 % For new text blocks, write the title.
 picture p;
 p := textext.rt( legend )
   shifted ulcorner multipars[ index ]
   shifted (1cm, 0);

 % Draw the horizontal rule only for the initial text block.
 draw
   ulcorner multipars[ index ] shifted (1mm + xpart lrcorner p, 0) --
   urcorner multipars[ index ];

 % Draw the vertical rule for the initial text block.
 draw
   llcorner multipars[ index ] --
   ulcorner multipars[ index ] --
   ulcorner multipars[ index ] shifted (9mm, 0);

 draw p;
   else:
 % Draw only the vertical rule only when crossing page boundaries.
 draw
   llcorner multipars[ index ] --
   ulcorner multipars[ index ];
   fi
\stopuseMPgraphic

\definetextbackground[TextConcurrentFrame][
   mp=GraphicConcurrent,
   frame=off,
   topoffset=1em,
   leftoffset=1em,
   before=\blank[2*big],
   after=\blank,
   location=paragraph,
]

\startsetups concurrent:before
   \ConcurrentTextSet{%
 % Be sure to format "a.m." and other special phrases.
 \expandafter\TextReplacement{%
   \xmlatt{\getvariable{div}{concurrent}}{data-title}%
 }
   }
   \startTextConcurrentFrame
\stopsetups

\startsetups concurrent:after
   \stopTextConcurrentFrame
\stopsetups

\definestartstop[concurrent][
   before=\directsetup{concurrent:before},
   after=\directsetup{concurrent:after}
]

This allows for typesetting a wider range of pandoc-style Markdown
annotations, such as:

::: {.concurrent title="Terminal Berth 5, 3:17 a.m."}
text goes here
:::

With these changes, the titles now only appear at the start of the
demarcated text, in any combination of "concurrent" annotation instances
spanning any number of pages.

Much appreciated.

Cheers!
P.S.
The following line requires KeenWrite themes:

\expandafter\TextReplacement{ ... }

For details, see:

-

https://github.com/DaveJarvis/keenwrite-themes/blob/main/xhtml/xml-blocks.tex
-
https://github.com/DaveJarvis/keenwrite-themes/blob/main/boschet/replace.tex


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


--

-
  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: Pass string into text background graphic

2023-08-12 Thread Thangalin
Thanks Hans.

The \newinteger approach would always increment the value, regardless of
conditionals within the MetaPost code (i.e., it was like legend :=
"\ConcurrentTextGet" would always invoke the macro just be referencing the
MPgraphic and nothing would prevent its execution). This meant that the Get
indexes would not correspond to the Set indexes. Switching to \definenumber
resolved the issue. There were a few other oddities, such as the "Get"
counter incrementing twice. Here's the code:

\definenumber[ConcurrentTextSetCounter][prefix=no]
\definenumber[ConcurrentTextGetCounter][prefix=no]

\setnumber[ConcurrentTextSetCounter][0]
\setnumber[ConcurrentTextGetCounter][0]

% Map each label as global key/value pairs.
\def\ConcurrentTextSet#1{%
  \incrementnumber[ConcurrentTextSetCounter]%
  \setxvariable
{concurrent}
{text:\rawcountervalue[ConcurrentTextSetCounter]}
{#1}}

% Account for the counter incrementing twice and the index being 1-based.
\def\ConcurrentTextGet{%
  \incrementnumber[ConcurrentTextGetCounter]%
  \getvariable
{concurrent}

{text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}}

\startuseMPgraphic{GraphicConcurrent}
  numeric index;
  index := 1;

  % Differentiate between new text blocks and those crossing pages.
  if (multikind[ index ] = "single") or (multikind[ index ] = "first"):
string legend;
legend := "\ConcurrentTextGet";

% For new text blocks, write the title.
picture p;
p := textext.rt( legend )
  shifted ulcorner multipars[ index ]
  shifted (1cm, 0);

% Draw the horizontal rule only for the initial text block.
draw
  ulcorner multipars[ index ] shifted (1mm + xpart lrcorner p, 0) --
  urcorner multipars[ index ];

% Draw the vertical rule for the initial text block.
draw
  llcorner multipars[ index ] --
  ulcorner multipars[ index ] --
  ulcorner multipars[ index ] shifted (9mm, 0);

draw p;
  else:
% Draw only the vertical rule only when crossing page boundaries.
draw
  llcorner multipars[ index ] --
  ulcorner multipars[ index ];
  fi
\stopuseMPgraphic

\definetextbackground[TextConcurrentFrame][
  mp=GraphicConcurrent,
  frame=off,
  topoffset=1em,
  leftoffset=1em,
  before=\blank[2*big],
  after=\blank,
  location=paragraph,
]

\startsetups concurrent:before
  \ConcurrentTextSet{%
% Be sure to format "a.m." and other special phrases.
\expandafter\TextReplacement{%
  \xmlatt{\getvariable{div}{concurrent}}{data-title}%
}
  }
  \startTextConcurrentFrame
\stopsetups

\startsetups concurrent:after
  \stopTextConcurrentFrame
\stopsetups

\definestartstop[concurrent][
  before=\directsetup{concurrent:before},
  after=\directsetup{concurrent:after}
]

This allows for typesetting a wider range of pandoc-style Markdown
annotations, such as:

::: {.concurrent title="Terminal Berth 5, 3:17 a.m."}
text goes here
:::

With these changes, the titles now only appear at the start of the
demarcated text, in any combination of "concurrent" annotation instances
spanning any number of pages.

Much appreciated.

Cheers!
P.S.
The following line requires KeenWrite themes:

\expandafter\TextReplacement{ ... }

For details, see:

   -
   https://github.com/DaveJarvis/keenwrite-themes/blob/main/xhtml/xml-blocks.tex
   -
   https://github.com/DaveJarvis/keenwrite-themes/blob/main/boschet/replace.tex


concurrent.pdf
Description: Adobe PDF document
___
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: xml: matches always child of other element

2023-08-10 Thread Hans Hagen via ntg-context

Hi Denis,


Ok, after a bit of more testing I can now come up with another example.

The version using startstop works, but with the normal command, I'm always 
getting back the content of the first element. I thought it might be an 
expansion issue, but \expanded and also expansion=yes or expansion=xml on 
\definedescription have no effect. Perhaps most interestingly, adding using the 
startstop variant together with the command variant gives correct results for 
the command as well (xml:index-entry-term-3).

I have now found a way to proceed with my project (I'll just use the startstop 
variant), but I'd still be interested in understanding what is happening here. 
Does anyone know? Or is there anything I'm doing wrong here?


This is kind of tricky but here is a variant test

\startxmlsetups xml:index-entry-term-1 % does not work
\indexentry{1: \xmlflush{#1}}
% test \par
\indexentry{2: \xmlflush{#1}}
3: \xmlflush{#1}
\par
\stopxmlsetups

it has to do with the fact that when you don't use a start / stop the 
next paragraph is sees as description content so then you grab the same 
entry (sort of) nested


you can uncomment the "test \par" to see the side effects (twice one 
versus 1/2)


it's kind of hard to debug this, i admit,

Hans



%%
\startxmlsetups xml:test
   \xmlsetsetup{#1}{*}{-}
   \xmlsetsetup{#1}{index}{xml:*}
   \xmlsetsetup{#1}{index-entry}{xml:index-entry}
   %\xmlsetsetup{#1}{term}{xml:index-entry-term}
   \xmlsetsetup{#1}{term}{xml:index-entry-term-2}
   \xmlsetsetup{#1}{term}{xml:index-entry-term-3}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
   \xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry][]
%\definedescription[indexentry][expansion=yes] % has no effect
%\definedescription[indexentry][expansion=xml] % has no effect


\startxmlsetups xml:index-entry
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term % does not work
   \expanded{\indexentry{\xmlflush{#1}}}
   \indexentry{\xmlflush{#1}}
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term-2 % works
\startindexentry{\xmlflush{#1}}
\xmlflush{#1}
\stopindexentry
\stopxmlsetups

\startxmlsetups xml:index-entry-term-3 % works
\expanded{\indexentry{\xmlflush{#1}}}
\indexentry{\xmlflush{#1}}
\startindexentry{\xmlflush{#1}}
\xmlflush{#1}
\stopindexentry
\stopxmlsetups


\startbuffer[test]



One


Two


Three


\stopbuffer

\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext
%%

Von: denis.ma...@unibe.ch 
Gesendet: Montag, 24. Juli 2023 15:57
An: ntg-context@ntg.nl
Betreff: [NTG-context] Re: xml: matches always child of other element

Interestingly, we should be in the right subtree as this modified example is 
supposed to demonstrate (we're getting the correct numbers under each 
index-entry-term, just the terms are incorrect in all but the first case):

\startxmlsetups xml:test
 \xmlsetsetup{#1}{*}{-}
 \xmlsetsetup{#1}{index}{xml:*}
 \xmlsetsetup{#1}{index-entry}{xml:index-entry}
 %\xmlsetsetup{#1}{index-entry}{xml:index-entry-2}
 \xmlsetsetup{#1}{term}{xml:index-entry-term}
 \xmlsetsetup{#1}{nav-pointer-group}{xml:*}
 \xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer}
 \xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
   
\startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},]
 \xmlflush{#1}
   \stopsectionlevel
\stopxmlsetups

\startxmlsetups xml:index-title
 \xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry]
 [alternative=top,
 headstyle=normal,
 headcommand=\hskip-1cm,
 margin=1cm,
 inbetween=,
 ]

\startxmlsetups xml:index-entry
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-2
 \xmlfilter{#1}{/term/command(xml:index-entry-term)}%
 \xmlverbatim{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term
 \indexentry{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-group
 \xmlconcat{#1}{/nav-pointer}{, }
\stopxmlsetups

\startxmlsetups xml:nav-pointer
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-link
 \xmlflush{#1}
\stopxmlsetups

\startbuffer[test]


   
 Index
   
   
 First
 
   

[NTG-context] Re: your opinion about list structures

2023-08-10 Thread Keith McKay

Hi Hraban

Here are my thoughts on your ConTeXt Book.

[TOC] Definitely only show Chapters and Appendices. A list of sections 
could go under the Chapter Title, it would more useful there. I don't 
think there is also a need include sub-sections, (if you have them) it 
could make the list inordinately long.


[Registers] My own preference would be a command and a topic index if 
only for convenience sake.


[Glossary] I don't think an index of abbreviations is necessary if they 
are already in the index.


[Other Lists] I don't think a list of colours is necessary, you could 
just point them to the wiki.


Just my thoughts, and I look forward to read the English version of your 
book. (smiling)


Best Wishes

Keith McKay

p.s. It's been so long since I worked with technical books that I would 
have to blow the dust off them.


On 10/08/2023 14:21, Henning Hraban Ramm wrote:

Hi, this is about my ConTeXt book again…

[ToC]

At the moment, my table of contents has chapters and sections and is 8 
pages long. I would probably hardly use it.


Maybe it would be better to show only chapters (29 content + 12 
appendix = 2 pages) and include a list of sections after the chapter 
title (or not at all).


[Registers]

I split between command and topic index (9 pages each), because I find 
it annoying to have the commands between the topics.
I also include the topics that are mentioned in titles in the index, 
because I hate it if I must look in two places.

(Otherwise I wouldn’t think about omitting the sections from the ToC.)

At the moment there‘s also an index of todo items, but that will 
disappear before print.


[Glossary]

There’s a short dictionary of technical terms in the appendix (8.5 
p.). Each lemma is also included in the index.


Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG…?)
They’re in the index and explained where they matter – I don’t think 
the meaning of many abbreviations like file types is important.


[Other lists]

Should I include a list of colors, like the output of 
\showcolor[crayola]? (I think it would only bloat the book, and 
everyone can create the list themselves.)


I have lists of supported languages (should get checked), fonts in the 
distribution and all math fonts, because these are not easily 
reproducible (AFAIK).



So, what do you think, and how do you like to work with technical books?
What kind of information (about ConTeXt or documents/printing in 
general) do you find hard to find?


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] your opinion about list structures

2023-08-10 Thread Henning Hraban Ramm

Hi, this is about my ConTeXt book again…

[ToC]

At the moment, my table of contents has chapters and sections and is 8 
pages long. I would probably hardly use it.


Maybe it would be better to show only chapters (29 content + 12 appendix 
= 2 pages) and include a list of sections after the chapter title (or 
not at all).


[Registers]

I split between command and topic index (9 pages each), because I find 
it annoying to have the commands between the topics.
I also include the topics that are mentioned in titles in the index, 
because I hate it if I must look in two places.

(Otherwise I wouldn’t think about omitting the sections from the ToC.)

At the moment there‘s also an index of todo items, but that will 
disappear before print.


[Glossary]

There’s a short dictionary of technical terms in the appendix (8.5 p.). 
Each lemma is also included in the index.


Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG…?)
They’re in the index and explained where they matter – I don’t think the 
meaning of many abbreviations like file types is important.


[Other lists]

Should I include a list of colors, like the output of 
\showcolor[crayola]? (I think it would only bloat the book, and everyone 
can create the list themselves.)


I have lists of supported languages (should get checked), fonts in the 
distribution and all math fonts, because these are not easily 
reproducible (AFAIK).



So, what do you think, and how do you like to work with technical books?
What kind of information (about ConTeXt or documents/printing in 
general) do you find hard to find?


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: xml: matches always child of other element

2023-07-27 Thread denis.maier
Ok, after a bit of more testing I can now come up with another example.

The version using startstop works, but with the normal command, I'm always 
getting back the content of the first element. I thought it might be an 
expansion issue, but \expanded and also expansion=yes or expansion=xml on 
\definedescription have no effect. Perhaps most interestingly, adding using the 
startstop variant together with the command variant gives correct results for 
the command as well (xml:index-entry-term-3).

I have now found a way to proceed with my project (I'll just use the startstop 
variant), but I'd still be interested in understanding what is happening here. 
Does anyone know? Or is there anything I'm doing wrong here?

Best,
Denis

%%
\startxmlsetups xml:test
  \xmlsetsetup{#1}{*}{-}
  \xmlsetsetup{#1}{index}{xml:*}
  \xmlsetsetup{#1}{index-entry}{xml:index-entry}
  %\xmlsetsetup{#1}{term}{xml:index-entry-term}
  \xmlsetsetup{#1}{term}{xml:index-entry-term-2}
  \xmlsetsetup{#1}{term}{xml:index-entry-term-3}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
  \xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry][]
%\definedescription[indexentry][expansion=yes] % has no effect
%\definedescription[indexentry][expansion=xml] % has no effect


\startxmlsetups xml:index-entry
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term % does not work
  \expanded{\indexentry{\xmlflush{#1}}}
  \indexentry{\xmlflush{#1}}
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term-2 % works
\startindexentry{\xmlflush{#1}}
\xmlflush{#1}
\stopindexentry
\stopxmlsetups

\startxmlsetups xml:index-entry-term-3 % works
\expanded{\indexentry{\xmlflush{#1}}}
\indexentry{\xmlflush{#1}}
\startindexentry{\xmlflush{#1}}
\xmlflush{#1}
\stopindexentry
\stopxmlsetups


\startbuffer[test]



One


Two


Three


\stopbuffer

\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext
%%

Von: denis.ma...@unibe.ch 
Gesendet: Montag, 24. Juli 2023 15:57
An: ntg-context@ntg.nl
Betreff: [NTG-context] Re: xml: matches always child of other element

Interestingly, we should be in the right subtree as this modified example is 
supposed to demonstrate (we're getting the correct numbers under each 
index-entry-term, just the terms are incorrect in all but the first case):

\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{index}{xml:*}
\xmlsetsetup{#1}{index-entry}{xml:index-entry}
%\xmlsetsetup{#1}{index-entry}{xml:index-entry-2}
\xmlsetsetup{#1}{term}{xml:index-entry-term}
\xmlsetsetup{#1}{nav-pointer-group}{xml:*}
\xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer}
\xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
  
\startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},]
\xmlflush{#1}
  \stopsectionlevel
\stopxmlsetups

\startxmlsetups xml:index-title
\xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry]
[alternative=top,
headstyle=normal,
headcommand=\hskip-1cm,
margin=1cm,
inbetween=,
]

\startxmlsetups xml:index-entry
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-2
\xmlfilter{#1}{/term/command(xml:index-entry-term)}%
\xmlverbatim{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term
\indexentry{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-group
\xmlconcat{#1}{/nav-pointer}{, }
\stopxmlsetups

\startxmlsetups xml:nav-pointer
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-link
\xmlflush{#1}
\stopxmlsetups

\startbuffer[test]


  
Index
  
  
First

  
1
  
  
2
  
  
3
  

  
  
Second

  
4
  

  
  
Third

  
5
  
  
6
  
  
7
  

  

\stopbuffer


\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext

Von: denis.ma...@unibe.ch<mailto:denis.ma...@unibe.ch> 
mailto:denis.ma...@unibe.ch>>
Gesendet: Montag, 24. Juli 2023 13:38
An: ntg-context@ntg.nl<mailto:ntg-context@ntg.nl

[NTG-context] Problems with luametatex and texlive on OpenBSD

2023-07-27 Thread Edd Barrett
Hi everyone,

I'm finalising packaging TeX Live 2023 for OpenBSD and have an issue with
context using the new luametatex engine.

I'm getting various Lua errors when running `context --make`, like:

  node-ini.lmt:54: attempt to call a nil value (local 'getvalues')

and:

  node-nut.lmt:22: attempt to index a nil value (local 'nodecodes')

(full log below)

As far as I can see, I've set up the system in the same way as the other
downstream packagers have (according to
https://github.com/contextgarden/luametatex/issues/1 and
https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live):

 - make symlinks
  * /usr/local/bin/context.lua -> 
../share/texmf-dist/scripts/context/lua/context.lua
  * /usr/local/bin/mtx-context.lua -> 
../share/texmf-dist/scripts/context/lua/mtx-context.lua
  * /usr/local/bin/mtxrun.lua -> 
../share/texmf-dist/scripts/context/lua/mtxrun.lua
  * /usr/local/bin/context -> luametatex
  * /usr/local/bin/mtxrun -> luametatex

 - patch resolvers
   * 
https://github.com/jasperla/openbsd-wip/blob/master/print/texlive/texmf/patches/patch-texmf-dist_scripts_context_lua_mtxrun_lua
   * 
https://github.com/jasperla/openbsd-wip/blob/master/print/texlive/texmf/patches/patch-texmf-dist_tex_context_base_mkiv_data-res_lua
   * 
https://github.com/jasperla/openbsd-wip/blob/master/print/texlive/texmf/patches/patch-texmf-dist_web2c_texmf_cnf

In OpenBSD, we install the trees in /usr/local/share/texmf* (a hangover from
teTeX), so in these patches, TRUEPREFIX resolves to /usr/local. This does mean
selfauto doesn't work, but in the past I've always just patched in absolute
paths and it's been fine.

Does anyone know what may cause these errors? I've prodded around inside the
lua and luametatex sources, but I don't really know what's going on. I tend to
agree with Lua that the variables in question are not defined, so using them
causes a `nil` to appear which can't be indexed or called. Something else must
be expected to set up the undefined variables somewhere...

Any help would be greatly appreciated.

Full output of `context --make`:

```
resolvers   | resolving | configuration files already identified
resolvers   | resolving | loading configuration file 
'/usr/local/share/texmf-dist/web2c/texmfcnf.lua'
resolvers   | resolving |
resolvers   | resolving | locating list of 'home:.texlive2023/texmf-config' 
(runtime) (tree:///home:.texlive2023/texmf-config)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'tree', argument 'tree:///home:.texlive2023/texmf-config'
resolvers   | trees | locator 'home:.texlive2023/texmf-config' not found
resolvers   | resolving | locating list of 'home:texmf' (runtime) 
(tree:///home:texmf)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'tree', argument 'tree:///home:texmf'
resolvers   | trees | locator 'home:texmf' not found
resolvers   | resolving | locating list of '/usr/local/share/texmf-config' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-config'
resolvers   | files | file locator '/usr/local/share/texmf-config' not found
resolvers   | resolving | locating list of '/usr/local/share/texmf-var' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-var'
resolvers   | files | file locator '/usr/local/share/texmf-var' found as 
'/usr/local/share/texmf-var'
resolvers   | resolving | locating list of '/usr/local/share/texmf-project' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-project'
resolvers   | files | file locator '/usr/local/share/texmf-project' not 
found
resolvers   | resolving | locating list of '/usr/local/share/texmf-fonts' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-fonts'
resolvers   | files | file locator '/usr/local/share/texmf-fonts' not found
resolvers   | resolving | locating list of '/usr/local/share/texmf-local' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-local'
resolvers   | files | file locator '/usr/local/share/texmf-local' found as 
'/usr/local/share/texmf-local'
resolvers   | resolving | locating list of '/usr/local/share/texmf-dist' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-dist'
resolvers   | files | file locator '/usr/local/share/texmf-dist' found as 
'/usr/local/share/texmf-dist'
resolvers   | resolving |
resolvers   | methods | resolving, method 'generators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-var'
resolvers   | expansions | scanning path '/usr/local/share/texmf-var'

[NTG-context] Re: xml: matches always child of other element

2023-07-24 Thread denis.maier
Interestingly, we should be in the right subtree as this modified example is 
supposed to demonstrate (we're getting the correct numbers under each 
index-entry-term, just the terms are incorrect in all but the first case):

\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{index}{xml:*}
\xmlsetsetup{#1}{index-entry}{xml:index-entry}
%\xmlsetsetup{#1}{index-entry}{xml:index-entry-2}
\xmlsetsetup{#1}{term}{xml:index-entry-term}
\xmlsetsetup{#1}{nav-pointer-group}{xml:*}
\xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer}
\xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
  
\startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},]
\xmlflush{#1}
  \stopsectionlevel
\stopxmlsetups

\startxmlsetups xml:index-title
\xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry]
[alternative=top,
headstyle=normal,
headcommand=\hskip-1cm,
margin=1cm,
inbetween=,
]

\startxmlsetups xml:index-entry
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-2
\xmlfilter{#1}{/term/command(xml:index-entry-term)}%
\xmlverbatim{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term
\indexentry{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-group
\xmlconcat{#1}{/nav-pointer}{, }
\stopxmlsetups

\startxmlsetups xml:nav-pointer
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-link
\xmlflush{#1}
\stopxmlsetups

\startbuffer[test]


  
Index
  
  
First

  
1
  
  
2
  
  
3
  

  
  
Second

  
4
  

  
  
Third

  
5
  
  
6
  
  
7
  

  

\stopbuffer


\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext

Von: denis.ma...@unibe.ch 
Gesendet: Montag, 24. Juli 2023 13:38
An: ntg-context@ntg.nl
Betreff: [NTG-context] xml: matches always child of other element

Hi,

I must be missing something obvious, but in this example the pattern for  
always matches the first element, not the one under the current .
Interestingly, using xml:index-entry-2 instead of the normal version matches 
correctly... Any hints what is going off the rails here?

Best,
Denis

\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{index}{xml:*}
\xmlsetsetup{#1}{index-entry}{xml:index-entry}
%\xmlsetsetup{#1}{index-entry}{xml:index-entry-2}
\xmlsetsetup{#1}{term}{xml:index-entry-term}
\xmlsetsetup{#1}{nav-pointer-group}{xml:*}
\xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer}
\xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
  
\startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},]
\xmlflush{#1}
  \stopsectionlevel
\stopxmlsetups

\startxmlsetups xml:index-title
\xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry]
[alternative=top,
headstyle=normal,
headcommand=\hskip-1cm,
margin=1cm,
inbetween=,
]

\startxmlsetups xml:index-entry
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-2
\xmlfilter{#1}{/term/command(xml:index-entry-term)}%
\xmlverbatim{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term
\indexentry{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-group
\xmlconcat{#1}{/nav-pointer}{, }
\stopxmlsetups

\startxmlsetups xml:nav-pointer
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-link
\xmlflush{#1}
\stopxmlsetups

\startbuffer[test]


  
Index
  
  
First

  
1
  
  
2
  
  
3
  

  
  
Second

  
1
  

  
  
Third

  
1
  

  

\stopbuffer

\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext

[NTG-context] xml: matches always child of other element

2023-07-24 Thread denis.maier
Hi,

I must be missing something obvious, but in this example the pattern for  
always matches the first element, not the one under the current .
Interestingly, using xml:index-entry-2 instead of the normal version matches 
correctly... Any hints what is going off the rails here?

Best,
Denis

\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{index}{xml:*}
\xmlsetsetup{#1}{index-entry}{xml:index-entry}
%\xmlsetsetup{#1}{index-entry}{xml:index-entry-2}
\xmlsetsetup{#1}{term}{xml:index-entry-term}
\xmlsetsetup{#1}{nav-pointer-group}{xml:*}
\xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer}
\xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
  
\startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},]
\xmlflush{#1}
  \stopsectionlevel
\stopxmlsetups

\startxmlsetups xml:index-title
\xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry]
[alternative=top,
headstyle=normal,
headcommand=\hskip-1cm,
margin=1cm,
inbetween=,
]

\startxmlsetups xml:index-entry
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-2
\xmlfilter{#1}{/term/command(xml:index-entry-term)}%
\xmlverbatim{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term
\indexentry{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-group
\xmlconcat{#1}{/nav-pointer}{, }
\stopxmlsetups

\startxmlsetups xml:nav-pointer
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-link
\xmlflush{#1}
\stopxmlsetups

\startbuffer[test]


  
Index
  
  
First

  
1
  
  
2
  
  
3
  

  
  
Second

  
1
  

  
  
Third

  
1
  

  

\stopbuffer

\starttext

\xmlprocessbuffer{test}{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] \version[temporary] fatal error

2023-07-23 Thread Jacob Kauffmann via ntg-context
Hi all,

\version[temporary] produces an error for me (see below).
Is this a permanent change, or is this version really just temporary? ;)

All the best,
Jacob

Missing number, treated as zero



r

 \currentnote
\vskip 6\points \hbox to \makeupwidth {\infofont \getmessage \m!system 
{27}:\space \currentdate \quad \donefalse \ifcstok \currentproject
\currentproduct \ifcstok \currentproduct \currentcomponent \donetrue \fi 
\fi \ifdone \donefalse \else \ifempty \
 \page_info_add_to_box
#1->\scratchdimen \wd #1\setbox \b_page_versions \vpack to \ht #1{\vfill 
\settexthoffset \hsize \dimexpr \scratchdimen -2\texthoffset \relax \hkern 
\texthoffset \vbox to \zeropoint {\vss \page_info_place_info
}\vkern \bodyfontsize }\dp \b_page_versio
 \page_boxes_constructed_page_body
... \bgroup \boxmaxdepth \maxdimen \dontcomplain 
\page_marks_synchronize_page {#2}\page_boxes_construct_content \pagebox 
{#1}{#2}\page_backgrounds_add_to_main \pagebox \page_boxes_apply_offsets 
\pagebox \page_info_add_to_box \pagebox
\ifcase \page ...
 \page_boxes_constructed_page
...everybeforepagebody \starttextproperties \checkmarginblocks \expand 
\beforeeverypage \normalexpanded {\global \beforepage \emptytoks \expand 
\beforepage }\inpagebodytrue \pagebodymode \plusone 
\page_boxes_constructed_page_body #1#2
\normalexpand ...
 ...


\stoptext

1 >>  \version[temporary]
2
3 \starttext
4 \input{tufte}
5 \stoptext
6
A number should have been here; I inserted '0'. (If you can't figure out why I
needed to see a number, look up 'weird error' in the index to The TeXbook.)
mtx-context | fatal error: return code: 1


signature.asc
Description: Message signed with OpenPGP
___
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] mtxrun scripts

2023-07-18 Thread Henning Hraban Ramm

I tried some of the mtxrun scripts:


* "colors" runs into an error:

$ mtxrun --script colors --table ~/texmf/colors/icc/profiles/sgray.icc
lua error : function call: 
...-07/tex/texmf-context/scripts/context/lua/mtx-colors.lua:56: attempt 
to index a nil value (global 'colors')


… or what is meant with "table"?


* Is there a script that lists all files involved in a ConTeXt run? 
Preferably filterable by "part of the distribution" / images / sources?
I’d like to check if all used files are checked in my git repository to 
be sure the project runs elsewhere.



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: problem with symbols in index

2023-07-18 Thread Floris van Manen via ntg-context



On 17/07/2023 23:37, Henning Hraban Ramm wrote:
Also, "context --purge" doesn’t delete the tuc file (don’t know if that 
changed), so the wrong entry stuck in there, and my code changes didn’t 
affect it.


not does it remove the log file
___
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] problem with symbols in index

2023-07-17 Thread Henning Hraban Ramm

I hunted for two days after an index error in my book:

"""
structure   > sectioning > chapter @ level 2 : 0.1 -> Sachregister
tex error   > tex error on line 95 in file ./prd_test.tex: The file 
ended when scanning an argument.


{\startregisterentries {1}\startregisterentry {0}\registerentry 
{index}{}{21}{}{[[special cmd: lua call]]}\startregisterpages 
\registeronepage {index}{}{21}{2}{[[special cmd: lua 
call]]}\stopregisterpages \stopregisterentry \stopregisterentries 
\stopregistersection \stopregisteroutput \relax \stopmixedcolumns \else 
\strc_registers_place_indeed {index}\fi \endgroup \fi \stopchapter \par 
\par \par \par \par \stopproduct

"""

It boiled down to \index{\%} that used to work but doesn’t any more in 
current LMTX.


Also, "context --purge" doesn’t delete the tuc file (don’t know if that 
changed), so the wrong entry stuck in there, and my code changes didn’t 
affect it.


MWE:

\starttext
%\index{\%}
\index[ ]{\backslash}
\index[ ]{\percent}
\index[ ]{\tex{}}
\index[ ]{\tex{}\tex{}}
\index[ ]{\tex{\%}}

\page
\completeindex

\stoptext

For my command index, \index[something]{\tex{something}} works, but is 
there a better way to put \\ in there than \index[ ]{\tex{}\tex{}} ?



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: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context

On 13/07/23 13/07/23, 09:19, Hans Hagen wrote:

On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote:
What’s the current approved way to get image properties within a Lua 
function?


very old:
local pic = figures.getinfo(figures.current().status.fullname)

used to work in 2019:
local pic = img.scan{filename = figures.current().status.fullname}

if I understand this right, "img" isn’t valid anymore:
"""
token call, execute: grph-imagelib.lua:37: attempt to index a nil 
value (global 'img')

"""

I’d like to know the pixel size and if possible also the scaled target 
size of an image; either the "current" one or by name.

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").used)}

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").status)}

etc .. no more faking the img lib

Hans


Hraban, Hans, and mailing list.

This is interesting. I would find it useful to be able to report these 
properties though a tracker - should be fairly easy if not already 
available.


One works with images having a certain resolution, whatever that may be. 
We also might have a target resolution, say 300 dpi or perhaps better 
for printing. As the images are typically resized when used, the 
resulting resolutions might be anything. Optimizing the resolutions of 
the source images can result in optimal PDF sizes, i.e. not too high nor 
too low resolution.


I can even imagine an automated workflow where high-resolution, say 2400 
dpi or even greater bitmap images, are supplied and the included bitmap 
could be "resampled" resulting in the inclusion of a targeted 
resolution. However, the reporting of the included, likely resized image 
resolutions then used to adjust or resample the source files externally 
and manually case-by-case would be sufficient.


Any suggestions on how to hook-in such reporting?

Bonus question: how also to handle the case of
\startMPcode
draw figure "MyFigure" xsized TextWidth ;
...
\stopMPcode

--
Alan
___
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: access image properties in Lua

2023-07-13 Thread Hans Hagen

On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote:
What’s the current approved way to get image properties within a Lua 
function?


very old:
local pic = figures.getinfo(figures.current().status.fullname)

used to work in 2019:
local pic = img.scan{filename = figures.current().status.fullname}

if I understand this right, "img" isn’t valid anymore:
"""
token call, execute: grph-imagelib.lua:37: attempt to index a nil value 
(global 'img')

"""

I’d like to know the pixel size and if possible also the scaled target 
size of an image; either the "current" one or by name.

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").used)}

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").status)}

etc .. no more faking the img lib

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] access image properties in Lua

2023-07-11 Thread Henning Hraban Ramm
What’s the current approved way to get image properties within a Lua 
function?


very old:
local pic = figures.getinfo(figures.current().status.fullname)

used to work in 2019:
local pic = img.scan{filename = figures.current().status.fullname}

if I understand this right, "img" isn’t valid anymore:
"""
token call, execute: grph-imagelib.lua:37: attempt to index a nil value 
(global 'img')

"""

I’d like to know the pixel size and if possible also the scaled target 
size of an image; either the "current" one or by name.



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: {\rm foo {\it bar}}

2023-07-05 Thread Gerben Wierda
And the reason probably is that the font is defined as sans serif [ss]?Sent from my iPhoneOn 5 Jul 2023, at 00:12, Gerben Wierda  wrote:Found it (I think)\definefontfamily defines tf= but the text says \rmIf I use \tf in the text it works.If I use \rm in the text it works for default Latin Modern but not for any font defined. This is true regardless of using rm= or tf= in the definition.So, it seems to be the combination of using definefontfamily and \rmOn 4 Jul 2023, at 23:48, Gerben Wierda <gerben.wie...@rna.nl> wrote:Also doesn't work with ConTeXt  ver: 2023.06.22 14:13 LMTX  fmt: 2023.7.4  int: english/englishOn 4 Jul 2023, at 23:42, Gerben Wierda <gerben.wie...@rna.nl> wrote:On 4 Jul 2023, at 23:26, Wolfgang Schuster <wolfgang.schuster.li...@gmail.com> wrote:Gerben Wierda schrieb am 04.07.2023 um 23:17:After erasing the font cache and regenerating LM was doing it right again.Helvetica did not, but maybe I made a mistake in\definefontfamily  [helvetica]  [ss]  [Helvetica]  [tf=style:Regular,   bf=style:Bold,   it=style:Oblique,   bi=style:Bold Oblique]Does it work when you remove the manual assignments to tf, it, etc. or when you use lowercase names (without spaces), e.g. "bi=boldoblique" (or "bi=bolditalic").No and no. With th elatter it doesn't load Helvetica at all, Error shown:selectfont      > the requested font 'Helvetica' has no files for the 'tf' alternative, Latin Modern is used instead.mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, lmroman10-italic.otf, lmroman10-regular.otf, lmsans10-regular.otfWith my original it does load (but no italic):mkiv lua stats  > loaded fonts: 4 files: helvetica.ttc, latinmodern-math.otf, lmroman10-italic.otf, lmroman10-regular.otfErase cache, regenerate formats, reload fonts (force) does give another (probably unrelated) error:fonts           | names | identifying system font files with suffix 'ttf'fonts           | names | globbing path '/Library/Fonts/**.ttf'fonts           | names | globbing path '/System/Library/Fonts/**.ttf'otf reader      | fatal error in file '/System/Library/Fonts/SFCompactRounded.ttf': ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: attempt to index a nil value (field '?')stack traceback:	...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in metamethod 'index'	...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: in local 'reader'	...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in upvalue 'readtable'Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate___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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net___
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate

___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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net___
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate

___
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: {\rm foo {\it bar}}

2023-07-04 Thread Gerben Wierda
Found it (I think)

\definefontfamily defines tf= but the text says \rm

If I use \tf in the text it works.
If I use \rm in the text it works for default Latin Modern but not for any font 
defined. This is true regardless of using rm= or tf= in the definition.

So, it seems to be the combination of using definefontfamily and \rm

> On 4 Jul 2023, at 23:48, Gerben Wierda  wrote:
> 
> Also doesn't work with ConTeXt  ver: 2023.06.22 14:13 LMTX  fmt: 2023.7.4  
> int: english/english
> 
>> On 4 Jul 2023, at 23:42, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote:
>> 
>> 
>> 
>>> On 4 Jul 2023, at 23:26, Wolfgang Schuster 
>>> >> <mailto:wolfgang.schuster.li...@gmail.com>> wrote:
>>> 
>>> Gerben Wierda schrieb am 04.07.2023 um 23:17:
>>>> After erasing the font cache and regenerating LM was doing it right again.
>>>> 
>>>> Helvetica did not, but maybe I made a mistake in
>>>> 
>>>> \definefontfamily
>>>>   [helvetica]
>>>>   [ss]
>>>>   [Helvetica]
>>>>   [tf=style:Regular,
>>>>bf=style:Bold,
>>>>it=style:Oblique,
>>>>bi=style:Bold Oblique]
>>> 
>>> Does it work when you remove the manual assignments to tf, it, etc. or when 
>>> you use lowercase names (without spaces), e.g. "bi=boldoblique" (or 
>>> "bi=bolditalic").
>> 
>> No and no. With th elatter it doesn't load Helvetica at all, Error shown:
>> selectfont  > the requested font 'Helvetica' has no files for the 'tf' 
>> alternative, Latin Modern is used instead.
>> mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
>> lmroman10-italic.otf, lmroman10-regular.otf, lmsans10-regular.otf
>> 
>> With my original it does load (but no italic):
>> mkiv lua stats  > loaded fonts: 4 files: helvetica.ttc, 
>> latinmodern-math.otf, lmroman10-italic.otf, lmroman10-regular.otf
>> 
>> 
>> Erase cache, regenerate formats, reload fonts (force) does give another 
>> (probably unrelated) error:
>> 
>> fonts   | names | identifying system font files with suffix 'ttf'
>> fonts   | names | globbing path '/Library/Fonts/**.ttf'
>> fonts   | names | globbing path '/System/Library/Fonts/**.ttf'
>> otf reader  | fatal error in file 
>> '/System/Library/Fonts/SFCompactRounded.ttf': 
>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: attempt to 
>> index a nil value (field '?')
>> stack traceback:
>>  ...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in 
>> metamethod 'index'
>>  ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: in 
>> local 'reader'
>>  ...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in 
>> upvalue 'readtable'
>> 
>> 
>> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
>> <https://newsie.social/@gctwnl>)
>> R IT Strategy <https://ea.rna.nl/> (main site)
>> Book: Chess and the Art of Enterprise Architecture 
>> <https://ea.rna.nl/the-book/>
>> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> https://www.ntg.nl/mailman/listinfo/ntg-context 
>> <https://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : https://contextgarden.net <https://contextgarden.net/>
>> ___
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
> <https://newsie.social/@gctwnl>)
> R IT Strategy <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist :

[NTG-context] Re: {\rm foo {\it bar}}

2023-07-04 Thread Gerben Wierda
Also doesn't work with ConTeXt  ver: 2023.06.22 14:13 LMTX  fmt: 2023.7.4  int: 
english/english

> On 4 Jul 2023, at 23:42, Gerben Wierda  wrote:
> 
> 
> 
>> On 4 Jul 2023, at 23:26, Wolfgang Schuster 
>> > <mailto:wolfgang.schuster.li...@gmail.com>> wrote:
>> 
>> Gerben Wierda schrieb am 04.07.2023 um 23:17:
>>> After erasing the font cache and regenerating LM was doing it right again.
>>> 
>>> Helvetica did not, but maybe I made a mistake in
>>> 
>>> \definefontfamily
>>>   [helvetica]
>>>   [ss]
>>>   [Helvetica]
>>>   [tf=style:Regular,
>>>bf=style:Bold,
>>>it=style:Oblique,
>>>bi=style:Bold Oblique]
>> 
>> Does it work when you remove the manual assignments to tf, it, etc. or when 
>> you use lowercase names (without spaces), e.g. "bi=boldoblique" (or 
>> "bi=bolditalic").
> 
> No and no. With th elatter it doesn't load Helvetica at all, Error shown:
> selectfont  > the requested font 'Helvetica' has no files for the 'tf' 
> alternative, Latin Modern is used instead.
> mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
> lmroman10-italic.otf, lmroman10-regular.otf, lmsans10-regular.otf
> 
> With my original it does load (but no italic):
> mkiv lua stats  > loaded fonts: 4 files: helvetica.ttc, latinmodern-math.otf, 
> lmroman10-italic.otf, lmroman10-regular.otf
> 
> 
> Erase cache, regenerate formats, reload fonts (force) does give another 
> (probably unrelated) error:
> 
> fonts   | names | identifying system font files with suffix 'ttf'
> fonts   | names | globbing path '/Library/Fonts/**.ttf'
> fonts   | names | globbing path '/System/Library/Fonts/**.ttf'
> otf reader  | fatal error in file 
> '/System/Library/Fonts/SFCompactRounded.ttf': 
> ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: attempt to 
> index a nil value (field '?')
> stack traceback:
>   ...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in 
> metamethod 'index'
>   ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: in 
> local 'reader'
>   ...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in 
> upvalue 'readtable'
> 
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
> <https://newsie.social/@gctwnl>)
> R IT Strategy <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> <https://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : https://contextgarden.net <https://contextgarden.net/>
> ___

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
<https://newsie.social/@gctwnl>)
R IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

___
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: {\rm foo {\it bar}}

2023-07-04 Thread Gerben Wierda


> On 4 Jul 2023, at 23:26, Wolfgang Schuster 
>  wrote:
> 
> Gerben Wierda schrieb am 04.07.2023 um 23:17:
>> After erasing the font cache and regenerating LM was doing it right again.
>> 
>> Helvetica did not, but maybe I made a mistake in
>> 
>> \definefontfamily
>>   [helvetica]
>>   [ss]
>>   [Helvetica]
>>   [tf=style:Regular,
>>bf=style:Bold,
>>it=style:Oblique,
>>bi=style:Bold Oblique]
> 
> Does it work when you remove the manual assignments to tf, it, etc. or when 
> you use lowercase names (without spaces), e.g. "bi=boldoblique" (or 
> "bi=bolditalic").

No and no. With th elatter it doesn't load Helvetica at all, Error shown:
selectfont  > the requested font 'Helvetica' has no files for the 'tf' 
alternative, Latin Modern is used instead.
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
lmroman10-italic.otf, lmroman10-regular.otf, lmsans10-regular.otf

With my original it does load (but no italic):
mkiv lua stats  > loaded fonts: 4 files: helvetica.ttc, latinmodern-math.otf, 
lmroman10-italic.otf, lmroman10-regular.otf


Erase cache, regenerate formats, reload fonts (force) does give another 
(probably unrelated) error:

fonts   | names | identifying system font files with suffix 'ttf'
fonts   | names | globbing path '/Library/Fonts/**.ttf'
fonts   | names | globbing path '/System/Library/Fonts/**.ttf'
otf reader  | fatal error in file 
'/System/Library/Fonts/SFCompactRounded.ttf': 
...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: attempt to 
index a nil value (field '?')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in 
metamethod 'index'
...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: in 
local 'reader'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in 
upvalue 'readtable'


Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
<https://newsie.social/@gctwnl>)
R IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

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

Re: [NTG-context] expansion of section title

2023-06-27 Thread Henning Hraban Ramm via ntg-context

Am 27.06.23 um 21:01 schrieb Wolfgang Schuster via ntg-context:

Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55:

\defineregister[todos]

% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}

\chapter{Something}
\TODO{This is still empty!}

% at the end of the book
\chapter{work list}
\placetodos 


\define[1]\TODO{\expanded{\todos{\structurevariable{title


Thank you, that works.
I thought I tried that, but probably forgot the braces.


What is the purpose of the argument for \TODO when you don't use it?


I simplified too much, the actual definition is (now):

\define[1]\TODO{\inouter{\tt\color[ColTodo]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[ColTodo]{\bf 
#1}\autoinsertnextspace}


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
___


Re: [NTG-context] expansion of section title

2023-06-27 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55:

\defineregister[todos]

% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}

\chapter{Something}
\TODO{This is still empty!}

% at the end of the book
\chapter{work list}
\placetodos 


\define[1]\TODO{\expanded{\todos{\structurevariable{title

What is the purpose of the argument for \TODO when you don't use it?

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] expansion of section title

2023-06-27 Thread Henning Hraban Ramm via ntg-context
I think I had a good idea how to keep an overview of the “todos” in my 
book project:


\defineregister[todos]

% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}

\chapter{Something}
\TODO{This is still empty!}

% at the end of the book
\chapter{work list}
\placetodos


But the section title is always "work list" in the "todos" index.
I guess I need some expansion and tried \expanded, \safeexpanded, 
\expandoneargafter, \fullexpandoneargafter, but probably not in the 
right place.


How does this work?

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] [ error installing fresh lmtx]

2023-05-29 Thread vm via ntg-context

using linux pop!os 22.04

https://www.pragma-ade.nl/install.htm

download
http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip

mkdir context
cd context
unzip context-linux-64.zip
sh install.sh


...
<+ 
/home/vm/context/tex/texmf-context/tex/context/base/mkiv/luat-sto.lua><+ 
/home/vm/context/tex/texmf-context/tex/context/base/mkiv/luat-ini.lua><+ 
/home/vm/context/tex/texmf-context/tex/context/base/mkiv/util-env.lua><+ 
/home/vm/context/tex/texmf-context/tex/context/base/mkiv/luat-env.lua>
resolvers   > lua > loading file 
'/home/vm/context/tex/texmf-context/tex/context/base/mkiv/luat-exe.lua' 
succeeded
resolvers   > lua > loading file 
'/home/vm/context/tex/texmf-context/tex/context/base/mkiv/luat-iop.lua' 
succeeded
resolvers   > lua > loading file 
'/home/vm/context/tex/texmf-context/tex/context/base/mkiv/trac-lmx.lua' 
succeeded
resolvers   > lua > loading file 
'/home/vm/context/tex/texmf-context/tex/context/base/mkiv/luat-mac.lua' 
succeeded
resolvers   > lua > loading file 
'/home/vm/context/tex/texmf-context/tex/context/base/mkiv/util-lib.lua' 
succeeded
resolvers   > lua > loading file 
'/home/vm/context/tex/texmf-context/tex/context/base/mkiv/lxml-tab.lua' 
succeeded
...ext/tex/texmf-context/tex/context/base/mkiv/lxml-lpt.lua:64: attempt 
to index a nil value (local 'xml')

stack traceback:
	...ext/tex/texmf-context/tex/context/base/mkiv/lxml-lpt.lua:64: in 
local 'code'
	...ext/tex/texmf-context/tex/context/base/mkiv/util-lua.lua:96: in 
field 'loadedluacode'
	...ext/tex/texmf-context/tex/context/base/mkiv/luat-env.lua:108: in 
field 'luafilechunk'
	...ext/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:73: in 
function 'lua.registercode'

[\directlua]:1: in main chunk.
\registerctxluafile #1#2->\ctxlua {lua.registercode("#1","#2")}

l.94 \registerctxluafile{lxml-lpt}{}

?




(any hints?)
Thanks
.Floris
___
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] dirty tricks

2023-05-28 Thread Hans Hagen via ntg-context

Hi,

Here is a new dirty trick:

\starttext

% we make sure that we get two passes.

\setupalign[verytolerant]

% we enable some tracing

\tracinglousiness1
  % \tracinglousiness2

this gives the breakpoints that tex considers as it progresses

\hsize8cm \lousiness 0 \samplefile{ward}

% let's see what their demerits are

{\tt \the\lousiness}

% and overload one of them (index 11)

\hsize8cm \silliness 11 \samplefile{ward}

% do how about overloading more (index 11 and 8)

\hsize8cm \lousiness 2 11 0 8 200 \samplefile{ward}

\stoptext

As the names suggest, it's a bit weird feature but so is \looseness. It 
might evolve from playground into some interfaced feature. Of course 
changing the text gives different results. But then, \looseness also 
assumes a stable paragraph.


Hans

(a byproduct of more advanced experiments)

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


Re: [NTG-context] Noto Emoji COLRv1

2023-05-24 Thread Hans Hagen via ntg-context

On 5/23/2023 11:31 PM, Max Chernoff via ntg-context wrote:

Hi Hans,

I tried using the code from [1] for Noto Emoji in COLRv1 format [2]:

\startTEXpage
\definefontfeature[colored][default][colr=9]
\definedfont[Noto-COLRv1.ttf*colored] 閭 % U+1F986
\stopTEXpage

but ConTeXt gives the following error:

fonts   > otf loading > loading 'Noto-COLRv1.ttf', hash 
'noto-colrv1'
otf reader  > table version 1 of 'colr' is partially supported for font 
Noto-COLRv1.ttf
otf reader  > unsupported colr type 2 paint format 0
otf reader  > unsupported colr type 2 paint format %i
otf reader  > fatal error in file 'Noto-COLRv1.ttf': 
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: table index is 
nil
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in 
metamethod 'newindex'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: in 
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in 
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3150: in 
upvalue 'getpaintoffset'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3564: in 
field '?'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in 
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3685: in 
local 'reader'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in 
upvalue 'readtable'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2204: in 
upvalue 'readdata'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2257: in function 
<...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2240>
[C]: in function 'xpcall'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2346: in 
upvalue 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2401: in 
field 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:160: in 
field 'load'
...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:624: in 
upvalue 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:652: in function 
<...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:651>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:362: in function 
<...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:350>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:465: in 
field 'read'
...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1371: in function 
<...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1228>
(...tail calls...)
fonts   > otf loading > loading failed due to read error
fonts   > defining > forced type 'ttf' of 'Noto-COLRv1' not found
fonts   > defining > unable to define 'Noto-COLRv1.ttf' as 
'thedefinedfont--0'
system  > print height forced to paper height
system  > print width forced to paper width
fonts   > checking > char 閭 (U+1F986) in font 'LMRoman10-Regular' 
with id 1: missing

 From what I can tell, the Lua code is trying to read past the end of
font file. I tried debugging the error further, but this is well beyond
my understanding.

(Also, paintreaders[6--11] in font-dsp.lmt are missing "offset" in the
function signature, and paintreaders itself is glboal. Maybe related?)

I'm using the current latest (2023.05.08 17:39).
i'll check it but as usuel with these new things in fonts, one depends 
on fonts for testing so all that goes stepwise (as - hopefully correct - 
fonts come available)


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] Noto Emoji COLRv1

2023-05-23 Thread Max Chernoff via ntg-context
Hi Hans,

I tried using the code from [1] for Noto Emoji in COLRv1 format [2]:

   \startTEXpage
   \definefontfeature[colored][default][colr=9]
   \definedfont[Noto-COLRv1.ttf*colored] 閭 % U+1F986
   \stopTEXpage

but ConTeXt gives the following error:

   fonts   > otf loading > loading 'Noto-COLRv1.ttf', hash 'noto-colrv1'
   otf reader  > table version 1 of 'colr' is partially supported for font 
Noto-COLRv1.ttf
   otf reader  > unsupported colr type 2 paint format 0
   otf reader  > unsupported colr type 2 paint format %i
   otf reader  > fatal error in file 'Noto-COLRv1.ttf': 
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: table index 
is nil
   stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in 
metamethod 'newindex'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: in 
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in 
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3150: in 
upvalue 'getpaintoffset'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3564: in 
field '?'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in 
metamethod 'index'
...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3685: in 
local 'reader'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in 
upvalue 'readtable'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2204: in 
upvalue 'readdata'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2257: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2240>
[C]: in function 'xpcall'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2346: in 
upvalue 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2401: in 
field 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:160: in 
field 'load'
...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:624: in 
upvalue 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:652: in 
function <...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:651>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:362: in 
function <...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:350>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:465: in 
field 'read'
...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1371: in 
function <...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1228>
(...tail calls...)
   fonts   > otf loading > loading failed due to read error
   fonts   > defining > forced type 'ttf' of 'Noto-COLRv1' not found
   fonts   > defining > unable to define 'Noto-COLRv1.ttf' as 
'thedefinedfont--0'
   system  > print height forced to paper height
   system  > print width forced to paper width
   fonts   > checking > char 閭 (U+1F986) in font 'LMRoman10-Regular' 
with id 1: missing

From what I can tell, the Lua code is trying to read past the end of
font file. I tried debugging the error further, but this is well beyond
my understanding.

(Also, paintreaders[6--11] in font-dsp.lmt are missing "offset" in the
function signature, and paintreaders itself is glboal. Maybe related?)

I'm using the current latest (2023.05.08 17:39).

Thanks,
-- Max

[1]: https://mailman.ntg.nl/pipermail/ntg-context/2022/107279.html
[2]: https://github.com/googlefonts/noto-emoji/raw/main/fonts/Noto-COLRv1.ttf
___
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] position in xmlfilter

2023-05-22 Thread Hans van der Meer via ntg-context
I do not understand the behaviour of certain function is xml processing.
My problem is finding the position of the current node, for example with 
 I would like to see the first  resulting in 1 and the second in 2.
The result of some experiments:

return=[\xmlfilter{#1}{../tag()}]   returns the parent tag, in this 
case [setup] as expected
return=[\xmlfilter{#1}{./tag()}]returns the tag, in this case 
[example] as expected
return=[\xmlfilter{#1}{../position()}]  returns [] i.e. returns nothing 
expecting a number
return=[\xmlfilter{#1}{./position()}]   returns [] i.e. returns nothing 
expecting a number
return=[\xmlfilter{#1}{../index()}] returns [0] expecting a number larger 
than 0
return=[\xmlfilter{#1}{./index()}]  returns [0] expecting a number larger 
than 0

dr. Hans van der Meer
___
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
___


Re: [NTG-context] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-15 Thread Alan Braslau via ntg-context
On Mon, 15 May 2023 01:37:53 + (UTC)
Joel via ntg-context  wrote:

> Such a way would make it so \index{dogs} places an entry for "dog"
> under "d" and "animals --> dogs" under "a".

Might I suggest that an alternate way of handling this could be:

\seeindex{dogs}{animals+dogs}

with

\index{animals+dogs}


It's the author's choice, but this avoids redundant page entries and a very 
long \placeindex.

(Note that we recently extended \seeindex to handle the {...+...}
syntax for both arguments.)

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


Re: [NTG-context] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-15 Thread Alan Braslau via ntg-context
On Mon, 15 May 2023 09:40:22 +0200
Hans Hagen via ntg-context  wrote:

> \starttexdefinition tolerant protected IndexB[#1]#:#*#2
>  \index{#2}
>  \doloopoverlist {#1} {
>  \index{##1+#2}
>  }
> \stoptexdefinition

Awesome!

However, I think that Joel was looking for a solution closer to what
Hraban suggested, creating automatic subcategories. I would do that
through a additional macros:

\starttexdefinition protected Animals#1
    \index{#1}
\index{animals+#1}
#1
)
\starttexdefinition protected Plants#1
    \index{#1}
\index{plants+#1}
#1
)
\Animals{dogs}
\Plants{trees}





I use as a general indexing macro:

\starttexdefinition tolerant protected Index[#1]#:#*#2
 \index[#1]{#2}
 #2
\stoptexdefinition

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


Re: [NTG-context] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-15 Thread Hans Hagen via ntg-context

On 5/15/2023 3:37 AM, Joel via ntg-context wrote:


I have a document like this:

     \starttext
     \index{dogs}

     \index{cats}

     \index{flowers}

     \index{snails}

     \index{trees}

     \placeindex

     \stoptext

As I understand, if you use \index{animals+dogs}, it will place dogs as 
a sub-category of dogs.


Is there any way to control this centrally, for instance:

\addtosub[animals]{dogs, cats, snails}
\addtosub[plants]{flowers, trees}

Such a way would make it so \index{dogs} places an entry for "dog" under 
"d" and "animals --> dogs" under "a".

\starttexdefinition protected IndexA#1#2
\index{#2}
\doloopoverlist {#1} {
\index{##1+#2}
}
\stoptexdefinition

\starttexdefinition tolerant protected IndexB[#1]#:#*#2
\index{#2}
\doloopoverlist {#1} {
\index{##1+#2}
}
\stoptexdefinition

\starttext
a\IndexA{animals}{dogs}
a\IndexA{animals}{cats}
a\IndexA{plants}{flowers}
a\IndexA{animals,small}{snails}
a\IndexA{plants,huge}{trees}
\page
b\IndexB[animals]  {dogs}
b\IndexB[animals]  {cats}
b\IndexB[plants]   {flowers}
b\IndexB[animals,small]{snails}
b\IndexB[plants,huge]  {trees}
\page
c\IndexB{dogs}
c\IndexB{cats}
c\IndexB{flowers}
c\IndexB{snails}
c\IndexB{trees}
\page
\placeindex
\stoptext



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


Re: [NTG-context] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-15 Thread Henning Hraban Ramm via ntg-context

Am 15.05.23 um 03:37 schrieb Joel via ntg-context:


I have a document like this:

     \starttext
     \index{dogs}

     \index{cats}

     \index{flowers}

     \index{snails}

     \index{trees}

     \placeindex

     \stoptext

As I understand, if you use \index{animals+dogs}, it will place dogs as 
a sub-category of dogs.


Is there any way to control this centrally, for instance:

\addtosub[animals]{dogs, cats, snails}
\addtosub[plants]{flowers, trees}

Such a way would make it so \index{dogs} places an entry for "dog" under 
"d" and "animals --> dogs" under "a".


I’d suggest to cook your own macro, e.g. for a book with a lot of person 
index entries, I used a lookup table to unify different spellings or 
name changes (married, titles etc.) like this:


"""% environment:
\loadluafile[lookups] % Index lookups

\defineregister[Person][]
\defineprocessor[italics][style=italicface]
\define[1]\Passim{\emph{passim}}
\defineprocessor[passim][command=\Passim]

\define[1]\nPerson{%
  \expanded{\Person{\ctxlua{userdata.Lookup("#1")}}}%
}

\define[1]\TPerson{%
  \expanded{\Person[kursiv->]{\ctxlua{userdata.Lookup("#1")}}}%
}#1}
\define[1]\nCPerson{\expanded{\Person[italics->]{\ctxlua{userdata.Lookup("#1")%
\define[1]\TCPerson{\expanded{\Person[italics->]{\ctxlua{userdata.Lookup("#1")}}}#1}%
"""

"""lookups.lua:
userdata = userdata or { }

userdata.Lookups = {
…
  ["Pauline, geb. Fichtner Erdmannsdörfer"] = "Erdmannsdörfer, Pauline, 
geb. Fichtner",

  ["Pauline Erdmannsdörfer"] = "Erdmannsdörfer, Pauline, geb. Fichtner",
  ["Pauline Erdmannsdörfer-Fichtner"] = "Erdmannsdörfer, Pauline, geb. 
Fichtner",

…
}

function userdata.Lookup(name)
   context(userdata.Lookups[name] or name)
end
"""

In a similar way you could setup an \Animal macro to use a lookup table 
how the entry should get indexed.


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] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-14 Thread Joel via ntg-context

I have a document like this:

    \starttext
    \index{dogs}
    
    \index{cats}
    
    \index{flowers}
    
    \index{snails}
    
    \index{trees}
    
    \placeindex
    
    \stoptext
    
As I understand, if you use \index{animals+dogs}, it will place dogs as a 
sub-category of dogs.

Is there any way to control this centrally, for instance:

\addtosub[animals]{dogs, cats, snails}
\addtosub[plants]{flowers, trees}

Such a way would make it so \index{dogs} places an entry for "dog" under "d" 
and "animals --> dogs" under "a".
--Joel
___
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
___


Re: [NTG-context] How to print all pages for a single index entry?

2023-05-07 Thread Alan Braslau via ntg-context
On Sun, 7 May 2023 22:26:12 + (UTC)
Joel via ntg-context  wrote:

> I have an index like this:
> 
> \starttext
> \index{butterflies}\index{horses}\index{cows}
> \placeindex
> 
> \stoptext
> The placeindex will place every index.
> Is there a way to say, display an index, but only for a specific
> single entry, or specific list of entries, e.g. \placeindex[horses,
> cows] (would exclude butterflies from the index entries) --Joel

You can use multiple lists, like indexofmammals and indexofarthropods,
and then place one or combine them, as needed.

Alan
___
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] How to print all pages for a single index entry?

2023-05-07 Thread Joel via ntg-context
I have an index like this:

\starttext
\index{butterflies}\index{horses}\index{cows}
\placeindex

\stoptext
The placeindex will place every index.
Is there a way to say, display an index, but only for a specific single entry, 
or specific list of entries, e.g.
\placeindex[horses, cows] (would exclude butterflies from the index entries)
--Joel
___
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] How to fix indexes displaying [entry not flushed] with hidden data?

2023-05-07 Thread Joel via ntg-context
I have a document that needs to place some "hidden" data. In other words, there 
is an entire \input file with an article, but it doesn't get rendered visibly. 
However, the indexes, registers, and bibliography need to still function as if 
it were displayed right there on the page.
It should be as if the data actually is all there, on a single page, but either 
compressed inside a single invisible pixel off or plain invisible to readers, 
not using any physical space on the page.

I tried two methods suggested at Stack Exchange for hiding the data:
1. \startnointerference
2. \setbox\scratchbox=\vbox{}
These both successfully seem to place the data there, without it actually being 
visible and bibliograhy entries still function fine.

The problem is, index and customer registers are getting confused:
When one goes to render the page numbers in \placeindex, it gets confused, 
displaying the message: "[entry not flushed]" instead of the page number. When 
I render this minimum working example below, the index is populated with [entry 
not flushed] instead of page numbers. Note that if I delete the test "This is 
invisible text."and recompile, I can get a successful render. The problem is, I 
have text that needs to remain invisible.

\starttext

    \index{birds}
    \index{insects}


        \startnointerference
            \index{spiders}
            \index{bears}
            \index{rabbits}
            This is invisible text.
        \stopnointerference
    
    \input knuth
    
    \placeindex
        
\stoptext


How to fix indexes displaying [entry not flushed] with hidden data?
--Joel

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


Re: [NTG-context] cannot generate format file with current latest

2023-05-01 Thread Pablo Rodriguez via ntg-context
On 4/30/23 20:17, Hans Hagen via ntg-context wrote:
> On 4/30/2023 3:19 PM, Pablo Rodriguez via ntg-context wrote:
>> […]
>> When I try to create the format file with "context --make --all", I get
>> the following error message:
>> […]
>> token call, execute: ...ext/base/mkxl/cldf-pos.lmt:18: attempt to index
>> a nil value (global 'posit') stack traceback:
> 
> you're running the wrong binary

Many thanks for your reply, Hans.

I’m afraid I had to update the binaries manually.

After that, everything was fine.

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
___


Re: [NTG-context] cannot generate format file with current latest

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

On 4/30/2023 3:19 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have just updated to current latest (2023.04.27 17:04).

I always delete cache with "mtxrun --generate" after an update.

When I try to create the format file with "context --make --all", I get
the following error message:

lua error   > lua error on line 645 in file context.mkxl:

token call, execute: ...ext/base/mkxl/cldf-pos.lmt:18: attempt to index
a nil value (global 'posit') stack traceback:

you're running the wrong binary

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

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

maillist : ntg-context@ntg.nl / 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
___


Re: [NTG-context] cannot generate format file with current latest

2023-04-30 Thread Bruce Horrocks via ntg-context

> On 30 Apr 2023, at 14:19, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Dear list,
> 
> I have just updated to current latest (2023.04.27 17:04).
> 
> I always delete cache with "mtxrun --generate" after an update.
> 
> When I try to create the format file with "context --make --all", I get
> the following error message:
> 
> lua error   > lua error on line 645 in file context.mkxl:
> 
> token call, execute: ...ext/base/mkxl/cldf-pos.lmt:18: attempt to index
> a nil value (global 'posit') stack traceback:
> ...ext/base/mkxl/cldf-pos.lmt:18: in local 'code'
> ...ext/base/mkiv/util-lua.lua:96: in field 'loadedluacode'
> ...ext/base/mkiv/luat-env.lua:108: in field 'luafilechunk'
> ...ext/base/mkxl/luat-cod.lmt:82: in function 'lua.registercode'
> [ctxlua]:1: in main chunk
> 
> A number should have been here; I inserted '0'. (If you can't figure out
> why I needed to see a number, look up 'weird error' in the index to The
> TeXbook.)
> 
> Could anyone confirm the issue?

No. Working fine for me on a Mac using that version, both before and after 
running "make all" and "generate".

—
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://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] cannot generate format file with current latest

2023-04-30 Thread Pablo Rodriguez via ntg-context
Dear list,

I have just updated to current latest (2023.04.27 17:04).

I always delete cache with "mtxrun --generate" after an update.

When I try to create the format file with "context --make --all", I get
the following error message:

lua error   > lua error on line 645 in file context.mkxl:

token call, execute: ...ext/base/mkxl/cldf-pos.lmt:18: attempt to index
a nil value (global 'posit') stack traceback:
...ext/base/mkxl/cldf-pos.lmt:18: in local 'code'
...ext/base/mkiv/util-lua.lua:96: in field 'loadedluacode'
...ext/base/mkiv/luat-env.lua:108: in field 'luafilechunk'
...ext/base/mkxl/luat-cod.lmt:82: in function 'lua.registercode'
[ctxlua]:1: in main chunk

A number should have been here; I inserted '0'. (If you can't figure out
why I needed to see a number, look up 'weird error' in the index to The
TeXbook.)

Could anyone confirm the issue?

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
___


Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Aditya Mahajan via ntg-context
list[nto]arc.last + 1;
vlist[nto]arc[vlist[nto]arc.last] := nfrom;
vlist[nto]arc[vlist[nto]arc.last]tns := 1;
  fi
  vlist[nfrom]arc[vlist[nfrom]arc.last]lbl := "";
  vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.side := "";
  vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.dist := 3thick;
  for nopt = opt.first upto opt.last:
if match_option (opt[nopt], "tension"):
  get_argument (opt[nopt], scantokens (opt[nopt]arg),
vlist[nfrom]arc[vlist[nfrom]arc.last]tns);
  get_argument (opt[nopt], scantokens (opt[nopt]arg),
vlist[nto]arc[vlist[nto]arc.last]tns);
elseif match_option (opt[nopt], "left"):
  if known opt[nopt]arg:
vlist[nfrom]arc[vlist[nfrom]arc.last]lsr
  := - scantokens (opt[nopt]arg);
  else:
vlist[nfrom]arc[vlist[nfrom]arc.last]lsr := -1;
  fi
elseif match_option (opt[nopt], "straight"):
  vlist[nfrom]arc[vlist[nfrom]arc.last]lsr := 0;
  ignore_argument (opt[nopt], opt[nopt]arg);
elseif match_option (opt[nopt], "right"):
  if known opt[nopt]arg:
vlist[nfrom]arc[vlist[nfrom]arc.last]lsr
  := scantokens (opt[nopt]arg);
  else:
vlist[nfrom]arc[vlist[nfrom]arc.last]lsr := 1;
  fi
elseif match_option (opt[nopt], "label"):
  get_argument (opt[nopt], opt[nopt]arg,
vlist[nfrom]arc[vlist[nfrom]arc.last]lbl);
elseif match_option (opt[nopt], "label.side"):
  get_argument (opt[nopt], opt[nopt]arg,
vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.side);
elseif match_option (opt[nopt], "label.dist"):
  get_argument (opt[nopt], scantokens (opt[nopt]arg),
vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.dist);
elseif match_option (opt[nopt], "tag"):
  if known opt[nopt]arg:
vlist[nfrom]arc[vlist[nfrom]arc.last]tag
  := scantokens (opt[nopt]arg);
  else:
vlist[nfrom]arc[vlist[nfrom]arc.last]tag := 0;
  fi
elseif match_option (opt[nopt], "width"):
  get_argument (opt[nopt], scantokens (opt[nopt]arg),
vlist[nfrom]arc[vlist[nfrom]arc.last]wd);
elseif match_option (opt[nopt], "foreground"):
  get_argument (opt[nopt], scantokens (opt[nopt]arg),
vlist[nfrom]arc[vlist[nfrom]arc.last]fore);
elseif match_option (opt[nopt], "background"):
  get_argument (opt[nopt], scantokens (opt[nopt]arg),
vlist[nfrom]arc[vlist[nfrom]arc.last]back);
elseif match_option (opt[nopt], "rubout"):
  if known opt[nopt]arg:
 vlist[nfrom]arc[vlist[nfrom]arc.last]rub
   := scantokens (opt[nopt]arg);
  else:
 vlist[nfrom]arc[vlist[nfrom]arc.last]rub := 2;
  fi
else:
  ignore_option (opt[nopt], opt[nopt]arg);
fi
  endfor
  handle_line_style (vlist[nfrom]arc[vlist[nfrom]arc.last]sty, sty);
  vlist[nto]arc[vlist[nto]arc.last]lsr
:= vlist[nfrom]arc[vlist[nfrom]arc.last]lsr;
fi
nfrom := nto;
  endfor
enddef;
vardef handle_line_style (suffix sty) (expr name) =
  if valid_style name:
sty := name;
  else:
errhelp "feynmf: your linestyle is not recognizable, "
  & "check spelling and reprocess!";
errmessage "feynmf: line style `" & name & "' not known, "
 & "replaced by `vanilla'";
sty := "vanilla";
  fi
enddef;
vardef get_argument (expr opt, arg) (suffix variable) =
  if known arg:
variable := arg;
  else:
message "feynmf: option `" & opt & "' needs an argument.  Ignored.";
  fi
enddef;
vardef ignore_argument (expr opt, arg) =
  if known arg:
message "feynmf: option `" & opt & "' doesn't take an argument.  "
      & "Argument `" & arg & "' ignored.";
  fi
enddef;
vardef ignore_option (expr opt, arg)=
  if known arg:
message "feynmf: ignoring option " & opt & "=" & arg & ".";
  else:
message "feynmf: ignoring option " & opt & ".";
  fi
enddef;
vardef vconnectn (expr linesty) (suffix v) (expr n) =
  vconnect (linesty, vmklist (v, n));
enddef;
vardef vpath@# (suffix from, to) =
  save nfrom, nto, origin, index, unknown_path;
  numeric nfrom, nto, origin, index;
  path unknown_path;
  if (known vloc from) and (known vloc to):
nfrom := vlookup from;
nto := vlookup to;
vmatch_path (nfrom, nto, maybe_empty@#);
if (unknown origin) or (unknown index):
  vmatch_path (nto, nfrom,

Re: [NTG-context] attempt to index nil value with bidi math in hbox

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

On 4/3/2023 7:50 AM, Max Chernoff via ntg-context wrote:

Hi Hans,

This test file:

\setupdirections[bidi=global,method=one]
\starttext
\hbox{$\varepsilon$-TeX}
\stoptext

gives the following error:

callback error: 
...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:618: attempt to 
index a nil value (local 'before')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:618: in 
upvalue 'resolve_weak'
...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:781: in 
upvalue 'resolve_levels'
...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:1053: 
in local 'handler'
...ext/tex/texmf-context/tex/context/base/mkxl/typo-dir.lmt:182: in 
upvalue 'typesetters_directions_handler'
[string "local tonut  = nodes.tonut..."]:20: in function <[string "local 
tonut  = nodes.tonut..."]:13>
(...tail calls...)

Running either this:

i'll check it (at least get rid of the error)

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] attempt to index nil value with bidi math in hbox

2023-04-02 Thread Max Chernoff via ntg-context
Hi Hans,

This test file:

   \setupdirections[bidi=global,method=one]
   \starttext
   \hbox{$\varepsilon$-TeX}
   \stoptext

gives the following error:

   callback error: 
...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:618: attempt to 
index a nil value (local 'before')
   stack traceback:
   ...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:618: in 
upvalue 'resolve_weak'
   ...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:781: in 
upvalue 'resolve_levels'
   ...ext/tex/texmf-context/tex/context/base/mkxl/typo-duc.lmt:1053: in 
local 'handler'
   ...ext/tex/texmf-context/tex/context/base/mkxl/typo-dir.lmt:182: in 
upvalue 'typesetters_directions_handler'
   [string "local tonut  = nodes.tonut..."]:20: in function <[string 
"local tonut  = nodes.tonut..."]:13>
   (...tail calls...)
   
Running either this:

   \starttext
   \hbox{$\varepsilon$-TeX}
   \stoptext

or this:

   \setupdirections[bidi=global,method=one]
   \starttext
   \hbox{$\varepsilon$TeX}
   \stoptext
   
works as expected, without any errors.

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] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Hi,

I'm trying to use a description environment in conjunction with an
itemize with the latest luametatex. Is this supposed to work?

Here is an MWE:
```
\definedescription[desc][headstyle=bold]

\starttext
Foo

\desc{Some title} Some text
\startitemize
\item Some item
\stopitemize

\stoptext
```

This currently fails with:
```
resolvers   | formats | executing runner 'run luametatex format': 
/home/gerion/context/tex/texmf-linux-64/bin/luametatex --jobname="./test.tex" 
--fmt=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/gerion/context/tex/texmf-linux-64/bin"
system  >
system  > ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.3.4  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/home/gerion/context/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 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './test', input './test.tex', result './test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern rm 12pt' is loaded
lua error   > lua error on line 8 in file ./test.tex:

registered function call [809]: 
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: attempt to 
index a nil value (local 'd')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:442>
(...tail calls...)
 1 \definedescription[desc][headstyle=bold]
 2
 3 \starttext
 4 Foo
 5
 6 \desc{Some title} Some text
 7  \startitemize
 8 >>   \item Some item
 9  \stopitemize
10
11 \stoptext
12
mtx-context | fatal error: return code: 1
```

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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
___


Re: [NTG-context] How to add data from another PDF in index?

2023-02-26 Thread Joel via ntg-context
 Fantastic! Exactly what I needed. My publisher was gong to ask for the 
information of this index soon, so its great that already works!
--Joel

On Sunday, February 26, 2023 at 11:45:48 AM MST, Alan Braslau 
 wrote:  
 
 Hans needs to confirm, "In the next update..."

Test files (MWEs):

% index-1.tex

\setupinteraction[state=start]

\starttext
    test \index{entry    WB.1} \page empty \page
    test \index{another  WB.1} \page empty \page
    test \index{onemore  WB.1} \page empty \page
    test \index{whatever WB.1} \page empty \page
    test \index{common}        \page empty \page
    \placeregister[index]
\stoptext


% index-2.tex

\setupinteraction[state=start]

\defineregister[xedni]

\useregister[workbook][index-1][index][WB ]

\starttext
    test \index{onemore TB.1} \page
    test \index{another TB.1} \page
    test \index{entry  TB.1} \page
    test \index{common}      \page
    test \xedni{onemore TB.2} \page
    test \xedni{another TB.2} \page
    test \xedni{entry  TB.2} \page
    test \xedni{common}      \page
    \placeregister[index,xedni,workbook]
\stoptext



This seems to work well - I have applied it to a long and complicated
multi-volume book project to great success!

We need to thank Hans for the quick implementation.

Alan



On Fri, 24 Feb 2023 05:43:01 + (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
>     \txt{} \getvalue{#1}
>     \learnedshort{#1}
>     \learnedlong{#1}
> }
> \define[1]\learned{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
  ___
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
___


Re: [NTG-context] How to add data from another PDF in index?

2023-02-26 Thread Alan Braslau via ntg-context
Hans needs to confirm, "In the next update..."

Test files (MWEs):

% index-1.tex

\setupinteraction[state=start]

\starttext
test \index{entryWB.1} \page empty \page
test \index{another  WB.1} \page empty \page
test \index{onemore  WB.1} \page empty \page
test \index{whatever WB.1} \page empty \page
test \index{common}\page empty \page
\placeregister[index]
\stoptext


% index-2.tex

\setupinteraction[state=start]

\defineregister[xedni]

\useregister[workbook][index-1][index][WB ]

\starttext
test \index{onemore TB.1} \page
test \index{another TB.1} \page
test \index{entry   TB.1} \page
test \index{common}   \page
test \xedni{onemore TB.2} \page
test \xedni{another TB.2} \page
test \xedni{entry   TB.2} \page
test \xedni{common}   \page
\placeregister[index,xedni,workbook]
\stoptext



This seems to work well - I have applied it to a long and complicated
multi-volume book project to great success!

We need to thank Hans for the quick implementation.

Alan



On Fri, 24 Feb 2023 05:43:01 + (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
>     \txt{} \getvalue{#1}
>     \learnedshort{#1}
>     \learnedlong{#1}
> }
> \define[1]\learned{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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
___


Re: [NTG-context] How to add data from another PDF in index?

2023-02-24 Thread Alan Braslau via ntg-context
We are currently working on fixing cross-references as well as shared
register information between products in a ConTeXt project structure.
Much is possible, but not all is fully worked out.

My current use is a multi-volume book, sharing Tables of Contents
between the two volumes. As a teaser,

\placelist [part,chapter,section,subsection]
   [criterium=product,reference=VolumeII]

will include the TOC of VolumeII in product VolumeI.

Once we have this figured-out, I will have to create a wiki page.

Alan


On Fri, 24 Feb 2023 05:43:01 + (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
>     \txt{} \getvalue{#1}
>     \learnedshort{#1}
>     \learnedlong{#1}
> }
> \define[1]\learned{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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
___


  1   2   3   4   5   6   7   8   9   10   >