> On 1 Sep 2024, at 03:53, Rik Kabel <cont...@rik.users.panix.com> wrote:
> 
> Hello all,
> I am trying to implement some style-guide-defined (Chicago 17, and now, 18) 
> requirements to the end notes in a book. The need is to insert non-end-note 
> text into the list of end notes. But end notes are not a list (as far as I 
> can see) and \writetolist and such are no help.
> The text to be inserted is of two types. The first is the name of the chapter 
> from which the following notes were generated. It would be nice to 
> automatically generate these.
> The second type is pseudo-end-notes crediting the book and chapter epigraphs, 
> which should appear as unnumbered end notes (at the start of the note section 
> and the start of each chapter's notes). Ideally these would be generated in 
> the same way as regular end notes but will not increment the note numbers 
> (and should not, at least in my use case, require cross-referencing or 
> bookmarking).
> I can hack the first requirement with:
> \define[1]\EndNoteChapter{\testpage[3]
>                           \blank
>                           \midaligned{\tfa{Chapter #1}}
>                           \blank}
> in the environment and
> \EndNoteChapter{6 How I Saved the World}
> at the end of the last end note in the preceding chapter, but this is 
> obviously prone to mistakes. I would rather integrate the handling into the 
> chapter heading environment.
> I suppose that this hack might be extended to handle the epigraph notes as 
> well, but it is just a hack.
> Has anyone successfully dealt with this before? If not, is there the 
> possibility of adding similar functionality to \writetolist and such for end 
> note structures?

Here’s a bit of a hack for the chapter splitting and might also enable the 
epigraphs for you as well (not quite sure what these should look like from your 
description.)

\definenote[mynote]
\setupnote[mynote][location=text]
\setupnotation[mynote][]

\definenote[chapone][mynote]
\definenote[chaptwo][mynote]
\definenote[chapthree][mynote] % etc

\starttext

\startchapter[title={AAA}]
\def\note#1{\chapone{#1}}
\dorecurse{15}
{ See my note at \note{something important}. }
\stopchapter

\startchapter[title={BBB}]
\def\note#1{\chaptwo{#1}}
\dorecurse{5}
{ See my note at \note{something important}. }
\stopchapter

\title{Endnotes}
Chapter 1 notes
\placenotes[chapone]
\blank[2*line]

Chapter 2 notes
\placenotes[chaptwo]

\stoptext


—
Bruce Horrocks
Hampshire, UK

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

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

Reply via email to