[NTG-context] Re: more register questions!

2024-05-07 Thread Rik Kabel

Hello Wolfgang and all,

I have been trying to extend this to handle endnotes. So far, I have not 
succeeded; the number is always that of the last endnote.


I could possibly increment a counter for each endnote processed, but 
that seems a hack.


--
Rik

On 2024-05-03 06:18, Wolfgang Schuster wrote:

Thomas A. Schmitz schrieb am 02.05.2024 um 17:01:

Hi,

making wonderful progress on my registers and translating from xml. 
There is one thing I can't figure out (and I or some other good soul 
may have asked in the past...). Is it possible to mark occurrences in 
footnotes? Ideally, the entry in the register would look like


p. 100\high{20}

to show that the term occurs in note 20 on p. 100. But if that's 
asking too much, I would be content with applying a processor (say, 
italic) to these register entries. From the looks of the tuc file, 
Context doesn't appear to "know" that a register entry is within a 
footnote. But Hans never ceases to amaze me, so maybe there is a way 
(short of applying special markup to these notes in the source)?


You can play with the following example, the main point use to use the 
\setregisterentry command and pass the footnote counter with the third 
(optional) argument.


\def\IndexPageCommand#1%
  {#1\doifsomething
 {\currentregisterpageuserdata{footnote}}
 {\high{\currentregisterpageuserdata{footnote

\setupregister[index][pagecommand=\IndexPageCommand]

\starttext

\dorecurse{200}
{\samplefile{lorem}\expanded{\setregisterentry[index][entries=\recurselevel]}% 

\samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}% 


   \samplefile{lorem}}

\page \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
___ 
___
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] Log entries about confusing level change

2024-03-07 Thread Rik Kabel

Hello all,

The following example produces two log entries that seem a bit odd. The 
log entries are:


   backend > bookmarks > confusing level change at level 3
   around '1 body1'
   backend > bookmarks > confusing level change at level 3
   around 'back1'

and they refer to the first chapter of the bodymatter and the first 
chapter of the backmatter, respectively.


The example:

   \setupinteraction [state=start]
   \placebookmarks   [chapter]
   \starttext
  \startfrontmatter
    \startchapter [title=front1]
  \samplefile {knuth-gpt}
    \stopchapter
  \stopfrontmatter
  \startbodymatter
    \startchapter [title=body1]
  \samplefile {knuth-gpt}
    \stopchapter
  \stopbodymatter
  \startbackmatter
    \startchapter [title=back1]
  \samplefile {knuth-gpt}
    \stopchapter
  \stopbackmatter
   \stoptext

Does the level change message suggest that something is missing in the 
document?


--
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] Font version parse question

2024-03-07 Thread Rik Kabel

Hello all,

The font tweak file libertinus_math.lfg tests for a font version of 
*7.040*, but the result of the version parse is *7.040;RELEASE*, 
resulting in an error message. I do not know if this is the fault of the 
parser or of the font metadata. Changing the test in the .lfg file fixes 
the error, but that is not a long-term solution.


The exact message I get in the log is:

   mathematics > tweak > 'LibertinusMath-Regular', size 10, math
   size 0, version 'Version, 7.040;RELEASE' found, version 'Version
   7.040' expected

This is not a high-priority issue for me -- I have nothing in this 
document that would benefit -- but others may appreciate a fix.


--
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] 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: bibliography questions

2023-10-05 Thread Rik Kabel
Sorry, pandoc, not procmail.On Oct 5, 2023 09:05, Rik Kabel  wrote:On Oct 3, 2023 16:32, Henning Hraban Ramm  wrote:Am 03.10.23 um 02:02 schrieb Alan Braslau:

> On Mon, 2 Oct 2023 13:13:52 +0200

> Henning Hraban Ramm  wrote:

> 

>> Consider:

>> @Book {rattenhka,

>> author = "Bettina von Arnim and Gisela von Arnim",

>> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns",

>> …

>> }

>>

>> The authors are usually given as “Bettina and Gisela von Arnim”

>> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers

>> or “Bettina and Achim von Arnim” as a couple) – is there a good

>> solution for related authors?

> 

> Multiple authors should be treated as multiple authors. That they are

> related is not and should not be a consideration in citing works. At

> least this is the practice that I know of for academic texts.

> 

> You can cheat and try to define one author with a combined first name,

> like

> author={Eames, Ray & Earl},

> but I don't know how that parses as I have never tried it; "and" is a

> reserved token used to define multiple authors. I wouldn't do it as I

> can think of many examples (Bjaer & Bjaer) where we give both credit,

> individually.



Thank you.



It seems like database solutions like BibTeX & Cie are generally not 

suitable for quoting books as they were published – and that’s important 

in the contexts of “my” authors (literary studies, history).



For my ConTeXt book, I thought it would make sense, and I would jump 

through some hoops just to use the system, but

– most sources that I want to list are never quoted (method=dataset)

– I would need to define my own rendering, e.g. don’t like the handling 

of names

– I need additional fields (custom rendering again)

– if I refer to sources, I want a URL or file path in a footnote (custom 

cite wrapper macro)

This all works fine without the btx subsysten (I just need to find 

solutions for some edge cases, or avoid them), so I probably had wrong 

ideas about bibliographies (at least in TeX).



OTOH, for my novel I can use the bib database approach for an extended 

person register; the required rendering is much less involved.



Hraban

___I got around this issue by generating ConTeXt source with procmail, my bib file, and a slightly customized CSL file. This gives me a bibliography that I modify with a Vim script to handle special cases as you describe, all controlled by a makefile. I insert the result into my document instead of using placebiographyI can provide more details if there is interest once I return home from travels.-- Rik___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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: bibliography questions

2023-10-05 Thread Rik Kabel
On Oct 3, 2023 16:32, Henning Hraban Ramm  wrote:Am 03.10.23 um 02:02 schrieb Alan Braslau:

> On Mon, 2 Oct 2023 13:13:52 +0200

> Henning Hraban Ramm  wrote:

> 

>> Consider:

>> @Book {rattenhka,

>> author = "Bettina von Arnim and Gisela von Arnim",

>> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns",

>> …

>> }

>>

>> The authors are usually given as “Bettina and Gisela von Arnim”

>> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers

>> or “Bettina and Achim von Arnim” as a couple) – is there a good

>> solution for related authors?

> 

> Multiple authors should be treated as multiple authors. That they are

> related is not and should not be a consideration in citing works. At

> least this is the practice that I know of for academic texts.

> 

> You can cheat and try to define one author with a combined first name,

> like

> author={Eames, Ray & Earl},

> but I don't know how that parses as I have never tried it; "and" is a

> reserved token used to define multiple authors. I wouldn't do it as I

> can think of many examples (Bjaer & Bjaer) where we give both credit,

> individually.



Thank you.



It seems like database solutions like BibTeX & Cie are generally not 

suitable for quoting books as they were published – and that’s important 

in the contexts of “my” authors (literary studies, history).



For my ConTeXt book, I thought it would make sense, and I would jump 

through some hoops just to use the system, but

– most sources that I want to list are never quoted (method=dataset)

– I would need to define my own rendering, e.g. don’t like the handling 

of names

– I need additional fields (custom rendering again)

– if I refer to sources, I want a URL or file path in a footnote (custom 

cite wrapper macro)

This all works fine without the btx subsysten (I just need to find 

solutions for some edge cases, or avoid them), so I probably had wrong 

ideas about bibliographies (at least in TeX).



OTOH, for my novel I can use the bib database approach for an extended 

person register; the required rendering is much less involved.



Hraban

___I got around this issue by generating ConTeXt source with procmail, my bib file, and a slightly customized CSL file. This gives me a bibliography that I modify with a Vim script to handle special cases as you describe, all controlled by a makefile. I insert the result into my document instead of using placebiographyI can provide more details if there is interest once I return home from travels.-- Rik___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Libertinus error with today's version

2023-09-18 Thread Rik Kabel

(Running 2023.09.18 17:40 on Windows 11 x64)

With

   \setupbodyfont[libertinus,11pt]
   \starttext
   Hello
   \stoptext

I get no text output in the pdf and the following error reports:

   fonts   > otf loading > loading
   
'G:/ConTeXt_LMTX/tex/texmf/fonts/data/public/libertinus/LibertinusSerif-Regular.otf',
   hash 'libertinusserif-regular'
   otf reader  > fatal error in file
   
'G:/ConTeXt_LMTX/tex/texmf/fonts/data/public/libertinus/LibertinusSerif-Regular.otf':
   ...MTX/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:2160:
   attempt to perform arithmetic on a nil value (global 'markset')
   stack traceback:
 ...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344:
   in metamethod 'add'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:2160:
   in upvalue 'readlookups'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:2570:
   in upvalue 'readscripts'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:2662:
   in local 'reader'
 ...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089:
   in upvalue 'readtable'
 ...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2217:
   in upvalue 'readdata'
 ...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2257:
   in function
   <...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2240>
    [C]: in function 'xpcall'
 ...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2346:
   in upvalue 'loadfont'
 ...MTX/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2401:
   in field 'loadfont'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:160:
   in field 'load'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:625:
   in upvalue 'otftotfm'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:653:
   in function
   <...MTX/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:652>
    (...tail calls...)
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:374:
   in function
   <...MTX/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:350>
    (...tail calls...)
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:465:
   in field 'read'
 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1375:
   in function
   <...MTX/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1232>
    (...tail calls...)
   fonts   > otf loading > loading failed due to read error

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

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

[NTG-context] Re: Chapters without new page

2023-09-15 Thread Rik Kabel


On 9/15/2023 4:10 AM, Taco Hoekwater wrote:



On 15 Sep 2023, at 09:58,wrote:

I thought there should be a setups key on \setupsectionblock, but apparently 
there isn’t. So, the example below does not work, but maybe it wouldn’t be too 
hard to add it…

There is a ‘before' key, but note that the sectionblock itself is called 
“backpart”, not “backmatter”

Either use

\setupsectionblock[backpart][before={\setuphead[chapter][page=no]}]

Or, nicer:

\startsectionblockenvironment[backpart]
   \setuphead[chapter][page=no]
\stopsectionblockenvironment


  Best,
Denis
   \setuphead[chapter][page=yes]
  \setupsectionblock[backmatter][setups={\setuphead[chapter][page=no]}]
  \starttext
  \chapter{One}
\input knuth
  \chapter{Two}
\input ward
   \startbackmatter
\chapter{Three}
\input knuth
  \chapter{Four}
\input ward
\stopbackmatter
\stoptext
   Von: Jeroen  
Gesendet: Donnerstag, 14. September 2023 23:50

An: mailing list for ConTeXt users
Betreff: [NTG-context] Chapters without new page
  In the \startbackmatter ... \stopbackmatter section i would like to have some 
chapters that are not automatically placed on a new page for the next chapter. 
Is there an easy way to suppress the new page for these chapters?
Thanks, Jeroen

Best wishes,
Taco

While this works, it changes behavior for **all** chapters. It does not 
address the original question of how to have **some** chapters  "not 
automatically placed on a new page."


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

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

[NTG-context] Re: Chapters without new page

2023-09-14 Thread Rik Kabel


On 9/14/2023 10:10 PM, Rik Kabel wrote:



On 9/14/2023 5:49 PM, Jeroen wrote:
In the \startbackmatter ... \stopbackmatter section i would like to 
have some chapters that are not automatically placed on a new page 
for the next chapter. Is there an easy way to suppress the new page 
for these chapters?

Thanks, Jeroen


Untried:

 1. Define a new section head that clones chapter
(\definehead[NPChapter][chapter]).
 2. Modify the new section head so that it does not do a break
(\setuphead[NPChapter][page=no]).
 3. Use the new section head instead of \chapter or \startchapter.

And, if you want them to appear in the table of contents, modify the 
combined list of section headers that go into the contents 
(\setupcombinedlist[content][list=chapter,NPChapter,...]). Perhaps add 
it to the pdf bookmarks as well (\placebookmarks...).


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

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

[NTG-context] Re: Chapters without new page

2023-09-14 Thread Rik Kabel


On 9/14/2023 5:49 PM, Jeroen wrote:
In the \startbackmatter ... \stopbackmatter section i would like to 
have some chapters that are not automatically placed on a new page for 
the next chapter. Is there an easy way to suppress the new page for 
these chapters?

Thanks, Jeroen


Untried:

1. Define a new section head that clones chapter
   (\definehead[NPChapter][chapter]).
2. Modify the new section head so that it does not do a break
   (\setuphead[NPChapter][page=no]).
3. Use the new section head instead of \chapter or \startchapter.

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

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

[NTG-context] out of order sectionsblocks

2023-09-04 Thread Rik Kabel

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

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

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

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

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


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

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

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

2023-09-04 Thread Rik Kabel


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

Dear list,

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

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

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,

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

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



I can confirm the problem.

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

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

[NTG-context] Re: disable header for endnotes

2023-08-16 Thread Rik Kabel

On 8/16/2023 5:02 AM, jbf wrote:


I wonder if someone might be able to help me with this.

I have a book in three parts and the author wants endnotes. No 
problem. I can produce those with \setupfootnotes[location=text] and 
then \placefootnotes.


However, I would like the header to read 'Notes' on the recto page (or 
indeed be blank with no header), but I am currently getting the header 
that belongs to the main setup for headers, which happens to be:


\startsetups[middle]

\hfill

\getmarking[section]

\hfill

\stopsetups

\setupheadertexts

[{\hfill\documentvariable{metadata:title}\hfill}][]

[\setups{middle}][]

How do I deal with the \placefootnotes command so that it ignores this 
and either gives me no header, or perhaps a new header with 'Notes' in 
place of [section] (which is achieved in centered position with 
setups[middle])?


Julian


I use the following for a notes chapter at the end of a book. It 
produces headings that indicate the pages for which the notes apply. 
Perhaps you can adapt it to your needs:


   In the environment file:

   \definemarking [notePage] \startsetups noteHeadingsText {\em
   Notes for page
   \doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]}
   { \getmarking[notePage][top]} {s
   \getmarking[notePage][top]–\getmarking[notePage][bottom]}}
   \stopsetups \startsetups noteHeadings:on
   \setupheadertexts[][\setups{noteHeadingsText}]
   [\setups{noteHeadingsText}][] \stopsetups

   In the text:

   \startbackmatter \startchapter[reference={cha:notes},
   list={Notes}, % toc bookmark={Notes}, % pdf bookmark
   title={Notes}] % chapter head [Lettrine=no]
   \setups{noteHeadings:on} \placenotes[endnote] \stopchapter

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

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

[NTG-context] Re: Very strange error:

2023-08-14 Thread Rik Kabel


On 8/14/2023 12:42 PM, Rik Kabel wrote:



On 8/14/2023 11:41 AM, Xavier B. wrote:

After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.

I suspect that LMTX is a bit more strict about parsing. You have 
omitted the required \par for each \head.




