From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113884 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joey McCollum via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Why are endnotes not working with ConTeXt-SBL? Date: Sat, 25 Dec 2021 15:34:11 -0500 Message-ID: References: <1791655590.770843.1640455439313.ref@mail.yahoo.com> <1791655590.770843.1640455439313@mail.yahoo.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3185164066071296810==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6415"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 25 21:37:29 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1DnE-0001R8-6E for gctc-ntg-context-518@m.gmane-mx.org; Sat, 25 Dec 2021 21:37:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4893F280F96; Sat, 25 Dec 2021 21:36:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2kz-6UoFDH9w; Sat, 25 Dec 2021 21:36:55 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 91845285966; Sat, 25 Dec 2021 21:36:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4059A285966 for ; Sat, 25 Dec 2021 21:36:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dle8d07vntfH for ; Sat, 25 Dec 2021 21:36:51 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.54; helo=mail-io1-f54.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 385B4280F96 for ; Sat, 25 Dec 2021 21:36:51 +0100 (CET) Original-Received: by mail-io1-f54.google.com with SMTP id y18so6137610iob.8 for ; Sat, 25 Dec 2021 12:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=10ndy3ZWQ3aYQZjAij763PTsKcXJc0ssYCRHeiOzY1w=; b=QXTAZOqTHf4tS/Uzmzzt9AnM98kKAWfgpEz7eJs0l/lfwdNyaftT2pWQzKPBZJNLP1 W13v29qHI44OFQnzMkd1mDKo8b7rxJ4eRFUM2JL90MBwXTqozUJLfJhpqhf5LBMgA+HZ Wec/Km+vls25nMK/BJLETC7keVvm/lNiVmWLGuCdwYE/lxRdBFt7EqmLGa2oABHffEdd KEm3w+L3M3iGPBOSUjSubNmc0v32TkxJP69Z6V7NeuVBpmD2/0HYwAfdtVLOOzoMCxTk 8dWmLXgZMrGDCQ5b3Xw45i1foiIGqFidS31j22vYrzo4di1CA9MzQxecRg5re3XtdQkG /+Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=10ndy3ZWQ3aYQZjAij763PTsKcXJc0ssYCRHeiOzY1w=; b=xF4keJvtRK4sc7JmqRTyiHcQWBfQI4Ap+1QtTJGCnMhCAOQtXGmO0XVMp2HSk9zAhj nG06wNjZaQTFBWl9hzvI82XGBFvohegJA6ecmcyPm6NOJkMWwBpPGNKkspsp0RrhX9Z1 q83KbM0BBL75I0NzYvdVrBblm/teTnHsOy4yk/IeE7ikubRTfMDlRFl4JgxCDIg+ptYT VB8KlLTRTwc7Fh8bj68KmYXhRAGT7Yu4W0vsrFzHlToxhNQuMUgBR9GrqQ642FYPhy76 gimKriLdLRa6UTUFyo/eLnxZlZ5xv8ONnFClBV72Qmj5c1B55UBkz9ZDIwzLVPTxAZHC Rm9w== X-Gm-Message-State: AOAM530EGbqdT7xY86W6rCXOJsTtgM8qdZQaKBPBuJw+24ZAJQEEE/vr J/VtTeDu9L3KIE3HPUGBGgaKAGxVumHuo6OZhd2ThPAVRZQ= X-Google-Smtp-Source: ABdhPJxY//Hb5xZTU3EMecxW4wQYJrGEyAB72ym1GnnWyM6qDoloE86YSJn2pFGWcTGKk7mgsy7HGYAeqK/ow/jUIYU= X-Received: by 2002:a02:cc13:: with SMTP id n19mr5332854jap.127.1640464609302; Sat, 25 Dec 2021 12:36:49 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:113884 Archived-At: --===============3185164066071296810== Content-Type: multipart/alternative; boundary="0000000000004ddeb505d3fe6e48" --0000000000004ddeb505d3fe6e48 Content-Type: text/plain; charset="UTF-8" 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 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 > 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 >> >> ___________________________________________________________________________________ >> > --0000000000004ddeb505d3fe6e48 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
A reasonable solution for the time being would be to check= if the righttext=C2=A0argument is empty, and add a final period in the foo= tnote only if it is not (with the assumption being that the user would prov= ide punctuation in any=C2=A0righttext=C2=A0for 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 i= ntelligent trailing punctuation replacement)
\startsetups btx:sbl:cite:f= ootnote
=C2=A0 \removeunwantedspaces
=C2=A0 \doifinstring{\btxparamet= er{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}}
=C2=A0 = \begingroup
=C2=A0 \letbtxparameter{punct}\empty % don't pass the tr= ailing punctuation down to the inline setup
=C2=A0 \startfootnote
=C2= =A0 =C2=A0 \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first wor= d in the footnote (needed to render "Ibid." and "Idem" = correctly)
=C2=A0 =C2=A0 % Add a closing period if there is no righttext=
=C2=A0 =C2=A0 \doif{\btxparameter{righttext}}{\empty} {
=C2=A0 =C2= =A0 =C2=A0 \btxperiod
=C2=A0 =C2=A0 }
=C2=A0 \stopfootnote
=C2=A0 = \endgroup
=C2=A0 \doifnotinstring{\btxparameter{punct}}{\btxparameter{au= topunctuation}}{\btxparameter{punct}}
\stopsetups
```

<= div>This should allow your script to compile, but unfortunately, it doesn&#= 39;t seem to make endnotes work, at least not when I try it. For some reaso= n, the macro=C2=A0\Word{\fastsetup{btx:sbl:cite:inline}} is expanding to no= thing inside the \startfootnote=C2=A0... \stopfootnote=C2=A0environment. 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 <= ;jmccollum= 20140511@gmail.com> wrote:
Joel,

You may not hav= e done anything wrong; this may be an issue with ConTeXt-SBL. In my code fo= r the=C2=A0btx:sbl:cite:footnote setup in publ-imp-sbl.mkvi, I added a comm= ent to this effect:

```
\startsetups btx:sbl:cite:footnote
=C2= =A0 \removeunwantedspaces
=C2=A0 \doifinstring{\btxparameter{punct}}{\bt= xparameter{autopunctuation}}{\btxparameter{punct}}
=C2=A0 \begingroup=C2=A0 \letbtxparameter{punct}\empty % don't pass the trailing punctua= tion down to the inline setup
=C2=A0 \let\doifendswithpunctelse\btx_sbl_= doifendswithpunctelse % why is this necessary? For some reason, \btx_sbl_do= ifendswithpunctelse is not recognized within the footnote environment...=C2=A0 \startfootnote
=C2=A0 =C2=A0 \Word{\fastsetup{btx:sbl:cite:inlin= e}}% capitalize the first word in the footnote (needed to render "Ibid= ." and "Idem" correctly)
=C2=A0 =C2=A0 % Add a closing pe= riod, unless the righttext ends with punctuation
=C2=A0 =C2=A0 \doifends= withpunctelse{\btxparameter{righttext}} {
=C2=A0 =C2=A0 =C2=A0 \removeun= wantedspaces
=C2=A0 =C2=A0 } {
=C2=A0 =C2=A0 =C2=A0 \removeunwantedsp= aces
=C2=A0 =C2=A0 =C2=A0 \btxperiod
=C2=A0 =C2=A0 }
=C2=A0 \stopf= ootnote
=C2=A0 \endgroup
=C2=A0 \doifnotinstring{\btxparameter{punct}= }{\btxparameter{autopunctuation}}{\btxparameter{punct}}
\stopsetups
`= ``

I define the \btx_sbl_doifendswithpunctelse mac= ro earlier in the module. Initially, when I tried to invoke this macro with= in the \startfootnote ... \stopfootnote=C2=A0environment (to conditionally = add a period at the end of a footnote citation if it does not have a rightt= ext ending with punctuation), I got the same error you got, but for \btx_sb= l_doifendswithpunctelse. I wasn't sure why this was happening, so I tri= ed defining a new \doifendswithpunctelse macro. Unfortunately, based on you= r e-mail, it looks like this doesn't actually fix the problem.

A= ny help from other developers would be appreciated here! Unfortunately, I d= on'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-con= text <ntg-contex= t@ntg.nl> wrote:
I am using the ConTeXt-S= BL package for citations. I need to move my footnotes to the end of each ar= ticle.

According to th= e 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=3Dnone] in the header and \placenotes[footnote] = where I want the endnotes to appear. It complains this error:=

"Undefined control sequence \doifendswithpunctelse&= quot;

What did I do wro= ng?

--Joel

<= /div>
Code follows:

\usemodule[publ-i= mp-sbl]
\startbuffer [bib]

@Article{na2006,
title=3D{Volcanoes= \word{of} New Mexico},
year=3D{2006},
journal=3D{New Mexico Earth Ma= tters},
publisher=3D{New Mexico Bureau \word{of} Geology \word{and} Mine= ral Resources},
volume=3D{6},
number=3D{1},
location=3D{Socorro, N= ew Mexico}
}

@Book{clark1989,
author =3D {Clark, William},
= title =3D {Railroads \word{and} railroad towns \word{in} New Mexico},
pu= blisher =3D {New Mexico Magazine},
year =3D {1989},
address =3D {Albu= querque, New Mexico},
isbn =3D {9780937206126}
}

\stopbuffer
\usebtxdataset[bib.buffer]

\setupbtx[dataset=3Ddefault]
\us= ebtxdefinitions[sbl]
\setupbtx[sbl]

\setupnote[footnote][location= =3Dnone]

\starttext

=C2=A0=C2=A0 \input knuth
=C2=A0=C2=A0= =C2=A0\cite[clark1989]

=C2=A0=C2=A0=C2=A0 \placenotes[footnote]
=
=C2=A0=C2=A0 =C2=A0
=C2=A0=C2=A0=C2=A0 \startchapter[title=3DBibliog= raphy]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \placelistofpublicatio= ns
=C2=A0=C2=A0=C2=A0 \stopchapter

\stoptext

=
_________________________________________________________= __________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--0000000000004ddeb505d3fe6e48-- --===============3185164066071296810== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3185164066071296810==--