resetting footnote counter
A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote counter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter? Robert
On 8 Aug 2018, at 15:33, Robert Zydenbos
wrote: A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote counter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter?
Like this (and I also agree that footnote/endnote setup is a bit complicated, but of course the concept is already quite complicated itself): \setupnotation[endnote][way=bychapter] \starttext \chapter{One} \dorecurse{20}{\input knuth\endnote{Endnote}} \placenotes[endnote] \chapter{Two} \dorecurse{20}{\input knuth\endnote{Endnote}} \placenotes[endnote] \stoptext Best wishes, Taco
On 08/08/2018 03:55 PM, Taco Hoekwater wrote:
On 8 Aug 2018, at 15:33, Robert Zydenbos
wrote: A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote ounter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter?
Like this (and I also agree that footnote/endnote setup is a bit complicated, but of course the concept is already quite complicated itself): [...] Taco,
I’m afraid Robert needs that for MkII (although he didn‘t mention it). Robert, your command reads: \setupfootnotes[way=bychapter] By default, footnote numbering seems to be reset by part. Pablo -- http://www.ousia.tk
Sorry, neither of these work (MkII with XeTeX). I get no error messages with Pablo's suggestion, but not the desired result either. Perhaps I need a very primitive command that I can insert at the beginning of every chapter. Robert
On 8. Aug 2018, at 16:54, Pablo Rodriguez
wrote: On 08/08/2018 03:55 PM, Taco Hoekwater wrote:
On 8 Aug 2018, at 15:33, Robert Zydenbos
wrote: A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote ounter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter?
Like this (and I also agree that footnote/endnote setup is a bit complicated, but of course the concept is already quite complicated itself): [...] Taco,
I’m afraid Robert needs that for MkII (although he didn‘t mention it).
Robert,
your command reads:
\setupfootnotes[way=bychapter]
By default, footnote numbering seems to be reset by part.
Pablo
%\setupnote[footnote][way=bychapter,location=none] \setupfootnotes[way=bychapter,location=none] \starttext \dorecurse{10} {\expanded{\chapter{Chapter \recurselevel}} \dorecurse{10}{\input tufte\footnote{\input ward }\par} \placenotes[footnote]} \stoptext Wolfgang Robert Zydenbos schrieb am 08.08.18 um 17:03:
Sorry, neither of these work (MkII with XeTeX). I get no error messages with Pablo's suggestion, but not the desired result either.
Perhaps I need a very primitive command that I can insert at the beginning of every chapter.
Robert
On 8. Aug 2018, at 16:54, Pablo Rodriguez
wrote: On 08/08/2018 03:55 PM, Taco Hoekwater wrote:
On 8 Aug 2018, at 15:33, Robert Zydenbos
wrote: A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote ounter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter? Like this (and I also agree that footnote/endnote setup is a bit complicated, but of course the concept is already quite complicated itself): [...] Taco,
I’m afraid Robert needs that for MkII (although he didn‘t mention it).
Robert,
your command reads:
\setupfootnotes[way=bychapter]
By default, footnote numbering seems to be reset by part.
Pablo
___________________________________________________________________________________ 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 ___________________________________________________________________________________
On 08/08/2018 05:03 PM, Robert Zydenbos wrote:
Sorry, neither of these work (MkII with XeTeX). I get no error messages with Pablo's suggestion, but not the desired result either.
Weird, this works for me (with and without XeTeX): \setuppapersize[A8] \setupnote[footnote][way=bychapter] \starttext \chapter{Chapter} \dorecurse{2}{Text\footnote{Footnote.}} \chapter{Chapter} \dorecurse{2}{Text\footnote{Footnote.}} \stoptext Pablo -- http://www.ousia.tk
Pablo's example works well on my machine. So there must be a disturbance at a different level in my complex text – perhaps in my settings: \setupnotedefinition [footnote] [location=serried, distance=1em, hang=1em] or \setupfootnotes[bodyfont={Mainfont,8pt}, width=\textwidth, frameoffset=1em, location=none, way=bychapter] which in all other respects work fine? ('Mainfont' is my own definition, from a typescript; I also added 'way=bychapter', to no effect.) The only thing that does not happen is the resetting of the note counter. If I had a command that simply says "the counter named X (=footnote counter) is now 0 again", which I could insert at the beginning of every chapter, the problem would be solved. (Not so elegant, but it would be a solution.) Robert
On 8. Aug 2018, at 17:36, Pablo Rodriguez
wrote: On 08/08/2018 05:03 PM, Robert Zydenbos wrote:
Sorry, neither of these work (MkII with XeTeX). I get no error messages with Pablo's suggestion, but not the desired result either.
Weird, this works for me (with and without XeTeX):
\setuppapersize[A8] \setupnote[footnote][way=bychapter] \starttext \chapter{Chapter} \dorecurse{2}{Text\footnote{Footnote.}} \chapter{Chapter} \dorecurse{2}{Text\footnote{Footnote.}} \stoptext
Pablo
tex.stackexchange.com has page titled “How to manually reset the footnote numbering in ConTeXt?” (https://tex.stackexchange.com/questions/359702/how-to-manually-reset-the-foo...), where exactly the same question was asked: ---begin quote--- “I have a document with many footnotes, like this: This is some text\footnote{This is a footnote}. This is some more text\footnote{This is another footnote}. This is yet another text\footnote{This is some more footnote text}. This produces footnotes numbered 1, 2, 3, etc. I need to manually reset the footnote number back to 1. E.g.: This is some text\footnote{This is a footnote}. This is some more text\footnote{This is another footnote}. \resetfootnote This is yet another text\footnote{This is some more footnote text}. This should produce footnotes numbered 1, 2, then 1 again.”) ---end quote--- But no conclusive answer was found. The questioner then said: “I tried changing way=bypage and way=bysection, but it does not get the correct results, which is to have the numbers reset each time \placefootnotes is called. As bypage and bysection both don't do that, I need to be able to manually adjust the numbering.” I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error. Robert
On Thu, 9 Aug 2018, Robert Zydenbos wrote:
I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error.
Can you post a minimal example. Because the following works in MKII (counter reset at each chapter) \setupfootnotes[way=bychapter] \starttext \dorecurse{5} {\chapter{New Chapter} \dorecurse{5}{\input ward\footnote{A quote by ward}}} \stoptext The following also works with the counter reset at each section: \setupfootnotes[way=bysection] \starttext \dorecurse{5} {\section{New Chapter} \dorecurse{5}{\input ward\footnote{A quote by ward}}} \stoptext and the following works with the footnote reset at each page: \setupfootnotes[way=bypage] \starttext \dorecurse{5} {\section{New Chapter} \dorecurse{5}{\input ward\footnote{A quote by ward}}} \stoptext All examples were run using: ConTeXt ver: 2018.04.04 00:51 MKII fmt: 2018.7.3 int: english/english and the documents were compiled using texexec --xetex filename Aditya
What I've done is the following: I've made a zip archive (see attachment) with a few relevant files – the two first files that will be a part of the book: preface.tex and how-to-use.tex, together with an environment file manual-environment-xasia.tex with a lot of settings, and the starting file sample.tex which puts everything together. This does not need odd things like exotic fonts, and it does not contain uncommon tables etc. I've changed the main font to TeX Gyre Termes, which all of us have (so I assume, since it comes with the major TeX distributions), so there should be no problems there either; but if there is an error message, you can comment out line 12 in manual-environment-xasia.tex and de-comment line 13 to turn the font into Times (or you can change the name of the font to anything you have on your computer). Right now I am using an iMac with the latest OS installed. The 'footnotes' will be placed at the end of the chapters (i.e., they will be endnotes). If you run sample.tex through ConTeXt and XeTeX (i.e., MkII) and look at the final page, you will see that the footnote / endnote marker has not been reset. Robert
On 9. Aug 2018, at 16:37, Aditya Mahajan
wrote: On Thu, 9 Aug 2018, Robert Zydenbos wrote:
I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error.
Can you post a minimal example. Because the following works in MKII (counter reset at each chapter) […]
Have you tried to use mkiv for your document. Wolfgang Robert Zydenbos schrieb am 09.08.18 um 14:49:
tex.stackexchange.com has page titled “How to manually reset the footnote numbering in ConTeXt?” (https://tex.stackexchange.com/questions/359702/how-to-manually-reset-the-foo...), where exactly the same question was asked:
---begin quote--- “I have a document with many footnotes, like this:
This is some text\footnote{This is a footnote}. This is some more text\footnote{This is another footnote}. This is yet another text\footnote{This is some more footnote text}. This produces footnotes numbered 1, 2, 3, etc.
I need to manually reset the footnote number back to 1. E.g.:
This is some text\footnote{This is a footnote}. This is some more text\footnote{This is another footnote}. \resetfootnote This is yet another text\footnote{This is some more footnote text}.
This should produce footnotes numbered 1, 2, then 1 again.”) ---end quote---
But no conclusive answer was found. The questioner then said: “I tried changing way=bypage and way=bysection, but it does not get the correct results, which is to have the numbers reset each time \placefootnotes is called. As bypage and bysection both don't do that, I need to be able to manually adjust the numbering.”
I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error.
Robert ___________________________________________________________________________________ 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 ___________________________________________________________________________________
On Wed, 8 Aug 2018, Robert Zydenbos wrote:
A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote counter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter?
\setupnotation[footnote][way=bychapter] \starttext \dorecurse{5} {\startchapter[title=New Chapter] \dorecurse{5}{\input ward\footnote{A quote by ward}} \stopchapter} \stoptext With regard to your other thread about documentation of footnotes, the way I understand it is that \setupnotation is used to configure how the actual footnote is displayed and setupnotation has similar options to \setupdescription. So, alternative=serried corresponds to a similar option for descriptions. Note that the above is for MkIV. For MkII, I think that you need \setupfootnotes insted of \setupnotation[footnote]. Aditya
On 8/8/2018 5:48 PM, Aditya Mahajan wrote:
On Wed, 8 Aug 2018, Robert Zydenbos wrote:
A simple footnote question this time. I would like to print endnotes at the end of every chapter in my book, and then reset the footnote counter so that in the next chapter the first note will be ‘1’ again. I suppose this should be done by means of \setupfootnotes – but with which parameter?
\setupnotation[footnote][way=bychapter]
\starttext \dorecurse{5} {\startchapter[title=New Chapter] \dorecurse{5}{\input ward\footnote{A quote by ward}} \stopchapter} \stoptext
With regard to your other thread about documentation of footnotes, the way I understand it is that \setupnotation is used to configure how the actual footnote is displayed and setupnotation has similar options to \setupdescription. So, alternative=serried corresponds to a similar option for descriptions.
Note that the above is for MkIV. For MkII, I think that you need \setupfootnotes insted of \setupnotation[footnote]. Indeed, mkiv is different ... in fact notes are a complex mechanism:
- rendering in line (the marker) - rendering the text (anywhere) - interaction with the page builder (depending on kind) - stacking multiple classes - line notes (refering to lien numbers) etc. Most of what is in mkii is there in mkiv but in mkiv the textual rendering has been split and is called notation (on top of a generalized mechanism that also does descriptions, enumerations and more). The complication is that we need to group settings for (1) the markers, (2) the text, (3) the overall mechanism. Of course inheritance also kicks in then. 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 -----------------------------------------------------------------
participants (6)
-
Aditya Mahajan
-
Hans Hagen
-
Pablo Rodriguez
-
Robert Zydenbos
-
Taco Hoekwater
-
Wolfgang Schuster