* Why are endnotes not working with ConTeXt-SBL? [not found] <1791655590.770843.1640455439313.ref@mail.yahoo.com> @ 2021-12-25 18:03 ` Joel via ntg-context 2021-12-25 18:11 ` Joey McCollum via ntg-context 0 siblings, 1 reply; 4+ messages in thread From: Joel via ntg-context @ 2021-12-25 18:03 UTC (permalink / raw) To: ntg-context; +Cc: Joel [-- Attachment #1.1: Type: text/plain, Size: 1401 bytes --] I am using the ConTeXt-SBL package for citations. I need to move my footnotes to the end of each article. According to the manual, I can suppress the placement of footnotes using two lines of code. I've added these to my minimal working code, placing \setupnote[footnote][location=none] in the header and \placenotes[footnote] where I want the endnotes to appear. It complains this error: "Undefined control sequence \doifendswithpunctelse" What did I do wrong? --Joel Code follows: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext [-- Attachment #1.2: Type: text/html, Size: 2639 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] 4+ messages in thread
* Re: Why are endnotes not working with ConTeXt-SBL? 2021-12-25 18:03 ` Why are endnotes not working with ConTeXt-SBL? Joel via ntg-context @ 2021-12-25 18:11 ` Joey McCollum via ntg-context 2021-12-25 20:34 ` Joey McCollum via ntg-context 0 siblings, 1 reply; 4+ messages in thread From: Joey McCollum via ntg-context @ 2021-12-25 18:11 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Joey McCollum [-- Attachment #1.1: Type: text/plain, Size: 3868 bytes --] Joel, You may not have done anything wrong; this may be an issue with ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in publ-imp-sbl.mkvi, I added a comment to this effect: ``` \startsetups btx:sbl:cite:footnote \removeunwantedspaces \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} \begingroup \letbtxparameter{punct}\empty % don't pass the trailing punctuation down to the inline setup \let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this necessary? For some reason, \btx_sbl_doifendswithpunctelse is not recognized within the footnote environment... \startfootnote \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in the footnote (needed to render "Ibid." and "Idem" correctly) % Add a closing period, unless the righttext ends with punctuation \doifendswithpunctelse{\btxparameter{righttext}} { \removeunwantedspaces } { \removeunwantedspaces \btxperiod } \stopfootnote \endgroup \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} \stopsetups ``` I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. Initially, when I tried to invoke this macro within the \startfootnote ... \stopfootnote environment (to conditionally add a period at the end of a footnote citation if it does not have a righttext ending with punctuation), I got the same error you got, but for \btx_sbl_doifendswithpunctelse. I wasn't sure why this was happening, so I tried defining a new \doifendswithpunctelse macro. Unfortunately, based on your e-mail, it looks like this doesn't actually fix the problem. Any help from other developers would be appreciated here! Unfortunately, I don't have a MWE replicating the problem on hand at the moment. Joey On Sat, Dec 25, 2021 at 1:04 PM Joel via ntg-context <ntg-context@ntg.nl> wrote: > I am using the ConTeXt-SBL package for citations. I need to move my > footnotes to the end of each article. > > According to the manual, I can suppress the placement of footnotes using > two lines of code. I've added these to my minimal working code, placing \setupnote[footnote][location=none] > in the header and \placenotes[footnote] where I want the endnotes to > appear. It complains this error: > > "Undefined control sequence \doifendswithpunctelse" > > What did I do wrong? > > --Joel > > Code follows: > > \usemodule[publ-imp-sbl] > \startbuffer [bib] > > @Article{na2006, > title={Volcanoes \word{of} New Mexico}, > year={2006}, > journal={New Mexico Earth Matters}, > publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral > Resources}, > volume={6}, > number={1}, > location={Socorro, New Mexico} > } > > @Book{clark1989, > author = {Clark, William}, > title = {Railroads \word{and} railroad towns \word{in} New Mexico}, > publisher = {New Mexico Magazine}, > year = {1989}, > address = {Albuquerque, New Mexico}, > isbn = {9780937206126} > } > > \stopbuffer > > \usebtxdataset[bib.buffer] > > \setupbtx[dataset=default] > \usebtxdefinitions[sbl] > \setupbtx[sbl] > > \setupnote[footnote][location=none] > > \starttext > > \input knuth > \cite[clark1989] > > \placenotes[footnote] > > > \startchapter[title=Bibliography] > \placelistofpublications > \stopchapter > > \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 > > ___________________________________________________________________________________ > [-- Attachment #1.2: Type: text/html, Size: 5663 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] 4+ messages in thread
* Re: Why are endnotes not working with ConTeXt-SBL? 2021-12-25 18:11 ` Joey McCollum via ntg-context @ 2021-12-25 20:34 ` Joey McCollum via ntg-context 2021-12-26 21:57 ` Joey McCollum via ntg-context 0 siblings, 1 reply; 4+ messages in thread From: Joey McCollum via ntg-context @ 2021-12-25 20:34 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Joey McCollum [-- Attachment #1.1: Type: text/plain, Size: 5589 bytes --] A reasonable solution for the time being would be to check if the righttext argument is empty, and add a final period in the footnote only if it is not (with the assumption being that the user would provide punctuation in any righttext for footnote/endnote citations). I've pushed the following change to the GitHub repo, if you'd like to pull and use it: ``` % Inline footnote citation setup (with intelligent trailing punctuation replacement) \startsetups btx:sbl:cite:footnote \removeunwantedspaces \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} \begingroup \letbtxparameter{punct}\empty % don't pass the trailing punctuation down to the inline setup \startfootnote \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in the footnote (needed to render "Ibid." and "Idem" correctly) % Add a closing period if there is no righttext \doif{\btxparameter{righttext}}{\empty} { \btxperiod } \stopfootnote \endgroup \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} \stopsetups ``` This should allow your script to compile, but unfortunately, it doesn't seem to make endnotes work, at least not when I try it. For some reason, the macro \Word{\fastsetup{btx:sbl:cite:inline}} is expanding to nothing inside the \startfootnote ... \stopfootnote environment. I have no idea why this is happening, so any ideas are appreciated. Joey On Sat, Dec 25, 2021 at 1:11 PM Joey McCollum <jmccollum20140511@gmail.com> wrote: > Joel, > > You may not have done anything wrong; this may be an issue with > ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in > publ-imp-sbl.mkvi, I added a comment to this effect: > > ``` > \startsetups btx:sbl:cite:footnote > \removeunwantedspaces > > \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \begingroup > \letbtxparameter{punct}\empty % don't pass the trailing punctuation down > to the inline setup > \let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this > necessary? For some reason, \btx_sbl_doifendswithpunctelse is not > recognized within the footnote environment... > \startfootnote > \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in > the footnote (needed to render "Ibid." and "Idem" correctly) > % Add a closing period, unless the righttext ends with punctuation > \doifendswithpunctelse{\btxparameter{righttext}} { > \removeunwantedspaces > } { > \removeunwantedspaces > \btxperiod > } > \stopfootnote > \endgroup > > \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \stopsetups > ``` > > I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. > Initially, when I tried to invoke this macro within the \startfootnote ... > \stopfootnote environment (to conditionally add a period at the end of a > footnote citation if it does not have a righttext ending with punctuation), > I got the same error you got, but for \btx_sbl_doifendswithpunctelse. I > wasn't sure why this was happening, so I tried defining a new > \doifendswithpunctelse macro. Unfortunately, based on your e-mail, it looks > like this doesn't actually fix the problem. > > Any help from other developers would be appreciated here! Unfortunately, I > don't have a MWE replicating the problem on hand at the moment. > > Joey > > On Sat, Dec 25, 2021 at 1:04 PM Joel via ntg-context <ntg-context@ntg.nl> > wrote: > >> I am using the ConTeXt-SBL package for citations. I need to move my >> footnotes to the end of each article. >> >> According to the manual, I can suppress the placement of footnotes using >> two lines of code. I've added these to my minimal working code, placing \setupnote[footnote][location=none] >> in the header and \placenotes[footnote] where I want the endnotes to >> appear. It complains this error: >> >> "Undefined control sequence \doifendswithpunctelse" >> >> What did I do wrong? >> >> --Joel >> >> Code follows: >> >> \usemodule[publ-imp-sbl] >> \startbuffer [bib] >> >> @Article{na2006, >> title={Volcanoes \word{of} New Mexico}, >> year={2006}, >> journal={New Mexico Earth Matters}, >> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral >> Resources}, >> volume={6}, >> number={1}, >> location={Socorro, New Mexico} >> } >> >> @Book{clark1989, >> author = {Clark, William}, >> title = {Railroads \word{and} railroad towns \word{in} New Mexico}, >> publisher = {New Mexico Magazine}, >> year = {1989}, >> address = {Albuquerque, New Mexico}, >> isbn = {9780937206126} >> } >> >> \stopbuffer >> >> \usebtxdataset[bib.buffer] >> >> \setupbtx[dataset=default] >> \usebtxdefinitions[sbl] >> \setupbtx[sbl] >> >> \setupnote[footnote][location=none] >> >> \starttext >> >> \input knuth >> \cite[clark1989] >> >> \placenotes[footnote] >> >> >> \startchapter[title=Bibliography] >> \placelistofpublications >> \stopchapter >> >> \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 >> >> ___________________________________________________________________________________ >> > [-- Attachment #1.2: Type: text/html, Size: 7700 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] 4+ messages in thread
* Re: Why are endnotes not working with ConTeXt-SBL? 2021-12-25 20:34 ` Joey McCollum via ntg-context @ 2021-12-26 21:57 ` Joey McCollum via ntg-context 0 siblings, 0 replies; 4+ messages in thread From: Joey McCollum via ntg-context @ 2021-12-26 21:57 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Joey McCollum [-- Attachment #1.1: Type: text/plain, Size: 7289 bytes --] This actually seems to be rooted in a more general problem with the publications support module. Why does invoking the fastsetup for citations work within the default footnote setup, but not within endnotes flushed via \placenotes[footnote]? If I modify the original MWE to use ConTeXt's default btx rendering, I get the same error: ``` \startbuffer [bib] @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \setupnote[footnote][location=none] % commenting out this line will produce footnotes that expand the citation correctly \starttext \input knuth \cite[alternative=footnote][clark1989] \page \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext ``` If it helps, the relevant code in publications support is the following block in publ-imp-cite.mkvi: ``` \startsetups \s!btx:\s!cite:footnote \startfootnote \fastsetup{btx:cite:entry} \stopfootnote \stopsetups ``` The \fastsetup{btx:cite:entry} doesn't expand to anything if the footnote is flushed as an endnote via \placenotes[footnote]. Does anyone have any idea why this happens and how to fix it? Joey On Sat, Dec 25, 2021 at 3:34 PM Joey McCollum <jmccollum20140511@gmail.com> wrote: > A reasonable solution for the time being would be to check if the > righttext argument is empty, and add a final period in the footnote only if > it is not (with the assumption being that the user would provide > punctuation in any righttext for footnote/endnote citations). I've pushed > the following change to the GitHub repo, if you'd like to pull and use it: > > ``` > % Inline footnote citation setup (with intelligent trailing punctuation > replacement) > \startsetups btx:sbl:cite:footnote > \removeunwantedspaces > > \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \begingroup > \letbtxparameter{punct}\empty % don't pass the trailing punctuation down > to the inline setup > \startfootnote > \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in > the footnote (needed to render "Ibid." and "Idem" correctly) > % Add a closing period if there is no righttext > \doif{\btxparameter{righttext}}{\empty} { > \btxperiod > } > \stopfootnote > \endgroup > > \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \stopsetups > ``` > > This should allow your script to compile, but unfortunately, it doesn't > seem to make endnotes work, at least not when I try it. For some reason, > the macro \Word{\fastsetup{btx:sbl:cite:inline}} is expanding to nothing > inside the \startfootnote ... \stopfootnote environment. I have no idea why > this is happening, so any ideas are appreciated. > > Joey > > On Sat, Dec 25, 2021 at 1:11 PM Joey McCollum <jmccollum20140511@gmail.com> > wrote: > >> Joel, >> >> You may not have done anything wrong; this may be an issue with >> ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in >> publ-imp-sbl.mkvi, I added a comment to this effect: >> >> ``` >> \startsetups btx:sbl:cite:footnote >> \removeunwantedspaces >> >> \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} >> \begingroup >> \letbtxparameter{punct}\empty % don't pass the trailing punctuation >> down to the inline setup >> \let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this >> necessary? For some reason, \btx_sbl_doifendswithpunctelse is not >> recognized within the footnote environment... >> \startfootnote >> \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in >> the footnote (needed to render "Ibid." and "Idem" correctly) >> % Add a closing period, unless the righttext ends with punctuation >> \doifendswithpunctelse{\btxparameter{righttext}} { >> \removeunwantedspaces >> } { >> \removeunwantedspaces >> \btxperiod >> } >> \stopfootnote >> \endgroup >> >> \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} >> \stopsetups >> ``` >> >> I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. >> Initially, when I tried to invoke this macro within the \startfootnote ... >> \stopfootnote environment (to conditionally add a period at the end of a >> footnote citation if it does not have a righttext ending with punctuation), >> I got the same error you got, but for \btx_sbl_doifendswithpunctelse. I >> wasn't sure why this was happening, so I tried defining a new >> \doifendswithpunctelse macro. Unfortunately, based on your e-mail, it looks >> like this doesn't actually fix the problem. >> >> Any help from other developers would be appreciated here! Unfortunately, >> I don't have a MWE replicating the problem on hand at the moment. >> >> Joey >> >> On Sat, Dec 25, 2021 at 1:04 PM Joel via ntg-context <ntg-context@ntg.nl> >> wrote: >> >>> I am using the ConTeXt-SBL package for citations. I need to move my >>> footnotes to the end of each article. >>> >>> According to the manual, I can suppress the placement of footnotes using >>> two lines of code. I've added these to my minimal working code, placing \setupnote[footnote][location=none] >>> in the header and \placenotes[footnote] where I want the endnotes to >>> appear. It complains this error: >>> >>> "Undefined control sequence \doifendswithpunctelse" >>> >>> What did I do wrong? >>> >>> --Joel >>> >>> Code follows: >>> >>> \usemodule[publ-imp-sbl] >>> \startbuffer [bib] >>> >>> @Article{na2006, >>> title={Volcanoes \word{of} New Mexico}, >>> year={2006}, >>> journal={New Mexico Earth Matters}, >>> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral >>> Resources}, >>> volume={6}, >>> number={1}, >>> location={Socorro, New Mexico} >>> } >>> >>> @Book{clark1989, >>> author = {Clark, William}, >>> title = {Railroads \word{and} railroad towns \word{in} New Mexico}, >>> publisher = {New Mexico Magazine}, >>> year = {1989}, >>> address = {Albuquerque, New Mexico}, >>> isbn = {9780937206126} >>> } >>> >>> \stopbuffer >>> >>> \usebtxdataset[bib.buffer] >>> >>> \setupbtx[dataset=default] >>> \usebtxdefinitions[sbl] >>> \setupbtx[sbl] >>> >>> \setupnote[footnote][location=none] >>> >>> \starttext >>> >>> \input knuth >>> \cite[clark1989] >>> >>> \placenotes[footnote] >>> >>> >>> \startchapter[title=Bibliography] >>> \placelistofpublications >>> \stopchapter >>> >>> \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 >>> >>> ___________________________________________________________________________________ >>> >> [-- Attachment #1.2: Type: text/html, Size: 9708 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] 4+ messages in thread
end of thread, other threads:[~2021-12-26 21:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1791655590.770843.1640455439313.ref@mail.yahoo.com> 2021-12-25 18:03 ` Why are endnotes not working with ConTeXt-SBL? Joel via ntg-context 2021-12-25 18:11 ` Joey McCollum via ntg-context 2021-12-25 20:34 ` Joey McCollum via ntg-context 2021-12-26 21:57 ` Joey McCollum via ntg-context
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).