Perhaps the mtxrun check script (https://wiki.contextgarden.net/Mtxrun) 
could be enhanced to pick this up.


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

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

[NTG-context] Re: Very strange error:

2023-08-14 Thread Rik Kabel


On 8/14/2023 11:41 AM, Xavier B. wrote:

After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.

I suspect that LMTX is a bit more strict about parsing. You have omitted 
the required \par for each \head.


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

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

[NTG-context] Re: upload

2023-08-09 Thread Rik Kabel


On 8/9/2023 11:42 AM, Hans Hagen wrote:

Hi,

I uploaded a new lmtx. There are some new features that wil be 
revealed in the future (likely after the meeting) but here is one:



Two problems with this upload. First, page number suppression no longer 
works. Second, table captions are not displayed.



   \setuppagenumbering [alternative=doublesided,location=]

   \setupcaption[style=sans,headstyle=sans]

   \starttext
   \startchapter[title={Page Numbering Test}]

   \startplacetable[location={here,spit,force},title={Title?}]
   \starttabulate[|rp|lp|]
   \HL \NC tufte \NC \input tufte \NC \AR
    \NC ward \NC \input ward \NC \AR
    \NC montgomery \NC \input montgomery \NC \AR \HL
   \stoptabulate
   \stopplacetable

   \dorecurse{7}{ \input tufte \par}

   \stopchapter
   \stoptext

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

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

[NTG-context] Re: new upload

2023-07-18 Thread Rik Kabel


On 7/18/2023 4:12 PM, Hans Hagen wrote:

Hi,

In todays upload there is a follow up on a new feature that is already 
present in the previous upload (but that was not yet advertised):


  context --parallel test1.tex test2.tex test3.tex

  context --parallel --pattern=test*.tex

  context --parallellist myfile.cmd  (filters context processing lines)

  context --parallel test1.tex test2.tex test3.tex --terminal

The --parellel feature will run in parallel, By default upto 8 jobs 
but you can specify less or more depending on your hardware but on my 
machine this is reasonable.


See workflows-parrallel at the end for more info. That one also 
mentions the new --forceinput flag which makes that when these


  context foo-1.tex --mode=m-1 --forceinput=whatever.tex
  context foo-3.tex --mode=m-3 --forceinput=whatever.tex

are run in parallel there is no clash in tuc/pdf. Of course not all 
scenarios might work out well. Commandline arguments given are passed 
on to the different jobs but it's good enough for the purpose I have 
in mind.


fwiw: a single pass teststuite run (some 1950 files) goes down from 
1350 to 700 seconds but another run with 1200 complex xml documents 
goes 4 times faster. In the end this is way cheaper than updating a 5 
year old dev machine (a new one would run about twice as fast which 
would bring about the same gain).


Hans

ps. Because tex is a memory intense application it doesn't scale with 
the number of cores unless one has the latest greatest fast memory as 
well as generous cpu caches. There's only so much one can do in the 
code base about it.



Nice. Some of my make files use concurrence (MAKEFLAGS += --jobs=5). 
That seems to bring similar benefits. Is this different beyond the syntax?


--
Rik

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

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

[NTG-context] Re: new upload

2023-07-10 Thread Rik Kabel
The following code now fails. It works as expected under 2023.05.05 as 
found in the texlive.net runner.


   \defineparagraphs[TwoCols][n=2]
   \setupparagraphs[TwoCols][2][\width=.5\textwidth]
   \starttext

   \input knuth \par

   \startTwoCols
   \input knuth \par
   \nextTwoCols
   \input knuth \par
   \stopTwoCols

   \input knuth \par

   \stoptext

--
Rik

On 2023-07-09 13:51, Hans Hagen via ntg-context wrote:

Hi,

No functional changes this time:

- some more consistent usage of new primitives instead of helper 
macros, also a bit of a look and feel related effort as well as 
getting even less tracing clutter (the kind of changes for Wolfgang to 
check -)


- as aside effect there is some performance gain (there is not that 
much more to gain now unless we go ugly); this all depends on usage of 
course


- at some point some of the more obscure middle level helpers (dating 
from mkii) might move to a module as i don't think anyone uses them in 
lmtx


There are quite some files affected (all is tripple checked but who 
knows). If there are issues, they should be easy to fix.


We're now moving into page builder (another side effect of math 
tuneup) mode and have some new features coming there.


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
___ 
___
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] Change in flushleft alignment?

2023-06-01 Thread Rik Kabel via ntg-context

On 2023-06-01 03:02, Hans Hagen via ntg-context wrote:

On 6/1/2023 4:17 AM, Rik Kabel via ntg-context wrote:
Previously (May 7) flushleft paragraphs were as wide as possible 
within the text area. Now (May 30) they appear to be re-wrapped to a 
much narrower width.


Here is the same paragraph, showing the difference:

and

It looks like every paragraph has been run through par.

This does not seem to create paragraphs with more lines, but they 
create a very odd, choppy page. It does not prevent hyphenation, and 
sometimes introduces it where none was present before.


Did I miss a change?

I'll check it (we're experimenting a bit with alignments related to math)

Hans


Thank you for the quick fix.

--
Rik

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

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


[NTG-context] Change in flushleft alignment?

2023-05-31 Thread Rik Kabel via ntg-context
Previously (May 7) flushleft paragraphs were as wide as possible within 
the text area. Now (May 30) they appear to be re-wrapped to a much 
narrower width.


Here is the same paragraph, showing the difference:

and

It looks like every paragraph has been run through par.

This does not seem to create paragraphs with more lines, but they create 
a very odd, choppy page. It does not prevent hyphenation, and sometimes 
introduces it where none was present before.


Did I miss a change?

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

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


Re: [NTG-context] update

2023-04-26 Thread Rik Kabel via ntg-context


On 2023-04-26 19:54, Jairo A. del Rio via ntg-context wrote:

Hi, Hans. The following happens with the last update:

loading         > ConTeXt Node Macros / Page Building
resolvers       > lua > unknown file 'node-pag.lua'

error loading file: node-pag.lua (aborting)

Indeed, the file is missing in the distribution (there's only 
node-pag.mkxl). Regards



Same here, Windows 11 x64.

--
Rik

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

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


Re: [NTG-context] Module authors: please update your metadata

2023-04-14 Thread Rik Kabel via ntg-context

Hraban,

Is there a reason that t-handlecsv is listed in your note, but not in 
https://wiki.contextgarden.net/Modules?


--
Rik Kabel



 On 2023-04-14 07:52, Henning Hraban Ramm via ntg-context wrote:

Hi,
I just updated the module writing guidelines, since I couldn’t find a 
description of the necessary structure of a module release file:

https://wiki.contextgarden.net/Modules#Module_writing_guidelines

I also added an explanation how the publishing via 
https://modules.contextgarden.net works.


If you ever published a module, please check if its metadata is still 
correct, e.g. if the module works for MkIV / LMTX and how it should be 
published – some modules aren’t installable via rsync as outlined in

https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

(For me, the “simplified version” works.)

These modules get installed that way:

f-urwgaramond
f-urwgothic
t-account
t-algorithmic
t-animation
t-annotation
t-bnf
t-chromato
t-cmscbf
t-cmttbf
t-construction-plan
t-cyrillicnumbers
t-degrade
t-fancybreak
t-filter
t-fixme
t-french
t-fullpage
t-games (not in dl)
t-gantt
t-gnuplot
t-handlecsv (newer than in dl)
t-layout
t-letter
t-lettrine
t-lilypond (not in dl, obsolete)
t-mathsets
t-rst
t-ruby
t-simplefonts
t-simpleslides
t-tikz
t-title
t-transliterator
t-typearea
t-typescripts
t-vim
t-visualcounter

Some of these are probably outdated, I didn’t check.
If you know something is obsolete, please let us know or remove it 
yourself, if you still know your account data.



Several more modules are available via 
https://modules.contextgarden.net/dl/ (mentioned as "dl" above).

I added a comment where the directory structure isn’t quite right:

PocketDiary-V2.zip (module folder on top)
Collection-of-calendars-based-on-PocketDiary-module.zip (module folder 
on top)

Date-driven-lists.zip (module folder on top)
Environment-for-collating-marks.zip (module folder on top)
aquamints (no structure)
bibmod-doc (looks right)
gfsdidot (looks right)
grph-downsample.lua  (looks right, except .lua in folder name)
enigma.zip (looks right, except .zip in folder name)
handlecsv (not unzipped, no VERSION file, but newer version in dl)
high (looks right)
karnaugh (looks right)
lua-widow-control (looks right)
lucida-cint.zip (looks right, except .zip in folder name)
metaducks (metaducks folder on top)
presvoz (looks right)
pret-c.lua (looks right, except .lua in folder name)
stormfontsupport (looks right)
sudoku (sudoku folder on top)
t-gm (looks right)
t-greek (looks right)
t-gs (looks right)
t-inifile (looks right)
t-layout (looks right)
t-letterspace.mkiv (looks right, except .mkiv in folder name)
t-rsteps (looks right)
t-simplebib (looks right)
t-taspresent (looks right)
u-texshow (looks right)

(“looks right” only means that the structure looks like TDS, many are 
old and probably obsolete, but a few are quite new, like the first four 
by Willi)



All the best & happy TeXing,
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
___


Re: [NTG-context] Using project-local fonts

2023-04-13 Thread Rik Kabel via ntg-context


On 2023-04-13 11:28, Kalouguine Andre via ntg-context wrote:


Hi,


i'm not familiar with that approach so can't see what interferes
The most important change is that I can't update it and I can't put 
stuff in the system directory nor the user one.

So I only have access to the project folder, it has to be self-contained.
\definefontfamily [ebgaramond] [serif] [ebgaramond] 
[features=eb-garamond-normal]
Apologies, my fault, I forgot a part of my email. I don't want the c-t 
and s-t ligatures (supposed to be in `hlig`). But I do want the T-h 
ligature which is supposed to be in `dlig`. So as far as I understand, 
TeXlive comes with an old version of EB Garamond in which all of them 
are in `dlig`. Hence my question about self-contained projects with fonts.

Best regards,
Andre



Andre (and list),

EB Garamond is hopelessly broken with respect to hlig and dlig, and has 
been for quite a while.


