From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112906 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 11:16:15 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7044287349545726169==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14516"; 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 17:17:27 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 1mShWR-0003aA-3E for gctc-ntg-context-518@m.gmane-mx.org; Tue, 21 Sep 2021 17:17:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 14A39287831; Tue, 21 Sep 2021 17:16:34 +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 wbCrBYlUscjC; Tue, 21 Sep 2021 17:16:31 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E6C5128782E; Tue, 21 Sep 2021 17:16:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 871A528782C for ; Tue, 21 Sep 2021 17:16:29 +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 nLfnhueD9ghn for ; Tue, 21 Sep 2021 17:16:28 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.51; helo=mail-io1-f51.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (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 EE8C5287823 for ; Tue, 21 Sep 2021 17:16:27 +0200 (CEST) Original-Received: by mail-io1-f51.google.com with SMTP id p80so20936829iod.10 for ; Tue, 21 Sep 2021 08:16:27 -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=v6Nr7GNSpL/xY2caLPxQBq0f+g7QW2FSvCZ+j5TRxSs=; b=VdxeuJFnMf7mv75z6OfQJWYhpSS3yApmE5PhSEAZHc6A2zoRcaxqmFFQ5ixHIliySs 79s7w7vz4Ui4uiEPiKYxof3TzZgb71Tvanqe1WwIWK63JEQqNme/+fwZcxsfRc7oRgZS f3XH/akBhWK4nNuVWRujNdbqJrMVnE0qftHzf538ZS56DkKzHwrEOEzclbthzwFfVlqV aK0SYXmZTXzFL0gu9bn4yeMyk3lUGBkxpxaXiiWQ/+xWGM0yEsDOvvcC+gqFdNlQbH1g GBcej929g5ls1OecCbleZyT2kAP9uvlq2r3X09wdT01pViU35/YygmYue1BlE52SZ3TX K68Q== 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=v6Nr7GNSpL/xY2caLPxQBq0f+g7QW2FSvCZ+j5TRxSs=; b=7MNWFZo5JN4OCnGSR7zaMPQtsCJkpBegJsZkfg/LtPE0PVTZu8BBoWZbQLZCk0etmd 0mf59ODET7SAgK1Wz+N2DwaFJB60aB5VFqp8w7JFAm3aFihxFTdwCaMQqDE66vZG6EO/ aHtXE3V0sBEM2mV1/5qaS9kdPuZN1Skx1+6di8535bUM7EJY6gHsu3D/tS8cuKTPQ5AP npN/PA7pyZ/i8Jv3UzWtNVTBGoC+4S1HD2aZP9uX9Oe0C7dFTOIZuc2z8jnizY/8R0Kh GDKKGa66t3KF1IQmrpBiT33xNfuXt3lDwounDMEu2p8e8Gk82+aGa+MJp9aiOi92v4mM AZ2Q== X-Gm-Message-State: AOAM531vJCmiPu+yTify0ZYsBkenkXT5QB4XZ/Ytmu4Sn3vLPBtacbvO J7JeZKPlOj4OvnhbHR8Yp5Xq916JQ4WuMUfMKYI= X-Google-Smtp-Source: ABdhPJwRlsqZV0DDCHqU5Okgww8a3wwE+WZRAvc8SHD+1vjGDPVW637ddLb2xEkaRB9i3CbLxVQC7lcESCW7GT+OQwA= X-Received: by 2002:a6b:b842:: with SMTP id i63mr402673iof.115.1632237386405; Tue, 21 Sep 2021 08:16:26 -0700 (PDT) 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:112906 Archived-At: --===============7044287349545726169== Content-Type: multipart/alternative; boundary="0000000000009b1aee05cc82e1e1" --0000000000009b1aee05cc82e1e1 Content-Type: text/plain; charset="UTF-8" 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 on > 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 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=\empty] > ``` > > in the publ-imp-sbl.mkvi file, resetting it at the end of each citation via > > ``` > \setxvariables[btx:sbl][previousinlinetag=\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 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 > --0000000000009b1aee05cc82e1e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, I haven't added any code to check for the useibid= =C2=A0or useidem=C2=A0options 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 speci= fy their options separately. For list citations, we probably should add a &= quot;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 s= ign, or "Idem") as potential values, since all three of these opt= ions 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.<= div>
Joey

On Tue, Sep 21, 2021 at 12:52 AM <denis.maier@unibe.ch> 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 <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 https://github.com/jjmccollum/c= ontext-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, a= nd I'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 simil= ar to \btxdoifsameaspreviouselse. But since \btxdoifsameaspreviouselse reli= es on the indexed structure of the bibliographic list to determine what the= "previous" entry is, it won't work for my purposes; I need t= o 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 alternati= ve 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
--0000000000009b1aee05cc82e1e1-- --===============7044287349545726169== 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== --===============7044287349545726169==--