From: Rik Kabel <ConTeXt@rik.users.panix.com>
To: ntg-context@ntg.nl
Subject: Re: Heading for endnotes / grouped by chapter endnotes
Date: Wed, 30 Jun 2021 15:39:34 -0400 [thread overview]
Message-ID: <1d06a980-0492-c273-ca81-79515c930c90@rik.users.panix.com> (raw)
In-Reply-To: <a96eee4836f94e5887cb00b59365a65b@unibe.ch>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2021-06-30 19:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 11:05 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 [this message]
2021-07-02 7:50 ` denis.maier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d06a980-0492-c273-ca81-79515c930c90@rik.users.panix.com \
--to=context@rik.users.panix.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).