From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112908 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joey McCollum via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Ibid. and idem support for bibliographies (and variable scope more generally) Date: Tue, 21 Sep 2021 12:45:53 -0400 Message-ID: References: <59638660674d4a6db8e00d64befc53e0@unibe.ch> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6002014886006257769==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="417"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum , mailing list for ConTeXt users To: denis.maier@unibe.ch Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 21 18:46:46 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 1mSius-000ASF-5X for gctc-ntg-context-518@m.gmane-mx.org; Tue, 21 Sep 2021 18:46:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 450B9287838; Tue, 21 Sep 2021 18:46:12 +0200 (CEST) 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 nSvzbo7r8XES; Tue, 21 Sep 2021 18:46:10 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5F5CC28783A; Tue, 21 Sep 2021 18:46:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5A01A287830 for ; Tue, 21 Sep 2021 18:46:08 +0200 (CEST) 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 KKsQtsCSagIS for ; Tue, 21 Sep 2021 18:46:06 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.45; helo=mail-io1-f45.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (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 EEE5A2877F2 for ; Tue, 21 Sep 2021 18:46:05 +0200 (CEST) Original-Received: by mail-io1-f45.google.com with SMTP id r75so10335668iod.7 for ; Tue, 21 Sep 2021 09:46:05 -0700 (PDT) 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=eM/liCj7bzuO3GH160okAJcMByO4ZJ6qS4t2DtAah+w=; b=ISFvGJOgHgvmlEL+mK5rYiZTpwvRmcSuJJxXcAD7VxdX8P4YRkC2IGz1isF+wobpjv HuwAUL1+ahxcxijrCG/dWoZd5EuSvE7Tap78K7KGgQSfWAVfp1ZOAAUXGqCROzMiY6FX j2ePqb2JmTBNpxAYAGtTkfYjW02ANPbyWLqgfbyaGQUv3BUdXKpOPhXDIGOMsqRIo1Qi I+QUDR8Yfp5u6pEwP8m7YbeRRfSm4JK5mys+eAdnJdOJQpLevthM8zC6Zi3C9Lk45UVP bNyFU+Jcv2KuMQNqHpaFgqGbhlmKBUIVQLhe8KgE2TeMJz2mwHz+iiLBSoOUSgcsM7SM 60vg== 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=eM/liCj7bzuO3GH160okAJcMByO4ZJ6qS4t2DtAah+w=; b=eRV76xqP2Lj+zsNZDTrWITKpy8KLdt+Gn0Xe3DVTcSxRjGUousTEHaA7pegvS1zTfN v00fHK78JkWSbp+9cLIjUIi79PHM5rz+EJvccY3TNlrSBMgG8TkCXhvImqd7V0yoEfdm 9cvk/2uq4aWoX00P4mnuMn97NjQClCJaL/UbmFqurvFeKUWT5jUKAp+ydVvgRYyr5TRC QYebFxKcyh4P3yUtTo0MZuXVtjEV0VWxR4tZ0nn8K47o4Vx/xSl6C7Zq9Jk76J0n1Wvk u9yXe25utSOgt8Uk7UpqcF+LCtCppOud7nmseu9WXJHw81JNpu1nX277sP4Gv/sQIWVy cUGg== X-Gm-Message-State: AOAM5311+UJZrLi6k8jIPtX/1wVQfh1Pt6HiceZS1Cegf4T5jkQI5aPf gd2LlsdPCw2fIKkukH4rC8sajCP+3IvNiUs6VSM= X-Google-Smtp-Source: ABdhPJzNvcRKEIDAGsC3GJqL0hIG/LoAW6zZluJjRerNYi5Cx5Kkj7NWUwM6gmEsQjz6ti2ESDBC/q3dZyFUKPnv62s= X-Received: by 2002:a05:6638:168a:: with SMTP id f10mr833594jat.100.1632242764418; Tue, 21 Sep 2021 09:46:04 -0700 (PDT) In-Reply-To: <59638660674d4a6db8e00d64befc53e0@unibe.ch> 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:112908 Archived-At: --===============6002014886006257769== Content-Type: multipart/alternative; boundary="00000000000029118605cc84229b" --00000000000029118605cc84229b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, I see. My implementation will mess up in that case. We may need methods that keep track of whether a citation is made in a footnote or not. I'm not sure how to implement that. Certainly, if we knew that all footnote citations were being made with the alternative=3Dfootnote option, then that probably make things easier, but in the case of a verbose footnote that only features a citation at the end, it would likely be more convenient for a user to use the inline alternative in the footnote, as you do in your example. Thanks for catching that! Joey On Tue, Sep 21, 2021 at 11:55 AM wrote: > To be clear, I wasn=E2=80=99t talking about list vs notes. Consider just = this : > > > > \cite[alternative=3Dinline][doe] > > \footnote{\cite[alternative=3Dinline][foo]} > > \cite[alternative=3Dinline][doe] > > > > The citation in the footnote should not interupt the ibid-tracking in thi= s > case. The second doe-citation should trigger the ibid-mechanism. But: > > > > \cite[alternative=3Dinline][doe] > > \footnote{\cite[alternative=3Dinline][foo]} > > \cite[alternative=3Dinline][foo] > > > > In this case, you wouldn=E2=80=99t want an ibid. for the foo-citation out= side of > the footnote. > > > > Denis > > > > > > *Von:* Joey McCollum > *Gesendet:* Dienstag, 21. September 2021 17:16 > *An:* Maier, Denis Christian (UB) > *Cc:* mailing list for ConTeXt users > *Betreff:* Re: [NTG-context] Ibid. and idem support for bibliographies > (and variable scope more generally) > > > > Yes, I haven't added any code to check for the useibid or useidem options > in list citations; they are only used for in-text citations in the SBL > specification definition. The distinction between \setupbtx[sbl:\s!list] > and \setupbtx[sbl:\s!cite] should allow us to specify their options > separately. For list citations, we probably should add a "sameauthor" > option, with "rule" (draw a horizontal rule for repeated authors), "empty= " > (leave a blank space the size of the "margin" option), and "ditto" (e.g.,= a > dumb quote sign, or "Idem") as potential values, since all three of these > options are currently supported in publ-imp-chicago.mkvi and > publ-imp-sbl.mkvi, but as far as I know, they always default to the "rule= " > setup. > > > > Joey > > > > On Tue, Sep 21, 2021 at 12:52 AM wrote: > > Cool. > > I don't know about your particular solution, but will probably want to > make sure to have different variables for citations in the main text and = in > the notes. > > Denis > > > > ________________________________________ > Von: ntg-context im Auftrag von Joey > McCollum via ntg-context > Gesendet: Dienstag, 21. September 2021 02:22:49 > An: mailing list for ConTeXt users > Cc: Joey McCollum > Betreff: [NTG-context] Ibid. and idem support for bibliographies (and > variable scope more generally) > > Hi, > > I've found a way to implement ibid. and idem support in the SBL > specification under development at > https://github.com/jjmccollum/context-sbl (this e-mail essentially > repeats my comments in https://github.com/jjmccollum/context-sbl/issues/5= ), > but I'm not sure if my solution is a recommended way to solve the problem= , > and I'm curious about why the more straightforward approach doesn't work. > > I've added useibid and useidem options for the \definebtx command (making > them language-dependent by adding them to mult-def.lua, which seems to be > how the other options have been implemented). Ideally, I'd like to follow > the pattern of the chicago:list:sameauthor setup and use a macro similar = to > \btxdoifsameaspreviouselse. But since \btxdoifsameaspreviouselse relies o= n > the indexed structure of the bibliographic list to determine what the > "previous" entry is, it won't work for my purposes; I need to retrieve th= e > tag of the last entry passed to the \cite command. > > I ended up making this work by initializing a global variable via > > ``` > \setxvariables[btx:sbl][previousinlinetag=3D\empty] > ``` > > in the publ-imp-sbl.mkvi file, resetting it at the end of each citation v= ia > > ``` > \setxvariables[btx:sbl][previousinlinetag=3D\currentbtxtag] > ``` > > and checking it in the appropriate places via > > ``` > getvariable{btx:sbl}{previousinlinetag} > ``` > > I initially tried to do this with a simple macro > \btx_sbl_previousinlinetag defined in publ-imp-sbl.mkvi (in the same scop= e > as the rest of the specification), but attempting to reset it in the cite > setups with \let or \def didn't work. Why doesn't this work? Is the setup > for a cite alternative executed in its own scope in a way that would > prevent me from updating a variable defined in the scope of the rendering > specification? And is there a way to do this that is preferable to using > global variables? > > Thanks! > > Joey > > --00000000000029118605cc84229b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah, I see. My implementation will mess up in that case. We= may need methods that keep track of whether a citation is made in a footno= te or not. I'm not sure how to implement that. Certainly, if we knew th= at all footnote citations were being made with the alternative=3Dfootnote o= ption, then that probably make things easier, but in the case of a verbose = footnote that only features a citation at the end, it would likely be more = convenient for a user to use the inline alternative in the footnote, as you= do in your example.

Thanks for catching that!

Joey

On Tue, Sep 21, 2021 at 11:55 AM <denis.maier@unibe.ch> wrote:

To be clear, I wasn=E2=80=99t t= alking about list vs notes. Consider just this=C2=A0:<= /p>

=C2=A0

\cite[alternative=3Dinline][doe= ]

\footnote{\cite[alternative=3Di= nline][foo]}

\cite[alternative=3Dinline][doe= ]

=C2=A0

The citation in the footnote should not interu= pt the ibid-tracking in this case. The second doe-citation should trigger t= he ibid-mechanism. But:

=C2=A0

\cite[alternative=3Dinline][doe= ]

\footnote{\cite[alternative=3Di= nline][foo]}

\cite[alternative=3Dinline][foo= ]

=C2=A0

In this case, you wouldn=E2=80= =99t want an ibid. for the foo-citation outside of the footnote.<= /u>

=C2=A0

Denis

=C2=A0

=C2=A0

Von: Joey McCollum <jmccollum20140511@gmail.com>
Gesendet: Dienstag, 21. September 2021 17:16
An: Maier, Denis Christian (UB) <denis.maier@unibe.ch>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Betreff: Re: [NTG-context] Ibid. and idem support for bibliographies= (and variable scope more generally)

=C2=A0

Yes, I haven't added any code to check for the u= seibid=C2=A0or useidem=C2=A0options in list citations; they are only used f= or in-text citations in the SBL specification definition. The distinction b= etween \setupbtx[sbl:\s!list] and \setupbtx[sbl:\s!cite] should allow us to specify their options separately. For list citations, w= e probably should add a "sameauthor" option, with "rule"= ; (draw a horizontal rule for repeated authors), "empty" (leave a= blank space the size of the "margin" option), and "ditto&qu= ot; (e.g., a dumb quote sign, or "Idem") as potential values, since all thr= ee of these options are currently supported in publ-imp-chicago.mkvi and pu= bl-imp-sbl.mkvi, but as far as I know, they always default to the "rul= e" setup.

=C2=A0

Joey

=C2=A0

On Tue, Sep 21, 2021 at 12:52 AM <denis.maier@unibe.ch> wro= te:

Cool.

I don't know about your particular solution, but will probably want to = make sure to have different variables for citations in the main text and in= the notes.

Denis



________________________________________
Von: ntg-context <ntg-context-bounces@ntg.nl> im Auftrag von Joey McCollum= via ntg-context <ntg-context@ntg.nl>
Gesendet: Dienstag, 21. September 2021 02:22:49
An: mailing list for ConTeXt users
Cc: Joey McCollum
Betreff: [NTG-context] Ibid. and idem support for bibliographies (and varia= ble scope more generally)

Hi,

I've found a way to implement ibid. and idem support in the SBL specifi= cation under development at htt= ps://github.com/jjmccollum/context-sbl (this e-mail essentially repeats= my comments in https://github.com/jjmccollum/context-sbl/issues/5), but I'm = not sure if my solution is a recommended way to solve the problem, and I= 9;m curious about why the more straightforward approach doesn't work.

I've added useibid and useidem options for the \definebtx command (maki= ng them language-dependent by adding them to mult-def.lua, which seems to b= e how the other options have been implemented). Ideally, I'd like to fo= llow the pattern of the chicago:list:sameauthor setup and use a macro similar to \btxdoifsameaspreviouselse. But since \bt= xdoifsameaspreviouselse relies on the indexed structure of the bibliographi= c list to determine what the "previous" entry is, it won't wo= rk for my purposes; I need to retrieve the tag of the last entry passed to the \cite command.

I ended up making this work by initializing a global variable via

```
\setxvariables[btx:sbl][previousinlinetag=3D\empty]
```

in the publ-imp-sbl.mkvi file, resetting it at the end of each citation via=

```
\setxvariables[btx:sbl][previousinlinetag=3D\currentbtxtag]
```

and checking it in the appropriate places via

```
getvariable{btx:sbl}{previousinlinetag}
```

I initially tried to do this with a simple macro \btx_sbl_previousinlinetag= defined in publ-imp-sbl.mkvi (in the same scope as the rest of the specifi= cation), but attempting to reset it in the cite setups with \let or \def di= dn't work. Why doesn't this work? Is the setup for a cite alternative executed in its own scope in a way tha= t would prevent me from updating a variable defined in the scope of the ren= dering specification? And is there a way to do this that is preferable to u= sing global variables?

Thanks!

Joey

--00000000000029118605cc84229b-- --===============6002014886006257769== 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== --===============6002014886006257769==--