ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Heading for endnotes / grouped by chapter endnotes
@ 2021-06-24 11:05 denis.maier
  2021-06-29 10:53 ` denis.maier
  0 siblings, 1 reply; 12+ messages in thread
From: denis.maier @ 2021-06-24 11:05 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 863 bytes --]

Hi,

I have two questions regarding endnotes:

1. Is there a way to add a heading automatically to the endnotes placed with \placenotes[endnote]?

2. I reset the endnote number at each part. Is there a way to insert the title of the corresponding part heading to the endnotes?

I have searched the wiki and the mailing list, and I've found two relevant questions, but no answers.
https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html
https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html

Best,
Denis

===================================
\setuphead[part][placehead=yes]
\setupnotation
  [endnote]
  [way=bypart]

\starttext

\part{First Part}
asdf\endnote{asdf}

jklö\endnote{jklö}


\part{Second Part}

asdf\endnote{asdf}

jklö\endnote{jklö}


\placenotes[endnote]

\stoptext
=============================

[-- Attachment #1.2: Type: text/html, Size: 4669 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-24 11:05 Heading for endnotes / grouped by chapter endnotes denis.maier
@ 2021-06-29 10:53 ` denis.maier
  2021-06-29 14:20   ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: denis.maier @ 2021-06-29 10:53 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1221 bytes --]

Hi,

may I reask the question from below? Would be really great if something grouped endnotes were possible...

Best
Denis

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von denis.maier@unibe.ch
Gesendet: Donnerstag, 24. Juni 2021 13:05
An: ntg-context@ntg.nl
Betreff: [NTG-context] Heading for endnotes / grouped by chapter endnotes

Hi,

I have two questions regarding endnotes:

1. Is there a way to add a heading automatically to the endnotes placed with \placenotes[endnote]?

2. I reset the endnote number at each part. Is there a way to insert the title of the corresponding part heading to the endnotes?

I have searched the wiki and the mailing list, and I've found two relevant questions, but no answers.
https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html
https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html

Best,
Denis

===================================
\setuphead[part][placehead=yes]
\setupnotation
  [endnote]
  [way=bypart]

\starttext

\part{First Part}
asdf\endnote{asdf}

jklö\endnote{jklö}


\part{Second Part}

asdf\endnote{asdf}

jklö\endnote{jklö}


\placenotes[endnote]

\stoptext
=============================