I reported the problem 
(https://github.com/octaviopardo/EBGaramond12/issues/20) over five years 
ago, and the maintainer (if there is one) has done nothing. See also #4 
in that issues list 
(https://github.com/octaviopardo/EBGaramond12/issues/4). There are a 
couple of forks, but there is no established reference implementation 
that I can see. The Google Fonts implementation is similarly challenged, 
perhaps worse.


--
Rik

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

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


Re: [NTG-context] structureuservariable as list

2023-02-24 Thread Rik Kabel via ntg-context



Hi,

is it possible to pass a list in a variable? I'd like to pass a list 
of authors:



\startchapter[title={Foo Bar}][authors={Alice, Bob}]

% PSEUDOCODE
% for author in \structureuservariable{authors}
% do print(author + '\crlf')
% done

\stopchapter


Search the wiki. Look for "Comma Separated Lists." There is a variant 
with an author list as an example.


You may need additional brace levels around the list entries.

--
Rik

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

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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

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


Re: [NTG-context] \autoinsertedspace fails

2023-01-05 Thread Rik Kabel via ntg-context


On 2023-01-05 04:35, Hans Hagen via ntg-context wrote:

On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote:


    [ snipped by rik]


Here is a more lmtx-ish variant:

\starttexdefinition tolerant protected BD #=#*#=
   \removeunwantedspaces
   \space % insert a space
   (
   \ifparameter#2\or
   #1|–|#2
   \orelse\ifparameter#1\or
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi
   )
   \autoinsertedspace
\stoptexdefinition

Hans


Thank you for that. This works for me with \optionalspace, but fails in 
some cases with \autoinsertedspace.


I have now re-read lowlevel-macros.pdf and have a better understanding 
of what I read when first I approached it; I still have a way to go.


/Tolerant/ removes the need for /dodoubleempty/ and friends and the 
two-step /macro/ and /doMacro/ dance. There was a small advantage to the 
two-step, however. I had two separate macros, BD and BDNP (no parens), 
as shown.


The old code in full was:

   % Birth and death dates ---%
   % Ferdinand de Saussure\BD{1857}{1913}
   % Noam Chomsky \BD{1928}
   %
   % Perhaps this could be tied to an acronym-like database so that the
   %   dates are printed only once per person.
   % \removeunwantedspaces allows this to directly follow, or follow
   %   after whitespace, the associated name: Name\BD{1}{2} or
   %   Name \BD{1}{2}.
   % Using the compound indication (|–|) allows hyphenation after the
   %   endash. Omitting it and using a bare endash inhibits hyphenation
   %   ‘twixt the endash and the paren.
   % By default, add parens around the dates. If none are needed due to
   %   the context, use \BDNP.
   %
   \newif\ifBDParen
   \starttexdefinition unexpanded BD
  \BDParentrue
  \dodoublegroupempty
  \doBD
   \stoptexdefinition
   \starttexdefinition unexpanded BDNP
  \BDParenfalse
  \dodoublegroupempty
  \doBD
   \stoptexdefinition
   \starttexdefinition doBD #1#2
   \removeunwantedspaces\
   \ifBDParen(\fi
   \ifsecondargument
   #1|–|#2
   \else\iffirstargument
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi\fi
   \ifBDParen)\fi
   \autoinsertedspace
   \stoptexdefinition

Both call the same doBD, but they set a flag (newif) to control 
insertion or not of the parens. While there is no performance benefit 
compared to having two fully separate macros, there is a maintenance 
benefit in having only one place, doBD, to make changes should they be 
required.


Can you suggest a way to do this under the new one-step scheme, or am I 
over-thinking this?


Finally, is there any reason to go back to previously written and 
properly functioning macros and convert them to the LMTX-only syntax? It 
does imply committing to LMTX-only (or


--
Rik

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

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


Re: [NTG-context] \autoinsertedspace fails

2023-01-04 Thread Rik Kabel via ntg-context


On 2023-01-04 18:45, Hans Hagen wrote:

On 1/4/2023 11:10 PM, Rik Kabel via ntg-context wrote:

No change with the latest (2023.01.04).

Is this a problem with what I am doing, or a bug?

well, it's new and not thtat tested ... we need to specify it

This\optionalspace fails unexpectedly with autoinsertedspace.\par
This\optionalspace \emph{fails unexpectedly} with autoinsertedspace.\par

there can be more variants, like do we want to remove preceding spaces?

we already have:

This\optionalspace, fails unexpectedly with autoinsertedspace.\par
This\optionalspace, \emph{fails unexpectedly} with autoinsertedspace.\par
This\optionalspace fails unexpectedly with autoinsertedspace.\par
This\optionalspace \emph{fails unexpectedly} with autoinsertedspace.\par



\optionalspace works correctly (that is, as I want it to) for all of my 
use cases under both MkIV and LMTX. Is there any reason that this should 
not be used in user documents?


I do wonder what characters are considered "punctuation" for the purpose 
of suppressing the next space. The standard six sentence termination 
characters (?!.:;,) are honored, and so are many others (quotation 
marks, including guillemot, square and curly braces, and parens). But 
sentence opening characters (¿¡) are as well. Vertical bars (|¦) and 
basic mathematical characters (+-=*) are not treated as punctuation. 
Where (in the source or manuals) are these to be found?


As far as removing leading spaces, I do not see that it is necessary, 
but it may help create more readable sources.


Thank you for the fix.

--
Rik

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

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


Re: [NTG-context] \autoinsertedspace fails

2023-01-04 Thread Rik Kabel via ntg-context

No change with the latest (2023.01.04).

Is this a problem with what I am doing, or a bug?

--
Rik

On 2022-12-29 19:12, Rik Kabel via ntg-context wrote:


Happy New Year all!

Following up on the problem with \autoinsertnextspace 
(https://mailman.ntg.nl/pipermail/ntg-context/2022/107111.html) and 
the new \autoinsertedspace that came from that report, I see that 
there is still a problem, or perhaps a problem again after it was 
previously repaired.


The following code, run under the latest (and recent previous) 
version, produces an incorrect result, with no space inserted where 
expected in many cases. As the first examples after \starttext show, 
the problem appears to be with \autoinsertedspace, but perhaps I am 
using it incorrectly in the macro as well.


\starttexdefinition unexpanded BD
  \dodoublegroupempty
  \doBD
\stoptexdefinition

\starttexdefinition doBD #1#2
   \removeunwantedspaces\ % insert a space
   (
   \ifsecondargument
   #1|–|#2
   \else\iffirstargument
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi\fi
   )
   \autoinsertedspace
\stoptexdefinition

\tt

\starttext
This\autoinsertedspace fails unexpectedly with autoinsertedspace.\par
This\autoinsertedspace \emph{fails unexpectedly} with
autoinsertedspace.\par
This\autoinsertnextspace works with autoinsertnextspace.\par
This\autoinsertnextspace \emph{fails} as expected with
autoinsertnextspace.\par
Saussure\BD{1857}{1913} works.\par
Saussure \BD{1857}{1913} \emph{works}.\par
Saussure \BD{1857}{1913}. Works.\par
Chomsky\BD{1928} fails with LMTX, works with MkIV.\par
Chomsky \BD{1928} \emph{fails with LMTX, works with MkIV}.\par
Chomsky \BD{1928}. Works.\par
\BD blah\par
\contextversion\ \texenginename
\stoptext


--
Rik



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

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

2022-12-29 Thread Rik Kabel via ntg-context

Happy New Year all!

Following up on the problem with \autoinsertnextspace 
(https://mailman.ntg.nl/pipermail/ntg-context/2022/107111.html) and the 
new \autoinsertedspace that came from that report, I see that there is 
still a problem, or perhaps a problem again after it was previously 
repaired.


The following code, run under the latest (and recent previous) version, 
produces an incorrect result, with no space inserted where expected in 
many cases. As the first examples after \starttext show, the problem 
appears to be with \autoinsertedspace, but perhaps I am using it 
incorrectly in the macro as well.


   \starttexdefinition unexpanded BD
  \dodoublegroupempty
  \doBD
   \stoptexdefinition

   \starttexdefinition doBD #1#2
   \removeunwantedspaces\ % insert a space
   (
   \ifsecondargument
   #1|–|#2
   \else\iffirstargument
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi\fi
   )
   \autoinsertedspace
   \stoptexdefinition

   \tt

   \starttext
   This\autoinsertedspace fails unexpectedly with autoinsertedspace.\par
   This\autoinsertedspace \emph{fails unexpectedly} with
   autoinsertedspace.\par
   This\autoinsertnextspace works with autoinsertnextspace.\par
   This\autoinsertnextspace \emph{fails} as expected with
   autoinsertnextspace.\par
   Saussure\BD{1857}{1913} works.\par
   Saussure \BD{1857}{1913} \emph{works}.\par
   Saussure \BD{1857}{1913}. Works.\par
   Chomsky\BD{1928} fails with LMTX, works with MkIV.\par
   Chomsky \BD{1928} \emph{fails with LMTX, works with MkIV}.\par
   Chomsky \BD{1928}. Works.\par
   \BD blah\par
   \contextversion\ \texenginename
   \stoptext


--
Rik

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

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


[NTG-context] xtables regression with LMTX 2022-12-21

2022-12-22 Thread Rik Kabel via ntg-context
With the latest (2022-12-21) LMTX I see a regression in xtables. The 
following code:


   \starttext
   \startxtable
  \startxrow
    \startxcell
  This is a line of text.
    \stopxcell
    \startxcell
  \contextversion
    \stopxcell
  \stopxrow
   \stopxtable
   \stoptext


produces this with 2022-12-09:

and this with 2022-12-21:

The problem appears to be LMTX-specific. (I did not save 2022-12-15 for 
testing, but did not see the problem with that version.)


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

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


Re: [NTG-context] Use section custom value in a header text.

2022-12-20 Thread Rik Kabel via ntg-context


On 2022-12-20 14:31, Pawel Urbanski via ntg-context wrote:

Hi,
Let me clarify my question more...
I need to attach some value to a chapter in that key. That custom 
prefix + the value in the key is ment to be in the header or a footer 
as a matter of fact. The case can apply to both headers and footers.

I tried:
\chapter[title={A sample title}][custom_random={custom_value}]
\setupheadertexts[{Prefix: \structureuservariable{custom_random}}]
...
\stopchapter
I tried this code when trying to figure out the mechanism. The prefix 
string in placed in the header, but hte custom value of the attached 
key is not expanded..
Evey page will contain just one section started by a \startchapter and 
\stop chapter. I would like to put this custom attached value in the 
right slot in the document header.


I hope that htis time around htigs are more clear.

On Tue, Dec 20, 2022 at 8:13 PM Henning Hraban Ramm via ntg-context 
 wrote:


Am 20.12.22 um 19:44 schrieb Pawel Urbanski via ntg-context:
> Dear Friends,
> I s-- pent some time searching and coding simple documents, but
failed and
> therefore I'm asking for help...
> A section such as chapter cn have custom keys with values. One
uses the:
> \structureuservariable command to access such values.
> How can I use such a value to create a custom header in a format:
> Prefix: \structureuservariable{foo}
>
> I am asking for the only thing that worked when I tried was
calling the:
> \setupheadertexts command inside a chapter environment block
with some
> prefix. Unfortunately the value from the custom field was not
expanded.
> It was correctly inserted in a regular paragraph.
> For example:
> \startchapter
> [title={A sample title}][custom_something={random_value}]
> ...
> \stopchapter
>
> How can I put the value of: custom_something in the header with
some prefix?

\define[2]\MyChapter{No.#1 – Prefix
\structureuservariable{custom_something}: #2}

\setuphead[chapter][
  command=\MyChapter,
]

Is this what you meant?

Hraban



Perhaps:

   \setuppagenumbering[alternative=doublesided,location=bottom]
   \startsetups chapter:headings
  \doifsomethingelse{\structureuservariable{custom}}
    {\setupheadertexts[RI]
  [Prefix:
   \structureuservariable{custom}]
  [Prefix:
   \structureuservariable{custom}]
  [VO]}
    {\setupheadertexts[RI][RO][VO][VI]}
   \stopsetups
   \setuphead[chapter]
  [style=\tfa,
   after={\blank\setups{chapter:headings}},
  ]
   \starttext
   \startchapter[title=Nothing special]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \startchapter[title=Something special][custom={Hi there!}]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \startchapter[title=More nothing special]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \startchapter[title=More something special][custom={Bye Bye!}]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \stoptext

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

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


Re: [NTG-context] bottlenecks

2022-12-17 Thread Rik Kabel via ntg-context


On 2022-12-17 04:48, Hans Hagen via ntg-context wrote:

On 12/17/2022 1:05 AM, Rik Kabel via ntg-context wrote:

The laptop was hot stuff in 2017 with 16GB RAM, 1TB SSD, and a 4K 
touch screen -- today, not so hot. Due to be replaced next year.


so a bit like the surface i have as spare (which was slower than the 
2013 precission that i recently replaced by a 2018 one)



Here are the numbers without compact fonts enabled. Not much difference.



    mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 84
    instances, 67 shared in backend, 3 common vectors, 64 common hashes,
    load time 1.076 seconds


which means that you don't run in compact mode


Indeed, I had a typo. Running with compact fonts, I get:

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.045 seconds, 1 scans 
with scantime 0.037 seconds, 0 shared scans, 37 found files, scanned 
paths: C:/Users/micro/texmf
mkiv lua stats  > stored bytecode data: 507 modules (0.267 sec), 106 
tables (0.015 sec), 613 chunks (0.282 sec)
mkiv lua stats  > traced context: maxstack: 4108, freed: 2453, 
unreachable: 1655

mkiv lua stats  > cleaned up reserved nodes: 78 nodes, 8 lists of 438
mkiv lua stats  > node memory usage: 6860 attribute, 4602 dir, 69 
fontspec, 4606 glue, 84 gluespec, 2301 glyph, 3068 hlist, 3 kern, 647 
mathspec, 5 penalty, 2 temp
mkiv lua stats  > node list callback tasks: 13 unique task lists, 37 
instances (re)created, 87134 calls

mkiv lua stats  > h-node processing time: 3.146 seconds including kernel
mkiv lua stats  > inserted spaces in output: 106025
mkiv lua stats  > attribute processing time: 0.248 seconds front- and 
backend

mkiv lua stats  > driver time: 2.425 seconds
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.198 seconds saving, 0.059 seconds loading
mkiv lua stats  > callbacks: file: 34385, saved: 191160, direct: 8, 
function: 173538, value: 345, message: 0, bytecode: 613, late 0, total: 
400049 (1184 per page)

mkiv lua stats  > randomizer: resumed with value 0.88558194690977
mkiv lua stats  > v-node processing time: 0.208 seconds
mkiv lua stats  > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9 en::1 
es::64 fr::63 it::66 la::67 ru::22, load time: 0.000

mkiv lua stats  > structure elements: 28148 element chains identified
mkiv lua stats  > interactive elements: 3983 references, 4873 destinations
mkiv lua stats  > margin data: 497 entries, 0 pending
mkiv lua stats  > loaded fonts: 14 files: antykwatorunska-bold.otf, 
antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf, 
libertinusmath-regular.otf, libertinusmono-regular.otf, 
libertinussans-italic.otf, libertinussans-regular.otf, 
libertinusserif-italic.otf, libertinusserif-regular.otf, 
libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf, 
msjh.ttc, times.ttf
*mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 18 
instances, 2 shared in backend, 2 common vectors, 0 common hashes, load 
time 0.534 seconds *

mkiv lua stats  > text directions: 4.229 seconds
mkiv lua stats  > math tweaking time: 0.023 seconds, 2 math goodie tables
mkiv lua stats  > pdf annotations: 3983 links (3983 unique), 0 special
mkiv lua stats  > font embedding time: 0.055 seconds, 13 fonts
mkiv lua stats  > result saved in file: misquotation_bodyonly.pdf, 
compresslevel 1, objectcompresslevel 3
mkiv lua stats  > positions: 4034 collected, 1723 deltas, 4025 shared 
partials, 111 partial entries
mkiv lua stats  > used platform: win64, type: windows, binary subtree: 
texmf-win64
mkiv lua stats  > used engine: luametatex version: 2.1004, functionality 
level: 20221214, format id: 679, compiler: gcc
mkiv lua stats  > tex properties: 740852 hash slots used of 2097152, 
51822 control sequences, approximate memory usage: 41 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 225 MB, 
ctx: 200 MB, max: 200 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 19.993 seconds, 338 processed pages, 338 
shipped pages, 16.906 pages/second


but the overall runtime is essentially unchanged.

I do have some macros that are likely to make you (and others who are 
more adept at such things) cringe. Happy to share more of the source 
if it is helpful.


sure

I have also run with --profile and have attached that log as well as 
the complete execution log (zipped together as logs.zip).

here are a few:

0.613002300 s    0.138 % 0.609968531 s    0.160 %  3674 # 
prerollreference


 0.420704300 s    0.095 % 0.420702649 s    0.110 % 2 # 
analyzeregister


0.425307400 s    0.096 % 0.425299968 s    0.111 % 9 # 
action   1358 
...MTX/tex/texmf-context/tex/con

Re: [NTG-context] bottlenecks

2022-12-17 Thread Rik Kabel via ntg-context

On 2022-12-16 17:07, Hans Hagen via ntg-context wrote:

On 12/16/2022 10:08 PM, Rik Kabel via ntg-context wrote:

Hans,

Here are the stats for a 346 page book. Fonts are all cached. 
Compilation is via a make file which processes this as:


    context --noconsole --overloadmode=error --batchmode --nonstopmode
    --nosynctex misquotation_bodyonly.mkvi > nul

and is run under W11 x64 on an i7-8550U. The only tables are contents 


ok, not the fastest i7 out there, more the tablet one, right?

and acronyms, and such, nothing complex. No graphics. Compact fonts 
are enabled.


can you check compact mode .. when compact fonts are not enabled, do 
you get the same


> mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 84
> instances, 67 shared in backend, 3 common vectors, 64 common 
hashes,


i wonder why so many instances


    mkiv lua stats  > node memory usage: 6869 attribute, 4608 dir, 4612
    glue, 84 gluespec, 2304 glyph, 3072 hlist, 3 kern, 647 mathspec, 5
    penalty, 2 temp


this is suspicious ... i fixed a dir leak recently but having 3K boxes 
dangling ...


In neither case do the sum of the times listed in the stats come 
close to the total runtime (in the second example, 14.774 seconds of 
23.057 are accounted), so there are other unidentified processes 
involved.


these stats are an indication because below a threshold (time 
accuracy) nothing is measured


In any case, the processing time has been improving greatly over the 
last couple of years, and LMTX is significantly faster that MkIV in 
all of my work.
sure, that is to be expected although it depends a bit on the use 
case, for instance the backend is slower (but does much more) so 
initially lmtx was actually slower but at some point we started 
gaining (and i can probably gain a little more)


i wonder why directions bump time because much of what tex does is 
sort of agnostic for directions (the backend needs more time but i 
don't see that in your stats)


when you run with --profile you get a much slower run but might get 
some info from the extra log


Hans



The laptop was hot stuff in 2017 with 16GB RAM, 1TB SSD, and a 4K touch 
screen -- today, not so hot. Due to be replaced next year.


Here are the numbers without compact fonts enabled. Not much difference.

   mkiv lua stats  > used config file:
   selfautoparent:/texmf/web2c/texmfcnf.lua
   mkiv lua stats  > used cache path:
   
C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
   mkiv lua stats  > resource resolver: loadtime 0.045 seconds, 1 scans
   with scantime 0.037 seconds, 0 shared scans, 37 found files, scanned
   paths: C:/Users/micro/texmf
   mkiv lua stats  > stored bytecode data: 507 modules (0.243 sec), 106
   tables (0.016 sec), 613 chunks (0.259 sec)
   mkiv lua stats  > traced context: maxstack: 4107, freed: 2452,
   unreachable: 1655
   mkiv lua stats  > cleaned up reserved nodes: 78 nodes, 8 lists of 438
   mkiv lua stats  > node memory usage: 6869 attribute, 4608 dir, 4612
   glue, 84 gluespec, 2304 glyph, 3072 hlist, 3 kern, 647 mathspec, 5
   penalty, 2 temp
   mkiv lua stats  > node list callback tasks: 13 unique task lists, 37
   instances (re)created, 87130 calls
   mkiv lua stats  > h-node processing time: 3.454 seconds including kernel
   mkiv lua stats  > inserted spaces in output: 106016
   mkiv lua stats  > attribute processing time: 0.295 seconds front-
   and backend
   mkiv lua stats  > driver time: 2.487 seconds
   mkiv lua stats  > used backend: pdf
   mkiv lua stats  > jobdata time: 0.290 seconds saving, 0.053 seconds
   loading
   mkiv lua stats  > callbacks: file: 34388, saved: 191153, direct: 8,
   function: 173574, value: 345, message: 0, bytecode: 613, late 0,
   total: 400081 (1184 per page)
   mkiv lua stats  > randomizer: resumed with value 0.88558194690977
   mkiv lua stats  > v-node processing time: 0.250 seconds
   mkiv lua stats  > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9
   en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000
   mkiv lua stats  > structure elements: 28145 element chains identified
   mkiv lua stats  > interactive elements: 3982 references, 4873
   destinations
   mkiv lua stats  > margin data: 497 entries, 0 pending
   mkiv lua stats  > loaded fonts: 14 files: antykwatorunska-bold.otf,
   antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf,
   libertinusmath-regular.otf, libertinusmono-regular.otf,
   libertinussans-italic.otf, libertinussans-regular.otf,
   libertinusserif-italic.otf, libertinusserif-regular.otf,
   libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf,
   msjh.ttc, times.ttf
   mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 84
   instances, 67 shared in backend, 3 common vectors, 64 common hashes,
   load time 1.076 seconds
   mkiv lua stats  > text directions: 4.987 seconds
   mkiv lua

Re: [NTG-context] bottlenecks

2022-12-16 Thread Rik Kabel via ntg-context
mory usage: 6869 attribute, 4608 dir, 4612
   glue, 84 gluespec, 2304 glyph, 3072 hlist, 3 kern, 647 mathspec, 5
   penalty, 2 temp
   mkiv lua stats  > node list callback tasks: 13 unique task lists, 37
   instances (re)created, 86856 calls
   mkiv lua stats  > h-node processing time: 2.899 seconds including kernel
   mkiv lua stats  > inserted spaces in output: 104350
   mkiv lua stats  > attribute processing time: 0.225 seconds front-
   and backend
   mkiv lua stats  > driver time: 2.050 seconds
   mkiv lua stats  > used backend: pdf
   mkiv lua stats  > jobdata time: 0.210 seconds saving, 0.053 seconds
   loading
   mkiv lua stats  > callbacks: file: 34137, saved: 190338, direct: 33,
   function: 173845, value: 337, message: 0, bytecode: 613, late 0,
   total: 399303 (1188 per page)
   mkiv lua stats  > randomizer: resumed with value 0.88558194690977
   mkiv lua stats  > v-node processing time: 0.266 seconds
   mkiv lua stats  > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9
   en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000
   mkiv lua stats  > structure elements: 28023 element chains identified
   mkiv lua stats  > interactive elements: 3997 references, 4875
   destinations
   mkiv lua stats  > margin data: 497 entries, 0 pending
   mkiv lua stats  > loaded fonts: 14 files: antykwatorunska-bold.otf,
   antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf,
   libertinusmath-regular.otf, libertinusmono-regular.otf,
   libertinussans-italic.otf, libertinussans-regular.otf,
   libertinusserif-italic.otf, libertinusserif-regular.otf,
   libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf,
   msjh.ttc, times.ttf
   mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 84
   instances, 67 shared in backend, 3 common vectors, 64 common hashes,
   load time 0.991 seconds
   mkiv lua stats  > text directions: 4.016 seconds
   mkiv lua stats  > math tweaking time: 0.155 seconds, 18 math goodie
   tables
   mkiv lua stats  > graphics processing time: 3.767 seconds including
   tex, 25 processed images, 25 unique asked, 25 bad names
   mkiv lua stats  > pdf annotations: 3997 links (3997 unique), 0 special
   mkiv lua stats  > font embedding time: 0.061 seconds, 12 fonts
   mkiv lua stats  > result saved in file: misquotation_bodyonly.pdf,
   compresslevel 1, objectcompresslevel 3
   mkiv lua stats  > positions: 3983 collected, 1672 deltas, 3973
   shared partials, 110 partial entries
   mkiv lua stats  > used platform: win64, type: windows, binary
   subtree: texmf-win64
   mkiv lua stats  > used engine: luametatex version: 2.1004,
   functionality level: 20221214, format id: 679, compiler: gcc
   mkiv lua stats  > tex properties: 740852 hash slots used of 2097152,
   51853 control sequences, approximate memory usage: 73 MB
   mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 221
   MB, ctx: 195 MB, max: 219 MB, symbol mask: utf (τεχ)
   mkiv lua stats  > runtime: 23.057 seconds, 336 processed pages, 336
   shipped pages, 14.572 pages/second

Significant time is attributed to text directions (there are a few 
excerpts in Hebrew), and to graphics processing in the second case.


In neither case do the sum of the times listed in the stats come close 
to the total runtime (in the second example, 14.774 seconds of 23.057 
are accounted), so there are other unidentified processes involved.


In any case, the processing time has been improving greatly over the 
last couple of years, and LMTX is significantly faster that MkIV in all 
of my work.


--
Rik

On 2022-12-16 15:02, Hans Hagen via ntg-context wrote:

On 12/16/2022 8:36 PM, Henning Hraban Ramm via ntg-context wrote:

Am 16.12.22 um 18:10 schrieb Hans Hagen via ntg-context:
So the challenge is how to determine bottlenecks. Are there users on 
this list that have document runs of more than 10 seconds (as 
reference: the luametatex manual takes < 9 seconds for 350 pages and 
loads plenty fonts and has many tables) or have many (small) runs 
and are annoyed by the runtime? And if so, what does one guess are 
the bottlenecks?


(1)
This is my 366 page ConTeXt book:


mkiv lua stats  > runtime: 30.592 seconds, 366 processed pages, 366 
shipped pages, 11.964 pages/second



(2)
This is a 720 page novel (first run with this LMTX version, some 
fonts were still uncached):




mkiv lua stats  > runtime: 19.275 seconds, 720 processed pages, 720 
shipped pages, 37.355 pages/second

so what if you add to the top

\enableexperiments[fonts.compact]

Hans

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


Re: [NTG-context] Convertnumber with \ref[number] fails in MkIV, works in LMTX

2022-12-06 Thread Rik Kabel via ntg-context


On 2022-12-06 15:32, Hans Hagen via ntg-context wrote:

On 12/6/2022 9:06 PM, Rik Kabel via ntg-context wrote:

\definelabel[X][text=]
\startTEXpage[offset=1cm]
   \X\X[a]\X[b]\X\par
   \convertnumber{R}{\ref[number][a]}
   \convertnumber{G}{\ref[number][b]}
\stopTEXpage


maybe like this:

\definelabel[X][text=]

\startTEXpage[offset=1cm]
  (\X)
  (\X[a])
  (\X[b])
  (\X)
  \par
  \doifelsereferencefound {a}
    {\convertnumber{number}{\currentreferencenumber}}
    {}
  \par
  \doifelsereferencefound {a}
    {\convertnumber{R}{\currentreferencenumber}}
    {}
  \par
  \doifelsereferencefound {b}
    {\convertnumber{G}{\currentreferencenumber}}
    {}
\stopTEXpage

-
  Hans Hagen | PRAGMA ADE


Perfect! Thank you.

It looks like \currentreference number is initially empty, and when 
\doifelsereferencefound succeeds it is set to that value, and remains 
set to that value until another \doifelsereferencefound is encountered. 
If \doifelsereferencefound fails, \currentreference is again empty. Is 
that correct?


--
Rik

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

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


Re: [NTG-context] Convertnumber with \ref[number] fails in MkIV, works in LMTX

2022-12-06 Thread Rik Kabel via ntg-context


On 2022-01-19 12:39, Rik Kabel via ntg-context wrote:


This is still a problem with the current standalone.

\definelabel[X][text=]
\startTEXpage[offset=1cm]
  \X\X[a]\X[b]\X\par
  \convertnumber{R}{\ref[number][a]}
  \convertnumber{G}{\ref[number][b]}
\stopTEXpage

%% The above example fails to compile when there is no tuc file,
%%    complaining of a missing number in line 4. When lines 4
%%    and 5 are removed and the file is compiled, producing
%%    a .tuc file, and then they are restored, the example
%%    compiles without error. The effect of having or not having
%%    an associated .tuc file does seem a bit odd.

Surely there is a way to get the number from a label reference that 
can then be converted to a numeral of choice.


--
Rik



(A year later) Is there still no way to do this without resorting to the 
.tuc-file gimmick?


The need is to take a label reference number and display it under a 
different numberconversion regime.


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

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


[NTG-context] \autoinsertedspace fails following \nbsp under LMTX

2022-11-16 Thread Rik Kabel via ntg-context

ConTeXt  ver: 2022.11.14 22:58 LMTX on W11 x64

I have been testing the recently added \autoinsertedspace, and I found 
an odd failure.


The following compiles with \nbsp commented as shown, but once that line 
is active, the compilation fails:


   lua error:
    callback error:
   ...MTX/tex/texmf-context/tex/context/base/mkxl/font-hsh.lmt:151:
   table index is nil

It fails differently in MkIV (but it is nice to see that the new command 
has been backported):


   luatex warning  > node filter: error:
   ...MTX/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:380:
   Attempt to node.direct.remove() a non-existing node

   %<--

   \starttexdefinition unexpanded New
  \dodoublegroupempty
  \doNew
   \stoptexdefinition
   \starttexdefinition doNew #1#2
   \removeunwantedspaces
   \ (#1|–|#2)
   \autoinsertedspace
   \stoptexdefinition

   \starttext

  ABC 0\New{123}{456} 789

  ABC
   % \nbsp
  0\New{123}{456} 789

   \stoptext

Am I doing something wrong here? \nbsp is needed to prevent improper 
line breaks.


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

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


Re: [NTG-context] How to make a block of text narrower?

2022-11-15 Thread Rik Kabel via ntg-context


On 2022-11-15 21:49, Joel via ntg-context wrote:
I need to make a section of text in my document narrower, about 
.\textwidth.


Basically the text has normal alignment and everything, just instead 
of filling \textwidth, its compressed so there is a larger white space 
to the right.


I've tried dozens of things, but cannot get a good solution, every 
solution has strange other effects.


The best thing that has worked so far is
|\setuplayout[width=3in] But the problem with this solution is then I 
cannot get it to return to the original settings afterward. --Joel |



https://wiki.contextgarden.net/Command/startnarrower___
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] \autoinsertnextspace regression / discrepancy, mkiv to lmtx

2022-10-26 Thread Rik Kabel via ntg-context


On 2022-10-26 07:43, Hans Hagen via ntg-context wrote:

On 10/26/2022 1:52 AM, Rik Kabel via ntg-context wrote:
The following example produces different results when processed by 
LMTX and MkIV. In particular, a space between the X and Y is not 
auto-inserted by LMTX, while it is by MkIV.


    \starttexdefinition TEST #1
   #1\autoinsertnextspace
    \stoptexdefinition
    \tt
    \starttext
   \TEST{X} \emph{Y}
    \stoptext

The MkIV result is the correct result (in my opinion).

more a side effect ... we lookahead and \emph is not some character

I made a variants that does abetter job on that

\starttexdefinition TEST #1
    #1%
    \autoinsertedspace % subtle name change
\stoptexdefinition

but you have to wait till we update,

Hans



Thank you in advance for the upcoming fix.

Can you tell us (me) why you chose to create a new macro, 
\autoinsertedspace, instead of changing the code for 
\autoinsertnextspace in LMTX? Do you see a circumstance under which the 
current LMTX behavior of \autoinsertnextspace is desirable or required? 
Will the new macro be available under MkIV?


--
Rik

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

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


[NTG-context] \autoinsertnextspace regression / discrepancy, mkiv to lmtx

2022-10-25 Thread Rik Kabel via ntg-context
The following example produces different results when processed by LMTX 
and MkIV. In particular, a space between the X and Y is not 
auto-inserted by LMTX, while it is by MkIV.


   \starttexdefinition TEST #1
  #1\autoinsertnextspace
   \stoptexdefinition
   \tt
   \starttext
  \TEST{X} \emph{Y}
   \stoptext

The MkIV result is the correct result (in my opinion).

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

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


Re: [NTG-context] Spacing in \unit - SOLVED

2022-10-12 Thread Rik Kabel via ntg-context


On 2022-10-12 17:54, Gavin via ntg-context wrote:

Hi Max, Alan, Bruce, Hans, et.al

I solved my four issues with \unit spacing. In the process, I prevented 
unwanted line breaks and removed an overzealous backspace before division 
symbols. Below is a MWE that shows all of these issues, as well as pictures of 
the result with the unmodified phys-dim.mkxl and with my modified 
phys-dim.mkxl. The final result is exactly what I wanted.

If anyone wants my changes, either for their own use or to improve the 
distributed phys-dim.mkxl, I’m happy to share.

Thanks for all of your comments!
Gavin


MWE:

\setuppapersize[A5]

\starttext

The \type{\unit} command in text produces \unit{1.23e5 kg m^2/s^2}.

Inline math \type{$\unit$} produces $\unit{1.23e5 kg m^2/s^2}$.

Display math produces
\startformula
  \unit{1.23e5 kg m^2/s^2} + \unit{8.64e5 newton m} = \unit{987,000 joule}
\stopformula

Line breaking in math:

{\hsize=0pt $G = \unit{6.6743e-11 m3 kg-1 s-2}$}

\blank
Line breaking in text:

{\hsize=0pt \unit{6.6743e-11 m3 kg-1 s-2}}

\stoptext

Output with unmodified phys-dim.mkxl:


Output with my modified phys-dim.mkxl:





On Oct 10, 2022, at 12:15 AM, Max Chernoff via ntg-context  
wrote:

Hi Alan,


I would very strongly argue that the space between the number and the
following units be UNBREAKABLE. Perhaps a thin space (preference), but
most certainly non-breakable.

Similarly around the times in scientific notation.

I further cannot imagine that a line break be acceptable around a \cdot
in composite units.

This can possibly lead to overfill and underfill, something that I find
*infinitely* more acceptable then breaking numbers and units.

Yes, I agree completely here.


I do not know or use the \units command. Maybe it uses unbreakable
spaces, maybe not. I would never use it unless it could be configured
to only use nonbreakable spaces.

The current behaviour doesn't break the unit from the number, but it
does split the scientific notation.

This test file:

   \starttext
   \hsize=0pt Math: $G = \unit{6.6743e-11 m3 kg-1 s-2}$

   \hsize=0pt Text: \unit{6.6743e-11 m3 kg-1 s-2}
   \stoptext

gives:

   Math:
   퐺=
   6.6743×
   10–11m3⋅kg–1⋅s–2
   Text:
   6.6743
   ×
   10−11 m3⋅kg−1⋅s−2

which isn't great. In my opinion, the \unit command should be typeset in an
\hbox (or similar) since I can't think of any circumstances where breaking
it would be reasonable.

Thanks,
-- Max
___


It does look like you have introduced additional space before the 
solidus. Was that intentional?


--
Rik

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

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


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-12 Thread Rik Kabel via ntg-context


On 2022-10-11 15:06, Leah Neukirchen via ntg-context wrote:

Henning Hraban Ramm via ntg-context  writes:


Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:

Hello,
I noticed the following problem:
\showframe
\startluacode
fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
\stopluacode
\definefontfeature[default][default][protrusion=pure]
\setupalign[hanging]
\starttext
This text is unquoted.
“This text is quoted manually.”
\quotation{This text is quoted by a macro.}
This is a very long line followed by a nice linebreak, very
supercalifragilisticexpialidocious.
This is a very long line followed by an ugly linebreak, not
\quotation{supercalifragilisticexpialidocious}
\stoptext
The macro-quoted text is not protruded.  I fixed this locally with a
macro
\def\q#1{\protrusionboundary1\quotation{#1}}
Should this be default?
But the missing hyphenation I have to add myself with \-.  Ideas?

Try
\setupdelimitedtext[quotation][method=font]

That fixes both issues, thanks!

Not sure where I should have learned this exists, however. ;)


Note that this does not fix the problem when the quotation begins a 
footnote. See the thread "Hanging punctuation misalignment in footnotes" 
(https://mailman.ntg.nl/pipermail/ntg-context/2014/077122.html or 
https://www.mail-archive.com/ntg-context@ntg.nl/msg73516.html, pick your 
favorite archiver), where the problem is described. An test example follows:


   \setuplayout   [width=9cm,
    height=12cm]
   \definefontfeature [default]
   [default]
   [protrusion=quality]
   \setupalign    [hanging]
   \setupquotation    [method=font]
   \setupnote [endnote]
   [location=none]
   \setupnotation [footnote]
   [numberconversion=set 2]
   \setupnotation [footnote]
   [align=hanging]
   \setupwhitespace   [medium]
   \setupbodyfont [libertinus]
   \showframe
   \starttext

   \quotation{{\em Cantharides}} is the reported message from Sir Francis
   Drake upon defeating the Spanish Armada.\endnote{\quotation{{\em
   Vovi}} is
   reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
   are as likely as the attribution of \quotation{{\em peccavi}} to
   Napier after
   his defeat of the Ameer of Scinde.}\footnote{“{\em Vovi}” is
   reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
   are as likely as the attribution of \quotation{{\em peccavi}} to
   Napier after
   his defeat of the Ameer of Scinde.}

   {\tfx This problem appears intractable. See \quotation{Re:
   [NTG-context] Hanging punctuation misalignment in footnotes} on the
   mailing list, where Wolfgang explains that the problem is struts.}

   \placenotes[endnote]

   \stoptext

A solution is welcomed.

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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Rik Kabel via ntg-context

Win 11 64 Intel, Sumatra PDF 3.4.6 to Brother MFC-L2740DW looks good.

Win 11 64 Intel, Sumatra PDF 3.4.6 to HP LJPro M254dw looks good.

Printing via Firefox, as others have noted, is fuzzy, but nothing is 
missing.


--
Rik


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

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


Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Rik Kabel via ntg-context


On 2022-07-12 14:11, Thangalin via ntg-context wrote:

Thank you for the suggestion Hraban.

The source comes from Markdown, which is converted to XML, then 
typeset using ConTeXt. There's no Markdown-specific mechanism to 
relate images to a particular external figure definition, 
unfortunately. All images use the same syntax and are treated the same 
way. The only part that differs is the file name extension (and header 
within the file).


One possibility would be something like:
|\setupexternalfigure[ width=1em, height=1em, order={svg,pdf,png,jpg}, 
location={local,default,global}, ] \defineexternalfigure[png][ 
width=\textwidth, height=\textheight, ] \unprotect 
\let\old_externalfigure=\externalfigure 
\tolerant\def\externalfigure[#1]#,[#2]#,[#3]{% 
\doifelseinstring{.png}{#1}{% \old_externalfigure[#1][png][#2]% }{% 
\doifelsefileexists{#1.png}{% \old_externalfigure[#1.png][png][#2]% 
}{% \old_externalfigure[#1][#2][#3]% }% }% } \protect |

See: https://tex.stackexchange.com/a/650221/2148

I was wondering if there was a simpler or a solution that's more the 
ConTeXt-way?


Thanks again!


Assuming that Pandoc markdown is being used, you should be able to set 
class attributes on each image. You can then associate external figure 
definitions with specific classes, and process each individually. 
(Pandoc user guide, link_attributes 
<https://pandoc.org/MANUAL%202.html#extension-link_attributes>)


--
Rik

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

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


Re: [NTG-context] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Rik Kabel via ntg-context
You left out the comma after the backspace setting. WIth that in, all is 
well.


On 2022-05-27 12:03, Stefan Nedeljkovic via ntg-context wrote:
Thank you very much Aditya for looking into this. But I still have the 
same baseline grid offset problem. Interestingly, when I remove the 
columns, the text shifts downwards by two lines.

My code:

\definemeasure[xheight][0.1in]

\definemeasure[base][3\measured{xheight}]

% Since all distances are in terms of base units, specify the paper 
size in those


% terms as well.

\definepapersize[slide][width=26\measured{base},height=20\measured{base}]

\setuppapersize[slide]

\setupinterlinespace[line=\measure{base}]

\setuplayout

[

topspace=2\measured{base},

header=\zeropoint,

headerdistance=\zeropoint,

height=middle, % Space for 20-4=16 lines

footerdistance=\zeropoint,

footer=\zeropoint,

bottomspace=2\measured{base},

%

cutspace=2\measured{base},

leftmargin=\zeropoint,

leftmargindistance=\zeropoint,

width=middle, % space for 26-4=22 col

rightmargindistance=\zeropoint,

rightmargin=\zeropoint,

backspace=2\measured{base}

grid=yes,

]

\showframe

\showgrid

\starttext

\input tufte

\stoptext

I'm attaching the pdf output.


On Fri, May 27, 2022 at 5:00 PM Aditya Mahajan  wrote:

On Wed, 25 May 2022, Stefan Nedeljkovic via ntg-context wrote:

> Dear list,
>
> My adventures into the world of grids continue. In the linked file
> (slide_grid_overlay.pdf) there are two things I cannot yet achieve:
>
>     1. I want the baseline grid to evenly (vertically) divide
the text
> area, but my code produces a smaller height of the first line and an
> additional space at the bottom.

You did not set footerdistance to zero. So, that takes up some space.

>     2. The number of columns is 21.5, that is the first column
is 0.5 units
> wide and the rest are 1 unit wide.

I believe that columns has to be an integer. Why do you want
fractional columns? Columns are useful because you can say:

\setlayer[name][line=2,column=3]{}

for absolute positioning of layers. So, you can always use:

\setlayer[name][line=2,column=3,x=0.5\measured{base}]{}

to move everything to the right by 0.5 units.

Another option is not to use columns at all, and simply do:

\setlayer[name][line=2,x=3.5\measured{base}]

which will place the layer at 3.5 units from the left edge of the
text area.

> Here is what I got right now:

Currently your textwidth is not a multiple of base units. I have
tweaked the code below so that it is.

\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]

% Since all distances are in terms of base units, specify the
paper size in those
% terms as well.
\definepapersize[slide][width=26\measured{base},height=20\measured{base}]
\setuppapersize[slide]

\setupinterlinespace[line=\measure{base}]

\setuplayout
    [
      topspace=2\measured{base},
      header=\zeropoint,
      headerdistance=\zeropoint,
      height=middle, % Space for 20-4=16 lines
      footerdistance=\zeropoint,
      footer=\zeropoint,
      bottomspace=2\measured{base},
      %
      cutspace=2\measured{base},
      leftmargin=\zeropoint,
      leftmargindistance=\zeropoint,
      width=middle, % space for 26-4=22 col
      rightmargindistance=\zeropoint,
      rightmargin=\zeropoint,
      backspace=2\measured{base},
      %
      columns=22,
      columndistance=1pt,
      %
      grid=yes,
    ]


\showframe
\showgrid

\starttext
\input tufte
\stoptext


Aditya


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

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

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


Re: [NTG-context] Does \startnotallmodes work?

2022-05-10 Thread Rik Kabel via ntg-context

On 2022-05-10 17:39, Gerben Wierda via ntg-context wrote:

Example. Call with

context —mode=FR

- Uncomment the first commented lines. Compilation fails because mode 
FR is on so that works


But I get English anyway. Uncomment the second commented part and it 
fails, but it should not because mode=EN is not turned on.


%\startmode[FR]
%  \BLURBONE
%  \stopmode

\startnotallmodes[FR,RU]% english is the default
\enablemode[EN]
\stopnotallmodes

\startmode[EN]
%  \BLURBTWO
\setuplanguage[en][patterns={en}]
\setupexternalfigure[directory=../LMTX-Output/without-ids/en/ArchiMate 
3.1 Metamodel ESv4]

\stopmode
\startmode[FR]
\setuplanguage[fr][patterns={en,fr}]
\setupexternalfigure[directory=../LMTX-Output/without-ids/fr/ArchiMate 
3.1 Metamodel ESv4]

\stopmode
\startmode[RU]
\setuplanguage[ru][patterns={en,ru}]
\setupexternalfigure[directory=../LMTX-Output/without-ids/ru/ArchiMate 
3.1 Metamodel ESv4]

\stopmode

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
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/>


Gerben,

\startnotallmodes is behaving as it should. Here, it is not the case 
that RU and FR (all the listed modes) are set, so EN is enabled, and you 
actually have both FR and EN set.


Try the following with

   context —mode=FR

and make sure you understand the result.

   \starttext
   \doifmode{EN}{EN is enabled\par}
   \doifmode{FR}{FR is enabled\par}
   \doifmode{RU}{RU is enabled\par}
   \doifmode{FR,RU}{at least one of FR and RU modes is enabled\par}
   \doifmode{EN,RU}{at least one of EN and RU modes is enabled\par}
   \doifmode{EN,FR}{at least one of EN and FR modes is enabled\par}
   \doifmode{EN,FR,RU}{at least one of EN, FR, and RU modes is enabled\par}
   \doifnotmode{EN}{EN is not enabled\par}
   \doifnotmode{FR}{FR is not enabled\par}
   \doifnotmode{RU}{RU is not enabled\par}
   \doifnotmode{EN,RU}{neither EN nor RU is enabled\par}
   \doifnotmode{EN,FR}{neither EN nor FR is enabled\par}
   \doifnotmode{RU,FR}{neither RU nor FR is enabled\par}
   \doifnotallmodes{FR,RU}{all of FR and RU modes are not enabled\par}
   \doifnotallmodes{EN,RU}{all of EN and RU modes are not enabled\par}
   \doifnotallmodes{EN,FR}{all of EN and FR modes are not enabled\par}
   \doifnotallmodes{EN,FR,RU}{all of EN, FR, and RU modes are not
   enabled\par}
   \stoptext

Then, add the following block to the beginning of the file and try again.

   \definemode[EN,FR,RU][keep]
   \doifmodeelse{EN}
  {    \disablemode[FR]
   \disablemode[RU]}
  {\doifmodeelse{FR}
   {   \disablemode[EN]
   \disablemode[RU]}
   {\doifmodeelse{RU}
 { \disablemode[EN]
   \disablemode[FR]}}
 { \enablemode[EN]}}

I find it useful to add such a block to the environment of every file 
that uses mutually-exclusive modes. This version pf the block sets a 
default value if none is on the command line.


--
Rik



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

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


Re: [NTG-context] Citeproc-lua

2022-05-06 Thread Rik Kabel via ntg-context


On 2022-05-06 17:44, Hans Hagen via ntg-context wrote:

[...]
A bit like this:

- Convert the whole bibliography database to html using pandoc in the 
preferred cs rendering. That should be fast.


- Use the normal context commands for referencing a citation (the cite 
part is normally easy as there is not much variation in that; if 
needed one can cheat and also pregenerate that). That's then just some 
relatively small plugin mode.


- When placing the bibliography, filter the right entries from that 
html file (easy) using info that got stored in the tuc.


It is also fast. The only depdency then is pandoc but that is widely 
available (irr). But I would need to see an example of that kind of 
out first. We basically treat the (formatted) bibliography as an 
external resource but in some format that we can easily parse (and if 
needed tweak).


Hans

This is similar to my strategy today. I create a pandoc markdown file 
from my ConTeXt source using a simple script and generate ConTeXt output 
containing just the bibliography using pandoc. This output needs some 
minor tweaks, again scripted, to do things like replace the space in 
/Vol. 999/ with a non-breaking space to keep the following number on the 
same line and to convert /\em/ and such to taggable macros that I define 
in my environment. The result is ConText source that can be further 
edited (if necessary) and inserted where needed/./ I have not extended 
it to multiple bibliographies in  a single document, although that 
should not be difficult.


Another possibility would be for ConTeXt, under control of a flag or 
setting, to generate an editable bibliography file that could be 
included under control of a second flag or setting.


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

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


Re: [NTG-context] embed source-file in pdf

2022-04-19 Thread Rik Kabel via ntg-context


On 2022-04-19 10:47, Heinrich Paeßens via ntg-context wrote:

Hi there

just a quick question:

Is there a command or package to embed the source-file (*.tex) into 
the resulting pdf-file, just like in LaTeX using package »embedall« 
<https://mirror.las.iastate.edu/tex-archive/macros/latex/contrib/embedall/embedall.pdf>?


Many thanks and kind regards

Heinrich

<https://wiki.contextgarden.net/Command/_attachment>


You are looking for attachment 
<https://wiki.contextgarden.net/Command/_attachment>.


Note that the resulting pdf will not pass PDF/A validation, or at least, 
it did not at the last time I tested it a year ago.


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

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


Re: [NTG-context] mkiv

2022-04-01 Thread Rik Kabel via ntg-context


On 2022-04-01 12:20, Hans Hagen via ntg-context wrote:

Hi,

Normally when we're in the 2022 TeXlive code freeze period, there is a 
snapshot release but because there hasn't been that many changes, 
maybe a few patches, in MKIV there is no real snapshot this year. But 
for the sake of consistency we can consider today's version that 
snapshot.


It basically means that MKIV has been frozen and is even more frozen 
now. All new stuff goes in MKXL (aka LMTX) and I suppose that next 
year we let that end up in TeXlive alongside frozen MKII and MKIV. Of 
course bugs will be fixed as usual.


So, today is the day we kind of formally freeze MKIV.

Hans


With the freeze of MKIV, how will modules be managed? LMTX still ships 
without. A while back 
(https://www.mail-archive.com/ntg-context@ntg.nl/msg100179.html) it was 
suggest that this would, at some point, change.


--
Rik

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

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


Re: [NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread Rik Kabel via ntg-context


On 2022-03-20 17:07, Wolfgang Schuster via ntg-context wrote:

Bruce Horrocks via ntg-context schrieb am 20.03.2022 um 21:10:
I'm editing a book that will be printed, however the authors have 
included URLs which will no doubt suffer from "bit rot" in no time at 
all. I think it will make the main text cleaner if I use endnotes 
rather than include the URL in-line in the text or as a (distracting) 
footnote. So when the author writes "See my video at URL>" I will print "See my video at link 1". At the back of the book, 
in an appendix somewhere, I then use \placenotes to display a table 
of the actual URLs for any readers that want to type them in.


I want the "link 1" bit to be normal text rather than superscript so 
it's more visible. Using the \setupnote[textstyle=...] command I can 
change the style of the number but not the superscript placing.


Is there a way to remove the superscript placing, please?


\starttext

First\footnote{Footnote one}

\setupnote[footnote][textcommand=]

First\footnote{Footnote two}

\stoptext

Wolfgang

You might want to define a separate set of notes, for example, 
linknotes, defined as Wolfgang suggests, so


   \setupnote[linknote][textcommand=]

so that they are a separate sequence. These would be used exclusively 
for the url links you describe and regular footnotes would continue to 
be superscript (or however else you choose to treat them). You can 
define multiple streams of footnotes and endnotes.


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

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


Re: [NTG-context] TeX capacity exceeded.... but....

2022-03-17 Thread Rik Kabel via ntg-context

On 2022-03-17 18:14, jbf via ntg-context wrote:

I'd like to understand what is happening in this particular instance:

While playing with a suggestion to a recent request (re 
\currentlistentrynumber etc.) I suddenly got a compiling error:


TeX capacity exceeded, sorry [file=2000].

I returned everything to how it was before I was trying out those 
suggestions, but still got the error, so I began the \stopdocument 
routine fairly early in the document... same problem still. Then I 
brought the \stopdocument well forward, immediately after the standard 
makeup pages and the document compiled. When I removed \stopdocument, 
the entire document compiled as it should.


So the basic question is: what can be causing the error message? This 
has happened to me on two occasions with this document - it occurred 
once before I had even begun experimenting with the \currentlistentry 
options, so I do not think that the problem lies there. And when it 
occurred that time, I again solved it with \stopdocument routine, but 
further into the document. And similarly, once it compiled that far 
and I removed it, the whole document compiled once more.


If it is too complicated an explanation for an email response, maybe 
just point me to a document that explains the issue.


Julian

I cannot explain what is happening, but I can tell you what I do when I 
come across an unexpected failure: I delete the .tuc file (and .tua file 
as well if present) and try again.


This is an easy thing to do before halving the source (moving \stop) and 
such.


--
Rik

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

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


Re: [NTG-context] new upload

2022-03-14 Thread Rik Kabel via ntg-context


On 2022-03-14 04:01, Hans Hagen wrote:

On 3/13/2022 7:58 PM, Rik Kabel via ntg-context wrote:



...



 2. How does the goodies mechanism work when the expected version
    differs from the found version?


we check the version number in the font file (a bit of fuzzyness due 
to the way version numbers ar ento standardized); comparing internals 
would be an option but also a waste of time i think


Understood, but what happens after the check? Is the goodies file used 
even if there is a mismatch, or is it ignored?


--
Rik

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

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


Re: [NTG-context] new upload

2022-03-13 Thread Rik Kabel via ntg-context
' document. We hope you 
enjoy it, at least we did (and so, as we're not finished yet).


Hans

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

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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




With regard to math fonts, I notice that the goodies file for Libertinus 
expects version 6.8 of the font, but the current version (since February 
2021) is 7.040, and much work appears to have gone into the math font.


Two questions, then:

1. Is Libertinus Math considered a "useful" math font?
2. How does the goodies mechanism work when the expected version
   differs from the found version?

(I understand that keeping up with evolving fonts is somewhere between 
difficult and impossible.)


I also note that the typescript for libertinus is quite old and does not 
reflect the semibold variants that have been available for some time. I 
prefer them to the bold variants, and my own typescript for libertinus 
does incorporate them. I am happy to share it if anyone wants it.


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

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


Re: [NTG-context] Few quick questions

2022-03-08 Thread Rik Kabel via ntg-context


On 2022-03-08 14:54, Christoph Hintermüller via ntg-context wrote:

Hi

I'm still stuck with also providing my lecture notes as epub in addtion
to its PDF version.

The last year, when I tried figure what is wrong, Hans indicated a
tool, a program, which allows to verify that that all start* stop* tag
pairs are symmetric and placed in correct order. I just cant remember
how it is called. Can anybody help here?


mtxrun --script check 

--
Rik

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

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


Re: [NTG-context] Font scaling via sa in LMTX

2022-01-21 Thread Rik Kabel via ntg-context


On 2022-01-19 13:34, Hans Hagen wrote:

On 1/19/2022 6:24 PM, Rik Kabel wrote:

On 2021-12-01 10:40, Hans Hagen wrote:

On 11/30/2021 9:36 PM, Rik Kabel via ntg-context wrote:

Hello list,

It seems that font scaling to a letter is not working consistently 
in LMTX.


This example:

    \definefont[TitleA][Sans sa a]
    \definefont[TitleAB][Sansbold sa a]
    \starttext
    {\ssa This is ssa \TitleA and this is TitleA}\par
    {\ssbf This is ssbf \TitleAB and this is TitleAB}\par
    \contextbanner
    \stoptext

Produces different relevant output with each engine.

I suppose one could use numeric values instead of defined font size 
letters as a work-around, but that means lack of coordination with 
custom sizes in \definebodyfontenvironment.


fixed in the next upload (which is a bit experimental in the sense 
that some low level consistency renaming happened which always has 
the danger of disabling some feature)


Hans


This is still a problem using yesterday's upload.

I'll check it but you anyway need SansBold (B)


Thank you for the fix.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Convertnumber with \ref[number] fails in MkIV, works in LMTX

2022-01-19 Thread Rik Kabel via ntg-context

This is still a problem with the current standalone.

   \definelabel[X][text=]
   \startTEXpage[offset=1cm]
  \X\X[a]\X[b]\X\par
  \convertnumber{R}{\ref[number][a]}
  \convertnumber{G}{\ref[number][b]}
   \stopTEXpage

   %% The above example fails to compile when there is no tuc file,
   %%    complaining of a missing number in line 4. When lines 4
   %%    and 5 are removed and the file is compiled, producing
   %%    a .tuc file, and then they are restored, the example
   %%    compiles without error. The effect of having or not having
   %%    an associated .tuc file does seem a bit odd.

Surely there is a way to get the number from a label reference that can 
then be converted to a numeral of choice.


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

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


Re: [NTG-context] undefined control sequence c!symbolcolor in MkIV, was new upload

2022-01-19 Thread Rik Kabel via ntg-context

On 2022-01-15 14:29, Hans Hagen wrote:

On 1/15/2022 7:34 PM, Rik Kabel via ntg-context wrote:

MWE:

    \definelabel[xx][headcolor=red]
    \starttext
    ab\xx
    \stoptext

fails, reporting in log:

    tex error   > tex error on line 4 in file G:/Desktop/mwe.tex: !
    Undefined control sequence

     \c!symbolcolor

    \labelparameter #1->\csname \ifcsname \??labels \currentlabel :#1
    \endcsname \??labels \currentlabel :#1\else \expandafter
    \dolabelparentparameter \csname \??labels \currentlabel :\s!parent
    \endcsname {#1}\fi \endcsname
    \useconstructionstyleandcolor ...pty \else
    \dousecurrentstyleparameter \fi \edef \currentcolorparameter
    {\labelparameter {#2}

MkIV only, no problem in LMTX.

replace by \c!numbercolor and remake the format


This is still (or perhaps once again) a problem using the latest MkIV 
(context --luatex).


--
Rik

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

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


Re: [NTG-context] Font scaling via sa in LMTX

2022-01-19 Thread Rik Kabel via ntg-context

On 2021-12-01 10:40, Hans Hagen wrote:

On 11/30/2021 9:36 PM, Rik Kabel via ntg-context wrote:

Hello list,

It seems that font scaling to a letter is not working consistently in 
LMTX.


This example:

    \definefont[TitleA][Sans sa a]
    \definefont[TitleAB][Sansbold sa a]
    \starttext
    {\ssa This is ssa \TitleA and this is TitleA}\par
    {\ssbf This is ssbf \TitleAB and this is TitleAB}\par
    \contextbanner
    \stoptext

Produces different relevant output with each engine.

I suppose one could use numeric values instead of defined font size 
letters as a work-around, but that means lack of coordination with 
custom sizes in \definebodyfontenvironment.


fixed in the next upload (which is a bit experimental in the sense 
that some low level consistency renaming happened which always has the 
danger of disabling some feature)


Hans


This is still a problem using yesterday's upload.

--
Rik

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

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


[NTG-context] undefined control sequence c!symbolcolor in MkIV, was new upload

2022-01-15 Thread Rik Kabel via ntg-context

MWE:

   \definelabel[xx][headcolor=red]
   \starttext
   ab\xx
   \stoptext

fails, reporting in log:

   tex error   > tex error on line 4 in file G:/Desktop/mwe.tex: !
   Undefined control sequence

\c!symbolcolor

   \labelparameter #1->\csname \ifcsname \??labels \currentlabel :#1
   \endcsname \??labels \currentlabel :#1\else \expandafter
   \dolabelparentparameter \csname \??labels \currentlabel :\s!parent
   \endcsname {#1}\fi \endcsname
   \useconstructionstyleandcolor ...pty \else
   \dousecurrentstyleparameter \fi \edef \currentcolorparameter
   {\labelparameter {#2}

MkIV only, no problem in LMTX.

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

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


[NTG-context] fonts.compact produces compact initials

2022-01-01 Thread Rik Kabel via ntg-context

Enabling compact fonts results in incorrect initials.

   \enableexperiments[fonts.compact]
   \starttext
   \placeinitial
   Tested with \luatexbanner and \ConTeXt\ \contextversion
   \stoptext

Produces (approximately):

  ested with LuaMetaTeX, Version 2.09.35 and ConTEXt 2021.12.30 19:03

   *T*

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

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


Re: [NTG-context] startlines with long lines that break and indent

2021-12-26 Thread Rik Kabel via ntg-context


On 2021-12-26 11:36, juh via ntg-context wrote:

Hi all,

I am looking for a way to make startstoplines likes this:


This is a long line
 that breaks,
the second line,
the third line.

So if a line in the poem is too long it shall break and indent.

TIA
juh


You can play with something based on the following, which I made it 
following suggestions from others. There may well be other ways, but 
this works for me.


   \define\Poemindent{3em}
   \define\Poeminset{14em}
   \definedelimitedtext[Poe]
   \setupwhitespace[medium]
   \showframe

   \startbuffer[Poem]
  This is a long line that breaks,
  the second line,
  the third line.

  The second stanza starts.
   \stopbuffer

   \setupdelimitedtext[Poe][
  rightmargin=\Poeminset,
  leftmargin={\dimexpr\Poemindent+\Poeminset\relax},
  before={\setuplines[
   before=,
    inbetween={\blank[small]},
    after=,
   ]
  \startlines
  \setupindenting[-\Poemindent,yes]
  \startparagraph},
   after=\stopparagraph
 \stoplines,
 ]

   \starttext

   \startparagraph

 Here comes a poem – watch the lines break!

   \stopparagraph

    \startPoe
  \inlinebuffer[Poem]
    \stopPoe

   \startparagraph

 Now, it is gone. Good-bye.

   \stopparagraph

   \stoptext

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

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


Re: [NTG-context] upload

2021-12-24 Thread Rik Kabel via ntg-context

Same with W64 on W11.

On 2021-12-24 17:08, Jairo A. del Rio via ntg-context wrote:

Hi, Hans. In Ubuntu 20.04:

resolvers       > lua > loading file 
'/home/coragyps/lmtx/tex/texmf-context/tex/context/base/mkxl/node-cmp.lmt' 
succeeded


fatal error: storage cannot be marked

Jairo


El vie, 24 dic 2021 a la(s) 13:45, Hans Hagen via ntg-context 
(ntg-context@ntg.nl) escribió:


Hi,

When wrapping up before the weekend I uploaded a new lmtx (bottom
floats
fixed afaiks, but hat mechanism might see some improvements anyway
next
year; exit codes more reliable; some low level tracing; side float
coming loose from section head issue solved; ...).

I'm experimenting with some more efficient low level state info
and in
the process ran into an issue / interference with (also low level)
attributes. I'm not sure if I solved it (work in progress, i need
to run
into another border case first which may take ages) but the test
suite
runs ok so ...

Hans

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

-

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

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

___


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

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

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


Re: [NTG-context] No pagebreak before chapter

2021-12-23 Thread Rik Kabel via ntg-context


On 2021-12-23 14:15, juh via ntg-context wrote:

Dear all,

if I don't want pagebreaks before a chapter, I can do this:

\setuphead
 [chapter,title]
 [style=\tfb,
  align=center,
  number=no,
  after=,
  page=no,
  sectionsegments=chapter,
  header=empty]


In my project this does not work. All chapters start on a new page.

What can I do to debug my code?

I search for "page=" or "pagebreak" but found no configuration that can
cause chapters to insert a pagebreak before.

Merry Chrismas to all of you!
juh

Pagebreak before chapter heading is the default behavior, so you are not 
likely to find an explicit instance of it being set.


Do the other settings in your \setuphead come through (align, style, 
number? What is the scope of the \setuphead command -- is it restricted 
to a particular section block (frontpart, bodypart, backpart, appendix)? 
Is this command overridden by a later \setuphead command within the same 
scope?


--
Rik


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

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


[NTG-context] Font scaling via sa in LMTX

2021-11-30 Thread Rik Kabel via ntg-context

Hello list,

It seems that font scaling to a letter is not working consistently in LMTX.

This example:

   \definefont[TitleA][Sans sa a]
   \definefont[TitleAB][Sansbold sa a]
   \starttext
   {\ssa This is ssa \TitleA and this is TitleA}\par
   {\ssbf This is ssbf \TitleAB and this is TitleAB}\par
   \contextbanner
   \stoptext

Produces different relevant output with each engine.

I suppose one could use numeric values instead of defined font size 
letters as a work-around, but that means lack of coordination with 
custom sizes in \definebodyfontenvironment.


--
Rik

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

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


Re: [NTG-context] directsetup vs setups

2021-11-15 Thread Rik Kabel via ntg-context


On 2021-11-15 04:38, Hans Hagen via ntg-context wrote:

On 11/15/2021 6:24 AM, Rik Kabel via ntg-context wrote:

Hello list,

Can anyone provide a description of, or a point to a description of, 
the differences between setups= and directsetup= for including 
setups? I searched the list archive and the documents and found 
nothing. (That may indicate my level of search foo, but nonetheless I 
am in need of help with this.)

\setup  : takes a list ({...} or [...])
\directsetup: supports gridsnapping, only one setup
\fastsetup  : the fastest, only one setup

concerning performance, i wonder if you'll notice it

\starttext
    \startsetups test
    \stopsetups

    \testfeatureonce{10}{\setup  {test}} \elapsedtime \par
    \testfeatureonce{10}{\setup  [test]} \elapsedtime \par
    \testfeatureonce{10}{\directsetup{test}} \elapsedtime \par
    \testfeatureonce{10}{\fastsetup  {test}} \elapsedtime \par
\stoptext

because often what's done in the setup is taking the time, just test

    \startsetups test
    {\bf}
    \stopsetups

you can volunteer to wikify it

Hans

Happy to wikify once I understand it.

On your empty performance test, I get around 0.10, .11, .08 for direct, 
and 0.4 for fast. With the grouped styling, those balloon to 0.50, 0.56, 
0.48, and 0.44.


So, some follow-up questions:

1. What do you mean by "only one setup" in the description of
   directsetup and fastsetup? I have examples of using two different
   directsetup in one after key, so it does not seem to mean that.
2. What is meant by saying that directsetup supports gridsnapping? Do
   you mean that fastsetup does not? (If that is the case, should a
   module writer not use fastsetup because it might be used in a
   document that requires a grid?)
3. Is the support for {} and [] in setup simply to maintain legacy
   support for {}, or are there reasons to choose one over the other? I
   do see consistently faster times with the curlies.
4. Are there operations that are supported in directsetup that are not
   supported in setup or fastsetup? Are there operations supported in
   fastsetup that are not supported in setup or directsetup?
5. Is it fair to say that setup can do the most, directsetup a bit
   less, and fastsetup is the most restrictive? Except for the most
   performance-constrained documents, setup is a safe choice, but when
   constructing modules or performance tuning, the others might be tested?

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

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


[NTG-context] directsetup vs setups

2021-11-14 Thread Rik Kabel via ntg-context

Hello list,

Can anyone provide a description of, or a point to a description of, the 
differences between setups= and directsetup= for including setups? I 
searched the list archive and the documents and found nothing. (That may 
indicate my level of search foo, but nonetheless I am in need of help 
with this.)


--
Rik

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

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


[NTG-context] Synonyms feature request

2021-11-11 Thread Rik Kabel via ntg-context

Hello developers,

Is it possible to get a mechanism to reset and setup synonyms by way 
(page, part, chapter, section, ...)?


This is not a high-priority request.

I currently accomplish this in the after key of chapter setuphead 
definitions. However, it seems cleaner to define it when the synonym 
list is defined instead of adding a resetshownsynonyms and setsynonyms 
to the chapter definition for every new synonym list.


--
Rik

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

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


Re: [NTG-context] Achieving the effect of \overset outside math mode

2021-11-11 Thread Rik Kabel via ntg-context


On 2021-11-11 21:47, kauśika via ntg-context wrote:

Dear list,

I don't have a MWE per se, but as the title suggests, I want to be able to
achieve the effect of \overset outside math mode. As I understand, \overset
itself is implemented using \mathop and \limits.

Currently to achieve this I have defined some macros using \offset thus :
\define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
Unfortunately, I have to hard code the x values. So I have define several such
macros with different offsets. Not an elegant solution, but it is what I could
muster.

So, my objective is to place a smaller piece of text above another larger
piece of text so that the text above is centered w.r.t the text below.

Please advise.

Thanks,
kauśika


Search for defineruby on the mailing list archives.

--
Rik

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

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


Re: [NTG-context] can typesetbuffer use the same engine?

2021-11-05 Thread Rik Kabel via ntg-context


On 11/5/2021 11:18, Hans Hagen via ntg-context wrote:

On 11/5/2021 3:19 PM, Rik Kabel via ntg-context wrote:

Hello brain trust,

How can \typesetbuffer be instructed to use the same engine as the 
document which contains it?


With the following example:


\startbuffer[Buffer]
   \startTEXpage \contextmark \stopTEXpage
\stopbuffer
\starttext
   \contextmark\
   \typesetbuffer[Buffer]
\stoptext

I get "MKIV LMTX" when it is processed with context --luatex. I want 
the buffer to be processed as MkIV.

Does patching line 691 in buff-ini.lua

    template = (jit and "--jit --engine=luajittex" or 
"--engine=luatex") .. " --purgeall %?path: --path=%path% ?% %filename%",


work okay? Run "context --make" after patching.

Hans

Yes, that seems to do it. context --make and context --make --luatex 
were needed, I think.


--
Rik

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

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


[NTG-context] can typesetbuffer use the same engine?

2021-11-05 Thread Rik Kabel via ntg-context

Hello brain trust,

How can \typesetbuffer be instructed to use the same engine as the 
document which contains it?


With the following example:


\startbuffer[Buffer]
  \startTEXpage \contextmark \stopTEXpage
\stopbuffer
\starttext
  \contextmark\
  \typesetbuffer[Buffer]
\stoptext

I get "MKIV LMTX" when it is processed with context --luatex. I want the 
buffer to be processed as MkIV.


--
Rik

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

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


Re: [NTG-context] new upload

2021-11-02 Thread Rik Kabel via ntg-context


On 11/2/2021 05:43, Hans Hagen via ntg-context wrote:

Hi,

I uploaded a new lmtx. There is a new low level manual 
(lowlevel-localboxes) that describes the extended local boxes 
interface as well as a layer on top. New is that we have classes which 
makes this (engine) mechanism more useable. It definitely is some low 
level mechanism but you can for instance use if for high performance 
efficient maginal notes and line numbering in controlled situations. 
(There is some room fro optimization in the engien but I deal with 
that later.)


Hans



On the first run of MkIV (context --luatex) after updating my 
installation on Win11-x64, I get a complaint just after loading 
.../base/mkiv/syst-mac-lua :


   open source > level 1, order 11, name
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkiv/syst-aux.mkiv'
   resolvers   > lua > loading file
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkiv/syst-aux.lua'
   succeeded
   resolvers   > lua > loading file
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkiv/syst-mac.lua'
   succeeded
   !  needs four hex digits.
   l.1506 {\unless\ifx##2^
      ^^^3}%
   ?

If I let the build proceed, all seems to be well.

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

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


Re: [NTG-context] Convertnumber with \ref[number] fails in MkIV, works in LMTX

2021-10-28 Thread Rik Kabel via ntg-context


On 10/28/2021 02:56, Hans Hagen wrote:

On 10/28/2021 4:58 AM, Rik Kabel via ntg-context wrote:
Following up on my own note, I see that this fails under LMTX if 
compiled in a clean directory, but succeeds if first compiled with 
the troublesome line removed, and then, restoring the line, compiled 
a second time. It also works by placing a .tuc file from an older 
version of the document into the directory before compiling. Very 
strange indeed. The expected output, from one of those successful 
compilations:


So. I am clearly doing something wrong, but sometimes LMTX is letting 
me get away with it.


--
Rik

On 10/27/2021 21:47, Rik Kabel via ntg-context wrote:


Hello list,

The following fails with ConTeXt  ver: 2021.10.24 21:45 MKIV but 
works with the companion LMTX. The error message is:tex error   
> tex error on line 6 in file G:/TestConTeXt/convert.tex: ! 
Incompatible glue units , pointing to the second \convertnumber line.


\definelabel[XX]%[text=,before=,after=,alternative=inright]
    \startTEXpage[offset=2em]
     abc\XX[xx]\par
     \ref[number][xx] ·
     \convertnumber{r}{1} ·
     \convertnumber{R}{\ref[number][xx]}
    \stopTEXpage

In this case I am trying to display with roman numerals the number 
generated in the label created through \definelabel.


Suggestions welcomed.

the conmversion is (partly) done in lua so at some point the

  \ref[number][xx]

gets scanned which is more robust in lmtx than in mkiv

normally one does the conversion differently:

\definelabel[XX][numberconversion=R]
\definelabel[YY][XX][numberconversion=A]

\startTEXpage[offset=2em]
    1: \XX[xx]\par 2: \YY[xx]
\stopTEXpage

Hans



(Resending because attachment was too large.)

That generates a new labeled item albeit with a roman numeral label. I 
am trying to get the value of a previously generated numeric label 
converted roman numerals. So, consider that I have a numeric label 
identifying a paragraph of text. I want to reference that label in 
another place but need to do it in Latin.


I want to convert the original label number to a roman numeral for use 
in that one place, not generate a new label displayed as a roman 
numeral. So,


   \definelabel[XX][text=¶]
   \define\Naa{\ref[number][aa]}
   \define[1]\Nnn{\ref[number][#1]}
   \define\Raa{\convertnumber{R}{\ref[number][aa]}}
   \define[1]\Rnn{\convertnumber{R}{\ref[number][#1]}}
   \startTEXpage[offset=2em]
    Paragraph\XX[aa]\par
    Paragraph\XX[bb]\par
    Paragraph\XX[cc]\par
    1: \Naa\par
    2: \Nnn{bb}\par
   % these fail without an existing tuc file:
    I: {\la Vide paragraphum \Raa.}\par
    II: {\la Vide paragraphum \Rnn{bb}.}
   \stopTEXpage

should produce:

   Paragraph *¶ 1
   *Paragraph *¶ 2*
   Paragraph *¶ 3*
   1: 1
   2: 2
   I: Vide paragraphum I.
   II: Vide paragraphum II.

but this fails without an existing good tuc file. If I comment out the 
two latin lines, compile (to failure), and then uncomment the lines and 
try again, it compiles without error. Does this mean that 
\ref[number][label] does not really return a number as \convertnumber 
expects?


This is the case with today's upload as well (ConTeXt  ver: 2021.10.28 
10:19 LMTX).


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

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


Re: [NTG-context] Convertnumber with \ref[number] fails in MkIV, works in LMTX

2021-10-27 Thread Rik Kabel via ntg-context
Following up on my own note, I see that this fails under LMTX if 
compiled in a clean directory, but succeeds if first compiled with the 
troublesome line removed, and then, restoring the line, compiled a 
second time. It also works by placing a .tuc file from an older version 
of the document into the directory before compiling. Very strange 
indeed. The expected output, from one of those successful compilations:


So. I am clearly doing something wrong, but sometimes LMTX is letting me 
get away with it.


--
Rik

On 10/27/2021 21:47, Rik Kabel via ntg-context wrote:


Hello list,

The following fails with ConTeXt  ver: 2021.10.24 21:45 MKIV but works 
with the companion LMTX. The error message is:tex error   > tex 
error on line 6 in file G:/TestConTeXt/convert.tex: ! Incompatible 
glue units , pointing to the second \convertnumber line.


\definelabel[XX]%[text=,before=,after=,alternative=inright]
\startTEXpage[offset=2em]
 abc\XX[xx]\par
 \ref[number][xx] ·
 \convertnumber{r}{1} ·
 \convertnumber{R}{\ref[number][xx]}
\stopTEXpage

In this case I am trying to display with roman numerals the number 
generated in the label created through \definelabel.


Suggestions welcomed.

--
Rik


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

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

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


[NTG-context] Convertnumber with \ref[number] fails in MkIV, works in LMTX

2021-10-27 Thread Rik Kabel via ntg-context

Hello list,

The following fails with ConTeXt  ver: 2021.10.24 21:45 MKIV but works 
with the companion LMTX. The error message is:tex error   > tex 
error on line 6 in file G:/TestConTeXt/convert.tex: ! Incompatible glue 
units , pointing to the second \convertnumber line.


   \definelabel[XX]%[text=,before=,after=,alternative=inright]
   \startTEXpage[offset=2em]
 abc\XX[xx]\par
 \ref[number][xx] ·
 \convertnumber{r}{1} ·
 \convertnumber{R}{\ref[number][xx]}
   \stopTEXpage

In this case I am trying to display with roman numerals the number 
generated in the label created through \definelabel.


Suggestions welcomed.

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

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


Re: [NTG-context] Failure to compile with new date code

2021-10-25 Thread Rik Kabel via ntg-context
This has been part of my setup interaction for a couple of years. Documents all pass verapdf pdf3a testing.On Oct 25, 2021 15:54, Hans Hagen via ntg-context  wrote:On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:
> On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
>> Hello all,
>>
>> The example below continues to work with MkIV, but now fails with the
>> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
>>
>>  \define\DraftOf   {Draft of \date}
>>  \setupinteraction [date={\DraftOf}]
> 
> Hi Rik,
> 
> \setupinteraction[date=***] only accepts a date as input.
> 
> Would it be possible that it was subtitle or title any of the options
> you used?
we can of course accept anything but because these dates end up in 
different spots it gets hairy ... also it can invalidate a pdf
Hans
-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

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

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


[NTG-context] Failure to compile with new date code

2021-10-25 Thread Rik Kabel via ntg-context

Hello all,

The example below continues to work with MkIV, but now fails with the 
most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:


   \define\DraftOf   {Draft of \date}
   \setupinteraction [date={\DraftOf}]
   \starttext
   Fail with LMTX, works with MkIV.
   \stoptext

If the answer is "don't do that" I can find another way to accomplish 
what this does -- not a big problem. But I do want to point out the 
difference in behavior.


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

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


Re: [NTG-context] resetting setuphyphenatedurl...

2021-10-24 Thread Rik Kabel via ntg-context


On 10/24/2021 06:37, Hans Hagen wrote:

On 10/23/2021 4:53 AM, Rik Kabel via ntg-context wrote:

Hello List,

As demonstrated in the following example, it does not seem possible 
to reset \setuphyphenatedurlbefore, after, or normal once changed 
from default. That is, the first change appears to be global and 
unchangeable.


If this is the case, can someone suggest a workaround?


in lmtx i can add support for grouping (in mkiv it would be a fragile 
hack; these settings happen in lua not in tex)


Hans

Grouping would be great, since one does not have to keep track of the 
setting outside the immediate scope. However, since this is a setup 
function (per the name), perhaps a setup reset function would be an 
option. Could that be done in MkIV as well? In either case, the user 
must be able to assign new values to all three.


Otherwise, an LMTX-only function is preferable to not having a way to do 
it at all.


--
Rik

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

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


[NTG-context] resetting setuphyphenatedurl...

2021-10-22 Thread Rik Kabel via ntg-context

Hello List,

As demonstrated in the following example, it does not seem possible to 
reset \setuphyphenatedurlbefore, after, or normal once changed from 
default. That is, the first change appears to be global and unchangeable.


If this is the case, can someone suggest a workaround?

(Use case: I want to break URLs at any place in a bibliography but have 
additional URLs in text that follows which should be broken only in more 
standard places.)


   \starttext
   \hsize 6em

   Default: \hyphenatedurl{https://wiki.contextgarden.net/URL}

   \blank

   \bgroup
   
\sethyphenatedurlnormal{:=?&/.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}
   
\sethyphenatedurlbefore{:=?&/.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}
   
\sethyphenatedurlafter{:=?&/.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}

   In group: \hyphenatedurl{https://wiki.contextgarden.net/URL}

   \blank
   \egroup

  \sethyphenatedurlnormal{:=?&}
  \sethyphenatedurlbefore{?&}
  \sethyphenatedurlafter{:=}

   Reset: \hyphenatedurl{https://wiki.contextgarden.net/URL}
   \stoptext

--
Rik

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

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


Re: [NTG-context] Clickable url problem with \useurl and \url

2021-10-12 Thread Rik Kabel via ntg-context


On 10/12/2021 03:44, Taco Hoekwater wrote:

Hi,


On 12 Oct 2021, at 04:30, Rik Kabel via ntg-context  wrote:

Hello List,

I notice an inconsistency in the clickable area when using \useurl. With the 
following example, both the \from and the \url are clickable in some lines (as 
noted iin the value of \from) but in others, the \from is clickable but not the 
\url.

It does seem sensitive to the urlL, but I cannot see a pattern.

It is the pdf viewer program that automatically interprets the \url-produced 
text and 'invents' a link, it is not
ConTeXt itself. The exact rules may therefore vary depending on the pdf viewer 
you use.

In Apple's Preview, all items are in fact clickable. But only \from produces 
actual pdf hyperlink annotations.


Should I use something other than \url[earlXX] here to get the clickable 
literal url from useurl?

This, maybe

\goto{\url[earlLH]}[url(earlLH)]

(perhaps wrapped in a short macro)

Best wishes,
Taco

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

Indeed, that is the issue. I use Sumatra by default, but I see different 
results with other viewers. I will follow up, if needed, elsewhere.


And yes, for consistency I will look at something based on \goto to make 
explicit what should and should not be clickable.


Thank you for the explanation and suggestion.

--
Rik

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

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


[NTG-context] Clickable url problem with \useurl and \url

2021-10-11 Thread Rik Kabel via ntg-context

Hello List,

I notice an inconsistency in the clickable area when using \useurl. With 
the following example, both the \from and the \url are clickable in some 
lines (as noted iin the value of \from) but in others, the \from is 
clickable but not the \url.


It does seem sensitive to the urlL, but I cannot see a pattern.

Example:

   \setupinteraction [state=start]
   \useurl[earlBA] [https://www.bartleby.com/sv/welcome.html]
 [] [Not clickable]
   \useurl[earlPD] [https://www.perseus.tufts.edu/hopper/]
 [] [Not clickable]
   \useurl[earlWC] [https://www.worldcat.org/]
 [] [Not clickable]
   \useurl[earlFC] [https://www.futilitycloset.com/]
 [] [Not clickable]
   \useurl[earlQU] [http://www.quote-unquote.org.uk/]
 [] [Not clickable]
   \useurl[earlAL] [https://www.aldaily.com/]
 [] [Not clickable]
   \useurl[earlTL] [http://stephanus.tlg.uci.edu/]
 [] [Not clickable]
   \useurl[earlQI] [https://quoteinvestigator.com/]
 [] [Clickable]
   \useurl[earlLH] [https://languagehat.com/]
 [] [Clickable]
   \useurl[earlSF] [https://stancarey.wordpress.com/]
 [] [Clickable]
   \starttext
   \from[earlLH]  (\url[earlLH]) \par
   \from[earlQI]  (\url[earlQI]) \par
   \from[earlFC]  (\url[earlFC]) \par
   \from[earlWC]  (\url[earlWC]) \par
   \from[earlQU]  (\url[earlQU]) \par
   \from[earlAL]  (\url[earlAL]) \par
   \from[earlSF]  (\url[earlSF]) \par
   \from[earlBA]  (\url[earlBA]) \par
   \from[earlPD]  (\url[earlPD]) \par
   \from[earlTL]  (\url[earlTL]) \par
   \stoptext

Should I use something other than \url[earlXX] here to get the clickable 
literal url from useurl?


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

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


Re: [NTG-context] Undefined control sequence \??markingfilter, with MWE to recreate

2021-10-09 Thread Rik Kabel via ntg-context

Note, this is not a problem in MkIV, just LMTX

On 10/9/2021 15:53, Rik Kabel via ntg-context wrote:


Error with 20211008 ConTeXt:

ConTeXt  ver: 2021.10.08 20:18 LMTX fmt: 2021.10.9  int:
english/english

...

tex error   > tex error on line 1 in file ./mmm.tex: Undefined
control sequence \??markingfilter




    \csname \??markingfilter
    \v!default \endcsname {chapter}
 \sectionheadmarkingtitle
    #1#2->\clf_markingtitle {#1}{#2
    }
 \strc_markings_get_yes
    ...rking \begincsname \??markingclass #1\endcsname
{#2}{#3}}\fi \orelse \ifparameter #2\or \markingcommand
{#1}{\csname \??markingfilter #2\endcsname {#1}}\else
\markingcommand {#1}{\csname \??markingfilter \v!default
\endcsname {#1}}
    \fi \endgroup ...


    \fi
 \page_layouts_process_element_indeed
    ...andcolor #1#2\begincsname \??layouttextstrut
\layoutelementparameter \c!strut \endcsname \ignorecrlf \edef
\p_width {\layoutelementparameter #3}\ifempty \p_width \else
\expandafter \page_layouts_process_element_limited \fi \p_text
    \endgroup
 \currentlayoutelement
    ...kern -\makeupwidth \fi \letfromlayoutelementparameter
\p_text \c!righttext \ifempty \p_text \kern \makeupwidth \else
\hbox to \makeupwidth \bgroup \hss
\page_layouts_process_element_indeed \c!rightstyle \c!rightcolor
\c!rightwidth
    \egroup \fi
 ...


    \stoptext

 1 >>
 2 %\setupheadertexts [][][{\it\getmarking[chapter]}][] % fails
 3 \setupheadertexts [][][{\getmarking[chapter]}][] % fails
 4 %\setupheadertexts [][][\getmarking[chapter]][] % succeeds

MWE to create. Note that the \it is not necessary to trigger the
error, just the braces.

%\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
\setupheadertexts [][][{\getmarking[chapter]}][] % fails
%\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

\starttext

\chapter{abc}
abc
\chapter{def}
def
\stoptext

--
Rik


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

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

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


[NTG-context] Undefined control sequence \??markingfilter, with MWE to recreate

2021-10-09 Thread Rik Kabel via ntg-context

Error with 20211008 ConTeXt:

   ConTeXt  ver: 2021.10.08 20:18 LMTX fmt: 2021.10.9  int: english/english

   ...

   tex error   > tex error on line 1 in file ./mmm.tex: Undefined
   control sequence \??markingfilter



   
    \csname \??markingfilter
    \v!default \endcsname {chapter}
\sectionheadmarkingtitle
    #1#2->\clf_markingtitle {#1}{#2
    }
\strc_markings_get_yes
    ...rking \begincsname \??markingclass #1\endcsname {#2}{#3}}\fi
   \orelse \ifparameter #2\or \markingcommand {#1}{\csname
   \??markingfilter #2\endcsname {#1}}\else \markingcommand
   {#1}{\csname \??markingfilter \v!default \endcsname {#1}}
    \fi \endgroup ...
   

    \fi
\page_layouts_process_element_indeed
    ...andcolor #1#2\begincsname \??layouttextstrut
   \layoutelementparameter \c!strut \endcsname \ignorecrlf \edef
   \p_width {\layoutelementparameter #3}\ifempty \p_width \else
   \expandafter \page_layouts_process_element_limited \fi \p_text
    \endgroup
\currentlayoutelement
    ...kern -\makeupwidth \fi \letfromlayoutelementparameter
   \p_text \c!righttext \ifempty \p_text \kern \makeupwidth \else \hbox
   to \makeupwidth \bgroup \hss \page_layouts_process_element_indeed
   \c!rightstyle \c!rightcolor \c!rightwidth
    \egroup \fi
 ...

   
    \stoptext

 1 >>
 2 %\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
 3 \setupheadertexts [][][{\getmarking[chapter]}][] % fails
 4 %\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

   MWE to create. Note that the \it is not necessary to trigger the
   error, just the braces.

   %\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
   \setupheadertexts [][][{\getmarking[chapter]}][] % fails
   %\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

   \starttext

   \chapter{abc}
   abc
   \chapter{def}
   def
   \stoptext

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

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


Re: [NTG-context] Question on style-italic vs style=italicface

2021-09-26 Thread Rik Kabel via ntg-context

Wolfgang (off-list),

It is simply wrong to say that \italicface as defined gives only \it or 
\bi as a result. Look at the definition. If the current fontalternative 
is it \it it will give a \tf result. It is sensitive to the current 
state in a similar way that \em and \emph are, but it will always give 
an italic or roman result.


--
Rik

On 9/26/2021 18:37, Wolfgang Schuster via ntg-context wrote:

Rik Kabel via ntg-context schrieb am 27.09.2021 um 00:20:


So, I am asking whether, in places where folks often use 
style=italic, it might be better to consider style=italicface.


Bug report: \meaning\italicface gives:

protected macro:\relax \ifx \fontalternative \s!tf \it \orelse
\ifx \fontalternative
\s!bf \bi \else \tf \fi

This leaves out the transition from bi to bf. That transition is done 
by \emph, but \emph may give slanted while \italicface is always italic.




The \italicface command uses either \it or \bi as result but it never 
result in upright text and the "italic" in the name tells you this, 
there are commands (e.g. \boldface) with similar results. To get a 
slanted style you have to use the \slantedface command.


Wolfgang


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

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

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


Re: [NTG-context] Question on style-italic vs style=italicface

2021-09-26 Thread Rik Kabel via ntg-context

On 9/26/2021 16:29, Wolfgang Schuster via ntg-context wrote:

Rik Kabel via ntg-context schrieb am 26.09.2021 um 22:13:


Hello list mavens,

What are the circumstances under which style=italicface should be 
used instead of style=italic. I note a difference when I define 
highlighting. I expected to see no difference in the line before and 
line after the hairline the example below, but see that italicface 
adapts to nesting, while italic does not:


Are there other places where this makes a difference?

\setupbodyfontenvironment
        [default]
    [em=italicface] %same with italic for this example
\definehighlight
    [emIt]
    [style=italic]
\definehighlight
    [emIf]
    [style=italicface]
\definehighlight
    [emEm]
    [style=\em]

\starttext

{\em abc {\em def} ghi}: \type{\em}

\emph{abc {\emph def} ghi}: \type{\emph}

\emEm{abc {\emEm def} ghi}: \type{\emEm \definehighlight[style=\em]}

\emIf{abc {\emIf def} ghi}: \type{\emIf
\definehighlight[style=italicface]}

\hairline

\emIt{abc {\emIt def} ghi}: \type{\emIt
\definehighlight[style=italic]}

\stoptext



The \em command has two special values which are allowed when you 
change the style with


    \setupbodyfontenvironment[default][em=...]

with the value "slanted" and "italic". When you choose one of them the 
result depends on the current weight (\tf or \bf) but with every other 
value you're just using whatever the style command/name provides.



When you pass "italicface" you're using a style which uses either \it 
or \bi dependant on the current weight. The result from the "italic" 
value doesn't depend on the behavior or the normal italic style (\it) 
which is the reason why you get different result when you use \em 
compared with \it.



Example:

\starttext

\tex{it}: normal {\it italic} {\bf bold {\it italic}}

\tex{italicface}: normal {\italicface italic} {\bf bold {\italicface 
italic}}


\tex{em}: normal {\em italic} {\bf bold {\em italic}}

\stoptext


Wolfgang 



Wolfgang,

I understand that mechanism, but I am asking a different question, I think.

When we specify style=\em or style=italic (and most examples I see use 
the later) in a setup of some sort, I think most folks expect similar 
behavior, but clearly it is not because italic does not track changes in 
emphasis. However, style=italicface does seem to match the behavior of 
style=\em (mostly, see the bug report below).


So, I am asking whether, in places where folks often use style=italic, 
it might be better to consider style=italicface.


Bug report: \meaning\italicface gives:

   protected macro:\relax \ifx \fontalternative \s!tf \it \orelse \ifx
   \fontalternative
   \s!bf \bi \else \tf \fi

This leaves out the transition from bi to bf. That transition is done by 
\emph, but \emph may give slanted while \italicface is always italic.


--
Rik

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

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


[NTG-context] Question on style-italic vs style=italicface

2021-09-26 Thread Rik Kabel via ntg-context

Hello list mavens,

What are the circumstances under which style=italicface should be used 
instead of style=italic. I note a difference when I define highlighting. 
I expected to see no difference in the line before and line after the 
hairline the example below, but see that italicface adapts to nesting, 
while italic does not:


Are there other places where this makes a difference?

   \setupbodyfontenvironment
        [default]
    [em=italicface] %same with italic for this example
   \definehighlight
    [emIt]
    [style=italic]
   \definehighlight
    [emIf]
    [style=italicface]
   \definehighlight
    [emEm]
    [style=\em]

   \starttext

   {\em abc {\em def} ghi}: \type{\em}

   \emph{abc {\emph def} ghi}: \type{\emph}

   \emEm{abc {\emEm def} ghi}: \type{\emEm \definehighlight[style=\em]}

   \emIf{abc {\emIf def} ghi}: \type{\emIf
   \definehighlight[style=italicface]}

   \hairline

   \emIt{abc {\emIt def} ghi}: \type{\emIt \definehighlight[style=italic]}

   \stoptext

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

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


Re: [NTG-context] no lua configuration files found

2021-09-19 Thread Rik Kabel via ntg-context


On 9/19/2021 07:46, Henning Hraban Ramm via ntg-context wrote:

I hope it’s again only me being stupid, but when I try to update my LMTX 
installation or make a new one, the install script always fails with the above 
warning.


~/lmtx_2021-09-19 $ . install.sh
mtxrun  | forcing cache reload
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 
'selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
mtx-install | provide valid server and instance

cp: /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun: No such file or 
directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtxrun.lua: 
No such file or directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtx-install.lua:
 No such file or directory

If you want to run ConTeXt everywhere, you need to adapt the path, like:

   export PATH=/Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin:$PATH

If you run from an editor you can specify the full path to mtxrun:

   /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun --autogenerate 
--script context --autopdf ...

The following settings were used:

   server   : lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl
   instance : install-lmtx
   extras   :
   ownpath  : /Users/hraban/lmtx_2021-09-19
   platform : osx-64


It looks like the root path is wrongly assumed, since I run the script from 
~/lmtx_2021-09-19, not just ~

TEXROOT is set to /Users/hraban/lmtx/tex (my previous installation), but get 
the same messages if I run the script there.

Same behavior with osx-64 and linux-64.


Hraban


Same here on Windows 10 x64:

   resolvers   | resolving |
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)
   resolvers   | resolving |
   mtxrun  | the resolver databases are not present or outdated
   mtx-install | provide valid server and instance

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

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


Re: [NTG-context] new upload

2021-08-30 Thread Rik Kabel via ntg-context
The corrected upload (2021.08.30 16:23) still has an issue. The 
--autopdf option results in:


╰─► context --autopdf test.tex
lua error : function call: 
...TX/tex/texmf-context/scripts/context/lua/mtx-context.lua:488: attempt 
to call a nil value (global 'filenewsuffix')


Without autopdf things work as expected.

--
Rik

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

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


Re: [NTG-context] Indexing redux

2021-08-26 Thread Rik Kabel via ntg-context


On 8/26/2021 03:26, Taco Hoekwater wrote:

Hi Rik,


On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context  wrote:

List,

I am trying to create an index with both "see" and "see also" cross-reference entries.[1] At this 
point, ConTeXt provides basic support for "see" entries via the \seeREGISTER command (it does not properly 
support references to sub-entries) and it provides no support at all for "see also" entries.

Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner of 
\writetolist or \writebetweenlist? (MkII has \writetoregister, but that did not 
carry forward and I do not know if it would have helped here.)


Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best 
bet is to create an
actual functional example along with an explanation of what you want the 
typeset result to look
like in the cases where it is not doing what you want.

Generally, explicit examples / test files are the best way to get replies to 
questions
(either by Hans or anyone else).


The following produces what I am looking for, and a bit more. Page 3 of 
the output shows what I would like to see, page 4 is the generated 
index. I don't really need the "see under" and "see also under" 
variants, but they would be nice to have. I am indifferent to having 
stops before "see also"s. I would like to be able to turn checking on or 
off, so that generic directives (in the example, see also specific 
breeds) will not generate an error, while the Ford Prefect example will 
generate an error.



   \defineprocessor[also][color=blue]
   \defineprocessor[under][color=green]
   \defineprocessor[alsounder][color=orange]
   \define\seealsoindex\seeindex
   \define\seealsounderindex\seeindex
   \define\seeunderindex\seeindex
   \setupinteraction [state=start]
   \setupregister    [index][balance=no,check=no]

   %% seeindex entries may start on the same line as their head entry
   \seeindex {dog breeds+Wiener dog}{dog breeds+Dachshund}
   %%  The next example should not work,
   %%    since there is no main entry /Adams, Douglas/
   \seeindex {Prefect, Ford}{Adams, Douglas}

   %%  When referring to a subentry, the target must be a subentry,
   %%    but should display as if a main entry. The next example
   %%    should point to the /Adams+Douglas/ subentry, but it
   %%    should be formatted as if it were /Adams, Douglas/
   \seeindex {Dent, Arthur}{Adams+Douglas}

   %% The following two work as expected
   \seeindex {Matilda effect}{obliteration}
   \seeindex {Marut, Ret}{Traven, B.}

   %% seealso should be placed after as a subentry after real page
   references
   %% seealso should have an appropriate label (default English /see also/)
   \seealsoindex {pseudepigraphy}{also->obliteration}
   \seealsoindex {dog breeds}{also->breeding programs}
   \seealsoindex {dog breeds}{also->specific breeds}
   %% seealsounder is like seealso except that it refers to a main entry
   \seealsounderindex{Coton de Tulear}{alsounder->dog breeds}
   %% seeunder also is like seealso except that it refers to a main entry
   \seeunderindex    {Weimaraner}{under->dog breeds}
   \starttext
 Stuff
 \index{obliteration}
 \index{Adams+Douglas}\index{Adams+John}
 \index{Beagle}
 \index{dog breeds+Beagle}
 \index{dog breeds+Coton de Tulear}
 \index{dog breeds+Dachshund}
 \index{dog breeds+Weimaraner}
   \page
 More stuff
 \index{Adams+John Quincy}
 \index{misquotation}
 \index{pseudepigraphy}
 \index{Traven, B.}
 \index{Beagle}
 \index{Coton de Tulear}
 \index{breeding programs}
   \page
   \definedescription[Index][headstyle=bold,alternative=top,inbetween=]
   \startIndex{a}
 Adams\par
 \quad \reference[AdamsDouglas]{Adams, Douglas}Douglas\quad 1\par
 \quad John\quad 1\par
 \quad John Quincy\quad 2\par
   \stopIndex
   \startIndex{b}
 Beagle\quad 1, 2\par
 \reference[breedingprograms]{breeding programs}breeding
   programs\quad 2
   \stopIndex
   \startIndex{c}
 Coton de Tulear\quad 2.\par
 \quad {\em See also under} \in[dogbreeds]
   \stopIndex
   \startIndex{d}
 \reference[DentArthur]{Dent, Arthur}Dent, Arthur {\em see}
   \in[AdamsDouglas]\par
 \reference[dogbreeds]{dog breeds}dog breeds\par
 \quad \reference[dbBeagle]{dog breeds, Beagle}Beagle\quad 1\par
 \quad \reference[dbCoton]{dog breeds, Coton}Coton de
   Tulear\quad 1\par
 \quad \reference[dbDachshund]{dog breeds,
   Dachshund}Dachshund\quad 1\par
 \quad \reference[dbWeimaraner]{dog breeds,
   Weimarane

[NTG-context] Indexing redux

2021-08-25 Thread Rik Kabel via ntg-context

List,

I am trying to create an index with both "see" and "see also" 
cross-reference entries.[1] At this point, ConTeXt provides basic 
support for "see" entries via the \seeREGISTER command (it does not 
properly support references to sub-entries) and it provides no support 
at all for "see also" entries.


Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner 
of \writetolist or \writebetweenlist? (MkII has \writetoregister, but 
that did not carry forward and I do not know if it would have helped here.)


I had brought this up to no response a couple of years ago.[2] I am 
hopeful that LMTX may offer a chance to get support for improved 
indexing, and in particular for "see" and "see also" entries.


[1] For definitions and usage of "see" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see.html. 
For "see also" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see-also.html. 
For a deeper dive, see the publicly available University of Chicago 
Manual of Style version 15 guide, chapter 18, available at 
https://press.uchicago.edu/Misc/Chicago/CHIIndexingComplete.pdf, or more 
recent versions not yet freely available online.


[2] See "Possible seeindex enhancement" at 
https://www.mail-archive.com/ntg-context@ntg.nl/msg89470.html.


--
Rik


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

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


Re: [NTG-context] Different footers for frontmatter and bodymatter

2021-08-18 Thread Rik Kabel via ntg-context


On 8/18/2021 05:32, noib3 via ntg-context wrote:
I'd like to have two different footer setups: one for the frontmatter 
(titlepage and table of contents) where the page number in roman 
numerals is reported as a single centered footer. Another for the 
bodymatter where the chapter is on the left footer and the pagenumber 
is on the right.


I can switch between roman numerals and numbers with

```
\defineconversionset
  [frontpart:pagenumber]
  []
  [romannumerals]

\defineconversionset
  [bodypart:pagenumber]
  []
  [numbers]
```

but I can't figure out how to have two different footer setups. Right 
now I have


```
\setupfootertexts
  [chapter]
  [pagenumber]
```


There are a few ways to do this.

 * You can explicitly change the footer settings in the body of the
   document (after \starttext) at any time. If placed within a group,
   the command is local to that group and reverts after the group is
   closed. If not, it applies to the remainder of the document unless
   otherwise overridden. This can be useful for a special page.
 * You can set it in the preamble within
   \startsectionblockenvironment[partname]..\stopsectionblockenvironment
   (where you can also define the number conversion. This is probably
   the easiest way to do it for documents differently-styled blocks.
 * You can forgo the \setupfootertexts commands completely and place
   the desired text in a separate layer. This may allow more precise
   control of the placement and formatting.

No doubt there are other mechanisms as well.

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

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


Re: [NTG-context] New error "page order problem in tree at page"

2021-08-05 Thread Rik Kabel via ntg-context


On 8/5/2021 18:04, Hans Hagen wrote:

On 8/4/2021 9:26 PM, Rik Kabel via ntg-context wrote:

With today's LMTX release I see the warning:

    backend > tags > beware: page order problem in tree at 
page 1


This appears to be recently introduced to the code.

Should it be a concern? If so, where should I look to remedy it?


mwe ...


Here it is:

   \setuptagging [state=start]
   \starttext
 The problem involves tagging.
   \stoptext

This produces, in relevant part:

   system  >
   system  > ConTeXt  ver: 2021.08.06 01:21 LMTX  fmt:
   2021.8.5  int: english/english
   system  >
   system  > 'cont-new.mkxl' loaded
   open source > level 1, order 1, name
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
   system  > beware: some patches loaded from cont-new.mkiv
   close source    > level 1, order 1, name
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
   system  > files > jobname 'G:/order', input 'G:/order.tex',
   result 'G:/order'
   fonts   > latin modern fonts are not preloaded
   languages   > language 'en' is active
   open source > level 1, order 2, name
   'G:/Projects/Quotations/ConTeXt version/development/order.tex'
   fonts   > preloading latin modern fonts (second stage)
   fonts   > 'fallback modern-designsize rm 12pt' is loaded
   *backend > tags > beware: page order problem in tree at page 1*
   backend > xmp > using file
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
   pages   > flushing realpage 1, userpage 1, subpage 1
   close source    > level 1, order 2, name 'G:/order.tex'
   system  > start used files
   system  > text: order
   system  > stop used files
   system  > start used files

--
Rik

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

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


[NTG-context] \note[xx] gives unknown reference for \startfootnote, ok for \footnote

2021-08-04 Thread Rik Kabel via ntg-context

The following example:

   \starttext

   abc\footnote[fn:abc]{footnote abc}\ abc

   def
   \startfootnote[fn:def]
 footnote def
   \stopfootnote
   \ def

   No problem here: abc\note[fn:abc]

   Problem appears here: def\note[fn:def]

   \stoptext

Generates a missing reference error for a reference provided on 
\startfootnote (and \startendnote) accessed by \note:


   references  > start missing references
   references  >    1  [][fn:def]
   references  > stop missing references

ConTeXt  ver: 2021.08.04 17:51 LMTX  fmt: 2021.8.4

There was no problem with previous versions.

--
Rik

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

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


[NTG-context] New error "page order problem in tree at page"

2021-08-04 Thread Rik Kabel via ntg-context

With today's LMTX release I see the warning:

   backend > tags > beware: page order problem in tree at page 1

This appears to be recently introduced to the code.

Should it be a concern? If so, where should I look to remedy it?

--
Rik

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

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


[NTG-context] Modules under LMTX, was Re: Use of lettrine module in LMTX

2021-07-25 Thread Rik Kabel

On 7/25/2021 16:14, Nicola wrote:

On 2021-07-23, Arthur Rosendahl  wrote:

On Fri, Jul 23, 2021 at 03:10:59PM +0200, Gerben Wierda wrote:

I just made a remark on ConTeXtgarden not mentioning this.

I am guilty and apologize for the bad advice. But I'd like to point out
that not *all* the modules are out of date, so you may still want to
retain the directory. For instance, the one I rely upon is the vim
module for typesetting code, and that one is compatible with LMTX. There
may be others.

Nicola


Indeed, there are modules that appear to work perfectly well with LMTX.

The fancybreak module has no issues in the way I use it.

Perhaps a list of modules known to run correctly with LMTX is called 
for, and perhaps a classification of modules to indicate which ConTeXt 
versions each supports, and a way to download a distribution-appropriate 
subset.


--
Rik

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

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


Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread Rik Kabel
\stoppart
\startpart[title=Part 2]
\dorecurse{3}{
  \startchapter[title=Chapter #1]
    If a man wants to read good books, he must make a point of
    avoiding bad ones; for life is short, and time and energy
    limited.
    \startfootnote
  T.\,Baily Saunders’ translation, in his 1891 {\em
  The Art of Literature}, of part of one of Arthur
  Schopenhauer’s essays.
    \stopfootnote
    \startEndnote
  {\language[deo]%
  Um das Gute zu lesen, ist eine Bedingung, dass man das
  Schlechte nicht lese: denn das Leben ist kurz, Zeit und
  Kräfte beschränkt.}
    \stopendnote

    \dorecurse{6}{
  \startsection[title=Section ##1]
    This followed by:

    {\it Repetitio est mater studiorum}. Any book that is at
    all important ought to be at once read through twice;
    partly because, on a second reading, the connection of the
    different portions of the book will be better understood,
    and the beginning comprehended only when the end is known;
    and partly because we are not in the same temper and
    disposition on both readings. On the second perusal we get a
    new view of every passage and a different impression of the
    whole book, which then appears in another light.
  \startEndnote
    {\language[deo]%
    Repetitio est mater studiorum. Jedes irgend wichtige
    Buch soll man sogleich zwei Mal lesen, theils weil man
    die Sachen das zweite Mal in ihrem Zusammenhange besser
    begreift und den Anfang erst recht versteht, wenn man
    das Ende kennt; theils weil man zu jeder Stelle das
    zweite Mal eine andere Stimmung mit bringt, als beim
    ersten, wodurch der Eindruct verschieden ausfällt und
    es ist, wie wenn man einen Gegenstand in anderer
    Beleuchtung sieht.}
  \stopendnote
  \stopsection
    }
  \stopchapter
}
\endnoteChapter
\stoppart

\stoptext
%--%

--
Rik

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

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


[NTG-context] log: use \thinspace instead of \,

2021-06-28 Thread Rik Kabel

All,

Examining recent log files, I see the message

   suggestion  > use \thinspace instead of \,

When was this instituted?

What does it mean? Has \, been deprecated? For many years it was 
recommended as a short form of \thinspace, and implementing the 
replacement would certainly result in much less readable source.


--
Rik

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

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


Re: [NTG-context] Soft-hyphen in Antykwa.

2021-06-27 Thread Rik Kabel


On 6/27/2021 14:14, Rik Kabel wrote:


On 6/27/2021 07:46, Hans Hagen wrote:

On 6/27/2021 12:38 AM, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska 
Condensed (in headings in the margin), I now have no hyphen at a 
word break, and see the following in the log:


    fonts   > checking > char ­ (U+000AD) in font
    'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  
ver: 2021.06.25 22:49 LMTX).


fixed in next upload


Thank you for the fix.

For the record, I note that this is still a problem in MkIV.

And additionally, for the record, erasing the font cache and 
regenerating got it back for MkIV (via --luatex).


--
Rik

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

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


Re: [NTG-context] Soft-hyphen in Antykwa.

2021-06-27 Thread Rik Kabel


On 6/27/2021 07:46, Hans Hagen wrote:

On 6/27/2021 12:38 AM, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, 
and see the following in the log:


    fonts   > checking > char ­ (U+000AD) in font
    'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  
ver: 2021.06.25 22:49 LMTX).


fixed in next upload


Thank you for the fix.

For the record, I note that this is still a problem in MkIV.

--
Rik

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

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


Re: [NTG-context] Soft-hyphen in Antykwa.

2021-06-26 Thread Rik Kabel



On 6/26/2021 18:38, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, and 
see the following in the log:


fonts   > checking > char ­ (U+000AD) in font
'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  ver: 
2021.06.25 22:49 LMTX).




More information, sorry for the lack of detail in the first post.

1. The problem appears to be associated with tagging. Set the state to 
stop, or remove the line, and the hyphen appears.


2. When HeadFont is libertinus, there is no problem.

Sample document:

\definefontfamily  [HeadFont]
   [rm]
   [Antykwa Torunska Cond]
\setuphead [chapter]
   [style=\HeadFont\tfa]
\setuphead [section]
   [alternative=margintext,
before={\blank[big]\blank},
insidesection={\blank[-line]\setupindenting[next]},
style=\HeadFont\tf]
\setupindenting[yes,
small]
\setuptagging  [state=start]
\setupbodyfont [libertinus,12pt]
\starttext
  \startchapter[title=Testing Antykwa Torunska Condensed breaks]
\input klein
\startsection  [title=Abracadabra]
  \input knuth
\stopsection
  \stopchapter
\stoptext

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

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


  1   2   3   4   5   6   >