[-- Attachment #1.2: Type: text/html, Size: 5696 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-29 10:53 ` denis.maier
@ 2021-06-29 14:20   ` Hans Hagen
  2021-06-30  8:06     ` denis.maier
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2021-06-29 14:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users, denis.maier

On 6/29/2021 12:53 PM, denis.maier@unibe.ch wrote:
> Hi,
> 
> may I reask the question from below? Would be really great if something 
> grouped endnotes were possible...

i need some lines to the code base for that (everything is actually 
already in place to support that)


\setuphead[part][placehead=yes]

\setupnotes
   [endnote]
   [way=bypart]

\setupnotes
   [endnote]
   [location=list]

\starttext

\part{First Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\part{Second Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\page

\setuplist
   [part]
   [after={\blank[samepage,big]\placelist[endnote][criterium=part]}]

\placelist
   [part]
   [criterium=all]

% \placelist
%   [endnote]
%   [criterium=text]

\stoptext

You can always ask for alist of notes but in this case there have not 
yet notes been flushed so that's what i need to add.

Hans


> Best
> 
> Denis
> 
> *Von:*ntg-context <ntg-context-bounces@ntg.nl> *Im Auftrag von 
> *denis.maier@unibe.ch
> *Gesendet:* Donnerstag, 24. Juni 2021 13:05
> *An:* ntg-context@ntg.nl
> *Betreff:* [NTG-context] Heading for endnotes / grouped by chapter endnotes
> 
> Hi,
> 
> I have two questions regarding endnotes:
> 
> 1. Is there a way to add a heading automatically to the endnotes placed 
> with \placenotes[endnote]?
> 
> 2. I reset the endnote number at each part. Is there a way to insert the 
> title of the corresponding part heading to the endnotes?
> 
> I have searched the wiki and the mailing list, and I’ve found two 
> relevant questions, but no answers.
> 
> https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html 
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html>
> 
> https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html 
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html>
> 
> Best,
> 
> Denis
> 
> ===================================
> 
> \setuphead[part][placehead=yes]
> 
> \setupnotation
> 
>    [endnote]
> 
>    [way=bypart]
> 
> \starttext
> 
> \part{First Part}
> 
> asdf\endnote{asdf}
> 
> jklö\endnote{jklö}
> 
> \part{Second Part}
> 
> asdf\endnote{asdf}
> 
> jklö\endnote{jklö}
> 
> \placenotes[endnote]
> 
> \stoptext
> 
> =============================
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 


-- 

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-29 14:20   ` Hans Hagen
@ 2021-06-30  8:06     ` denis.maier
  2021-06-30  9:27       ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: denis.maier @ 2021-06-30  8:06 UTC (permalink / raw)
  To: j.hagen, ntg-context

> -----Ursprüngliche Nachricht-----
> Von: Hans Hagen <j.hagen@xs4all.nl>
> Gesendet: Dienstag, 29. Juni 2021 16:20
> An: mailing list for ConTeXt users <ntg-context@ntg.nl>; Maier, Denis Christian
> (UB) <denis.maier@unibe.ch>
> Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes
> 
> On 6/29/2021 12:53 PM, denis.maier@unibe.ch wrote:
> > Hi,
> >
> > may I reask the question from below? Would be really great if
> > something grouped endnotes were possible...
> 
> i need some lines to the code base for that (everything is actually already in
> place to support that)
> 
[...]

That looks very promising. Would be great if that missing piece could be added!

Thanks for your help
Denis

> 
> Hans
> 
> 
> > Best
> >
> > Denis
> >
> > *Von:*ntg-context <ntg-context-bounces@ntg.nl> *Im Auftrag von
> > *denis.maier@unibe.ch
> > *Gesendet:* Donnerstag, 24. Juni 2021 13:05
> > *An:* ntg-context@ntg.nl
> > *Betreff:* [NTG-context] Heading for endnotes / grouped by chapter
> endnotes
> >
> > Hi,
> >
> > I have two questions regarding endnotes:
> >
> > 1. Is there a way to add a heading automatically to the endnotes placed
> > with \placenotes[endnote]?
> >
> > 2. I reset the endnote number at each part. Is there a way to insert the
> > title of the corresponding part heading to the endnotes?
> >
> > I have searched the wiki and the mailing list, and I've found two
> > relevant questions, but no answers.
> >
> > https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html
> > <https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html>
> >
> > https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html
> > <https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html>
> >
> > Best,
> >
> > Denis
> >
> > ===================================
> >
> > \setuphead[part][placehead=yes]
> >
> > \setupnotation
> >
> >    [endnote]
> >
> >    [way=bypart]
> >
> > \starttext
> >
> > \part{First Part}
> >
> > asdf\endnote{asdf}
> >
> > jklö\endnote{jklö}
> >
> > \part{Second Part}
> >
> > asdf\endnote{asdf}
> >
> > jklö\endnote{jklö}
> >
> > \placenotes[endnote]
> >
> > \stoptext
> >
> > =============================
> >
> >
> >
> ________________________________________________________________
> ___________________
> > 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
> >
> ________________________________________________________________
> ___________________
> >
> 
> 
> --
> 
> -----------------------------------------------------------------
>                                            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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30  8:06     ` denis.maier
@ 2021-06-30  9:27       ` Hans Hagen
  2021-06-30 14:57         ` denis.maier
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2021-06-30  9:27 UTC (permalink / raw)
  To: denis.maier, mailing list for ConTeXt users

On 6/30/2021 10:06 AM, denis.maier@unibe.ch wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: Hans Hagen <j.hagen@xs4all.nl>
>> Gesendet: Dienstag, 29. Juni 2021 16:20
>> An: mailing list for ConTeXt users <ntg-context@ntg.nl>; Maier, Denis Christian
>> (UB) <denis.maier@unibe.ch>
>> Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes
>>
>> On 6/29/2021 12:53 PM, denis.maier@unibe.ch wrote:
>>> Hi,
>>>
>>> may I reask the question from below? Would be really great if
>>> something grouped endnotes were possible...
>>
>> i need some lines to the code base for that (everything is actually already in
>> place to support that)
>>
> [...]
> 
> That looks very promising. Would be great if that missing piece could be added!
it's in the latest


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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30  9:27       ` Hans Hagen
@ 2021-06-30 14:57         ` denis.maier
  2021-06-30 16:09           ` Hans Hagen
  2021-06-30 19:39           ` Rik Kabel
  0 siblings, 2 replies; 12+ messages in thread
From: denis.maier @ 2021-06-30 14:57 UTC (permalink / raw)
  To: j.hagen, ntg-context


[-- Attachment #1.1.1: Type: text/plain, Size: 2288 bytes --]



> -----Ursprüngliche Nachricht-----

> Von: Hans Hagen <j.hagen@xs4all.nl>

> Gesendet: Mittwoch, 30. Juni 2021 11:28

> An: Maier, Denis Christian (UB) <denis.maier@unibe.ch>; mailing list for

> ConTeXt users <ntg-context@ntg.nl>

> Betreff: Re: AW: [NTG-context] Heading for endnotes / grouped by chapter

> endnotes

>

> On 6/30/2021 10:06 AM, denis.maier@unibe.ch wrote:

> >> -----Ursprüngliche Nachricht-----

> >> Von: Hans Hagen <j.hagen@xs4all.nl>

> >> Gesendet: Dienstag, 29. Juni 2021 16:20

> >> An: mailing list for ConTeXt users <ntg-context@ntg.nl>; Maier, Denis

> >> Christian

> >> (UB) <denis.maier@unibe.ch>

> >> Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter

> >> endnotes

> >>

> >> On 6/29/2021 12:53 PM, denis.maier@unibe.ch wrote:

> >>> Hi,

> >>>

> >>> may I reask the question from below? Would be really great if

> >>> something grouped endnotes were possible...

> >>

> >> i need some lines to the code base for that (everything is actually

> >> already in place to support that)

> >>

> > [...]

> >

> > That looks very promising. Would be great if that missing piece could be

> added!

> it's in the latest



Cool. Thanks. So again something to be wikified.

Two questions related to this relying on the list mechanism:



1. You use this to flush the notes

\setuplist

   [part]

   [after={\blank[samepage,big]\placelist[endnote][criterium=part]}]



\placelist

   [part]

   [criterium=all]

Will this interfere with how parts are displayed in the regular table of contents?



2. Does this treat endnotes just like a list entry, with page numbers and so?



And, something seems to e wrong with the numbering of the notes:

[cid:image001.png@01D76DD1.032A3850]



The endnote marks in the text are correct.



Best,

Denis





>

>

> -----------------------------------------------------------------

>                                            Hans Hagen | PRAGMA ADE

>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands

>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

> -----------------------------------------------------------------

[-- Attachment #1.1.2: Type: text/html, Size: 7916 bytes --]

[-- Attachment #1.2: image001.png --]
[-- Type: image/png, Size: 15458 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30 14:57         ` denis.maier
@ 2021-06-30 16:09           ` Hans Hagen
  2021-06-30 16:15             ` Hans Hagen
  2021-06-30 19:04             ` denis.maier
  2021-06-30 19:39           ` Rik Kabel
  1 sibling, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2021-06-30 16:09 UTC (permalink / raw)
  To: denis.maier, ntg-context

On 6/30/2021 4:57 PM, denis.maier@unibe.ch wrote:

> Cool. Thanks. So again something to be wikified.
> 
> Two questions related to this relying on the list mechanism:
> 
> 1. You use this to flush the notes
> 
> \setuplist
> 
>     [part]
> 
>     [after={\blank[samepage,big]\placelist[endnote][criterium=part]}]
> 
> \placelist
> 
>     [part]
> 
> [criterium=all]
> 
> Will this interfere with how parts are displayed in the regular table of 
> contents?

sure but you can group

\start
   .. flush the list
\stop

although it's not really needed when you do this at the end of the document

> 2. Does this treat endnotes just like a list entry, with page numbers 
> and so?

indeed

> And, something seems to e wrong with the numbering of the notes:
> 
> The endnote marks in the text are correct.

i need to check that, we actually need a dedicated list handler

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30 16:09           ` Hans Hagen
@ 2021-06-30 16:15             ` Hans Hagen
  2021-06-30 19:04             ` denis.maier
  1 sibling, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2021-06-30 16:15 UTC (permalink / raw)
  To: denis.maier, ntg-context

This is the right test:

\setuphead[part][placehead=yes]

\setupnotations
   [endnote]
   [way=bypart]

\setupnotes
   [endnote]
   [location=list]

\starttext

\part{First Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\part{Second Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\page

\setuplist
   [part]
   [after={\blank[samepage,big]\placelist[endnote]}]

\blank

\placelist
   [part]
   [criterium=all]

\blank

\placelist
   [endnote]
   [criterium=text]

\stoptext


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

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30 16:09           ` Hans Hagen
  2021-06-30 16:15             ` Hans Hagen
@ 2021-06-30 19:04             ` denis.maier
  2021-06-30 22:11               ` Hans Hagen
  1 sibling, 1 reply; 12+ messages in thread
From: denis.maier @ 2021-06-30 19:04 UTC (permalink / raw)
  To: j.hagen, ntg-context



> Von: Hans Hagen <j.hagen@xs4all.nl>
> 
> On 6/30/2021 4:57 PM, denis.maier@unibe.ch wrote:
> >
> [...]
> >
> > Will this interfere with how parts are displayed in the regular table
> > of contents?
> 
> sure but you can group
> 
> \start
>    .. flush the list
> \stop
> 
> although it's not really needed when you do this at the end of the document

Hmm, but don't you usually style thing before \starttext? (Ok, you can use setups to keep the definitions in one place.)

> 
> > 2. Does this treat endnotes just like a list entry, with page numbers
> > and so?
> 
> indeed

Ok, so you cannot use the regular \setupnotation[endnote][settings] for styling the endnotes?

Denis

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30 14:57         ` denis.maier
  2021-06-30 16:09           ` Hans Hagen
@ 2021-06-30 19:39           ` Rik Kabel
  2021-07-02  7:50             ` denis.maier
  1 sibling, 1 reply; 12+ messages in thread
From: Rik Kabel @ 2021-06-30 19:39 UTC (permalink / raw)
  To: ntg-context

For what its worth, I offer my endnote apparatus with updates for parts. 
It uses the standard note/notation mechanism, not a list, for endnotes. 
Perhaps it can be further adapted to the needs of this thread.

There is at least one small issue with it: I have to use \stopendnote 
even though I define \startEndnote. This causes issues with the linter 
(mtxrun --script check <fn>) but seems otherwise harmless.

I am sure that others more versed in ConTeXt can find some ways to fix 
this and improve the overall approach. I welcome suggestions.

%------------------------------------------------------------------%
% Endnote apparatus adapted for parts
%
\mainlanguage      [en]
\language          [en]
\setupinteraction  [state=start]
\setuppagenumbering[alternative=doublesided]

\setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}]
[{\it\getmarking[chapter]}][{\it\getmarking[part]}]
\setupheads        [number=no]
\setuphead         [part]
                    [placehead=yes,
                     header=empty]

%------------------------- footnote setup -------------------------%
% footnotes uses asterisk, dagger, ddagger... so that endnotes
%   and pagenotes have separate sequences. Change way= to suit
%   your footnote frequency

\setupnotation     [footnote]
                    [numberconversion=set 2,
                     way=chapter]

%------------------------- endnote setup --------------------------%
% endnotes use numeric indices, reset by part

\setupnote         [endnote][
                     textseparator={,},
                     textstyle=\high{\small\hairspace},
                     location=none,
                     bodyfont=]

\setupnotation     [endnote]
                    [headstyle=\small,
                     way=bypart,
                     numbercommand=,
                     after={\blank[halfline]}]

%--------------------- endnote pages setup ------------------------%

\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

\starttexdefinition unexpanded startEndnote
   \dosingleempty\doStartEndnote
\stoptexdefinition

\starttexdefinition doStartEndnote [#1]
   \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]}
\stoptexdefinition

\starttexdefinition dodoStartEndnote [#1][#2]
   \startendnote[#1]
     \marking[notePage]{#2}\removeunwantedspaces
\stoptexdefinition

\starttexdefinition endnoteChapter
   \startchapter    [title=Notes]
\setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}]
[\setups{noteHeadingsText}][{\it\getmarking[part]}]
   \placenotes      [endnote]
   \page
\setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}]
                    [{\it\getmarking[chapter]}][part]
   \stopchapter
\stoptexdefinition

%------------------------------------------------------------------%

\starttext

\completecontent

\startpart[title=Part 1]
\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
\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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30 19:04             ` denis.maier
@ 2021-06-30 22:11               ` Hans Hagen
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2021-06-30 22:11 UTC (permalink / raw)
  To: denis.maier, ntg-context

On 6/30/2021 9:04 PM, denis.maier@unibe.ch wrote:
> 
> 
>> Von: Hans Hagen <j.hagen@xs4all.nl>
>>
>> On 6/30/2021 4:57 PM, denis.maier@unibe.ch wrote:
>>>
>> [...]
>>>
>>> Will this interfere with how parts are displayed in the regular table
>>> of contents?
>>
>> sure but you can group
>>
>> \start
>>     .. flush the list
>> \stop
>>
>> although it's not really needed when you do this at the end of the document
> 
> Hmm, but don't you usually style thing before \starttext? (Ok, you can use setups to keep the definitions in one place.)

indeed. one can use setups or define a combined list that has the settings

>>> 2. Does this treat endnotes just like a list entry, with page numbers
>>> and so?
>>
>> indeed
> 
> Ok, so you cannot use the regular \setupnotation[endnote][settings] for styling the endnotes?
well, this is typical list usage so .. but if needed one can define a so 
called list alternative for it but it probably doesn't pay off.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Heading for endnotes / grouped by chapter endnotes
  2021-06-30 19:39           ` Rik Kabel
@ 2021-07-02  7:50             ` denis.maier
  0 siblings, 0 replies; 12+ messages in thread
From: denis.maier @ 2021-07-02  7:50 UTC (permalink / raw)
  To: ntg-context

Thanks for this. I'll look into it.

> -----Ursprüngliche Nachricht-----
> Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Rik Kabel
> Gesendet: Mittwoch, 30. Juni 2021 21:40
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes
> 
> For what its worth, I offer my endnote apparatus with updates for parts.
> It uses the standard note/notation mechanism, not a list, for endnotes.
> Perhaps it can be further adapted to the needs of this thread.
> 
> There is at least one small issue with it: I have to use \stopendnote even though
> I define \startEndnote. This causes issues with the linter (mtxrun --script check
> <fn>) but seems otherwise harmless.
> 
> I am sure that others more versed in ConTeXt can find some ways to fix this and
> improve the overall approach. I welcome suggestions.
> 
> %------------------------------------------------------------------%
> % Endnote apparatus adapted for parts
> %
> \mainlanguage      [en]
> \language          [en]
> \setupinteraction  [state=start]
> \setuppagenumbering[alternative=doublesided]
> 
> \setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}]
> [{\it\getmarking[chapter]}][{\it\getmarking[part]}]
> \setupheads        [number=no]
> \setuphead         [part]
>                     [placehead=yes,
>                      header=empty]
> 
> %------------------------- footnote setup -------------------------% % footnotes uses
> asterisk, dagger, ddagger... so that endnotes %   and pagenotes have separate
> sequences. Change way= to suit %   your footnote frequency
> 
> \setupnotation     [footnote]
>                     [numberconversion=set 2,
>                      way=chapter]
> 
> %------------------------- endnote setup --------------------------% % endnotes use
> numeric indices, reset by part
> 
> \setupnote         [endnote][
>                      textseparator={,},
>                      textstyle=\high{\small\hairspace},
>                      location=none,
>                      bodyfont=]
> 
> \setupnotation     [endnote]
>                     [headstyle=\small,
>                      way=bypart,
>                      numbercommand=,
>                      after={\blank[halfline]}]
> 
> %--------------------- endnote pages setup ------------------------%
> 
> \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
> 
> \starttexdefinition unexpanded startEndnote
>    \dosingleempty\doStartEndnote
> \stoptexdefinition
> 
> \starttexdefinition doStartEndnote [#1]
>    \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]}
> \stoptexdefinition
> 
> \starttexdefinition dodoStartEndnote [#1][#2]
>    \startendnote[#1]
>      \marking[notePage]{#2}\removeunwantedspaces
> \stoptexdefinition
> 
> \starttexdefinition endnoteChapter
>    \startchapter    [title=Notes]
> \setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}]
> [\setups{noteHeadingsText}][{\it\getmarking[part]}]
>    \placenotes      [endnote]
>    \page
> \setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}]
>                     [{\it\getmarking[chapter]}][part]
>    \stopchapter
> \stoptexdefinition
> 
> %------------------------------------------------------------------%
> 
> \starttext
> 
> \completecontent
> 
> \startpart[title=Part 1]
> \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
> \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
> ________________________________________________________________
> ___________________
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-07-02  7:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 11:05 Heading for endnotes / grouped by chapter endnotes denis.maier
2021-06-29 10:53 ` denis.maier
2021-06-29 14:20   ` Hans Hagen
2021-06-30  8:06     ` denis.maier
2021-06-30  9:27       ` Hans Hagen
2021-06-30 14:57         ` denis.maier
2021-06-30 16:09           ` Hans Hagen
2021-06-30 16:15             ` Hans Hagen
2021-06-30 19:04             ` denis.maier
2021-06-30 22:11               ` Hans Hagen
2021-06-30 19:39           ` Rik Kabel
2021-07-02  7:50             ` denis.maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).