From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112987 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joey McCollum via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Addition of authortitle sorttype for bibliographies Date: Mon, 4 Oct 2021 18:01:45 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7917074072050158304==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21159"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 05 00:02:39 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 1mXW2h-0005J9-Pl for gctc-ntg-context-518@m.gmane-mx.org; Tue, 05 Oct 2021 00:02:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3AA25287D83; Tue, 5 Oct 2021 00:02:04 +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 A5kJzkZhagTn; Tue, 5 Oct 2021 00:02:02 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CAC54287D5E; Tue, 5 Oct 2021 00:02:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 056D8287CDB for ; Tue, 5 Oct 2021 00:02:00 +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 tvBW_W-Skt7D for ; Tue, 5 Oct 2021 00:01:58 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.182; helo=mail-il1-f182.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) (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 574B7281B5B for ; Tue, 5 Oct 2021 00:01:58 +0200 (CEST) Original-Received: by mail-il1-f182.google.com with SMTP id l20so7543567ilk.2 for ; Mon, 04 Oct 2021 15:01:58 -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; bh=QM0/oejUu+hHj2WaJuBl6OIyuipWiUu16tUIkztl3tY=; b=FDUfZhOLduyVFgWtlBwVv7YD7xtLyTRU9+eEUpe3Q9lvXf/ft67+hoR+WE1n30PGiy eYRgwYeAp4MWb72GGH9sWocrXYZzxYsfqiAGo4KoRo/EPZORheUsr5FI2OplCGzTQFJu uny/EQ7QhnpnE0WmZrRDgIM895P11ZxzP01HjOjn2wQq8t4PYwNvKp8Wy9CWQVxWumq5 KVka68lcIZrpDzNjTATF1D2f/aQjG6wQ44OWFiur3Mp6MJB8aFzdgFZIQrC7Ge++ZkTc TrtMR430VlKADdfhMlhwW7RCsY0Cb56q7AHJQTKxChzbAVicdZtlR+0ygrDRZTYNgwMS IzTQ== 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; bh=QM0/oejUu+hHj2WaJuBl6OIyuipWiUu16tUIkztl3tY=; b=lYJRlB9qQmgeW/fj5udMcjYIHfgVKx+j6/fMTLkXVBfqShCBsVJw9xBKfzXBD9TqMx 2/UI7aj7NKem4Npc8Y85VXBj/QAzM94hn0hzK+Sirx6J48vfbQpMCudtosqabytxRiwn R11mWsOaL1AlppkqsJYiXJJ01leU5p64xfQQvWJzWbboXIApibvHISzyYpUcBZ5C3eIR pXOM896IFHbt+Hn9IQ/iaWNRrPMM1S8Dz7TDGkMPk9MNWr8S7RZXcEj+aJuL8ZSsFYjC DGzWp1k+Eg5ZJNrd7LpvDu9myPNLc0vatYWZRyU38Xxb+h97igxMqw3QNHQ6CDGAtBEC 29rg== X-Gm-Message-State: AOAM533H51CwJmGB39X/Bhh6IiDmyzJBzPlfu+Vbc8CTud2UKY5l+ikL uqEq12F9272Jy/YuNqjfkqNU17HkBwQCzEZ11wKWSivLj2s= X-Google-Smtp-Source: ABdhPJwn8rt5aMiW1G0VzVXvB/uYIXM8mR188veDsmsHyETvl8PbBgBgW/BYXid9EcWOOP7MHK/og3RTl9Aa7jxQgBw= X-Received: by 2002:a92:ca49:: with SMTP id q9mr360461ilo.54.1633384916104; Mon, 04 Oct 2021 15:01:56 -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:112987 Archived-At: --===============7917074072050158304== Content-Type: multipart/alternative; boundary="000000000000b4b93305cd8e0f09" --000000000000b4b93305cd8e0f09 Content-Type: text/plain; charset="UTF-8" I'm not sure if this thread got lost back when I sent it, but I just wanted to bump this thread again. The authortitle sort sequence detailed in the previous e-mail is working as expected, and it may be a helpful addition to the publ-aut.lua file for general use. In case the last e-mail was lost, I've repeated the code below: ``` publications.sortmethods.authortitle = { sequence = { { field = "author", default = "", unknown = "" }, { field = "title", default = "", unknown = "" }, { field = "booktitle", default = "", unknown = "" }, -- if this is an untitled section (e.g., introduction, foreword, preface) of a book or a review of a book { field = "maintitle", default = "", unknown = "" }, -- if this is an untitled section or volume in a multivolume collection { field = "volume", default = "", unknown = "" }, { field = "part", default = "", unknown = "" }, { field = "date", default = "9998-13-32", unknown = "9999-14-33" }, -- some specifications allow date instead of year, month, day { field = "year", default = "9998", unknown = "9999" }, { field = "month", default = "13", unknown = "14" }, { field = "day", default = "32", unknown = "33" }, { field = "index", default = "", unknown = "" }, }, } ``` Joey On Sun, Sep 19, 2021 at 10:57 PM Joey McCollum wrote: > Actually, since some categories (such as @review and @suppbook from > biblatex) do not necessarily have titles of their own, it may be best to > include a few other fields in the sort sequence to accommodate them. The > following sequence may be better: > > ``` > publications.sortmethods.authortitle = { > sequence = { > { field = "author", default = "", unknown = "" }, > { field = "title", default = "", unknown = "" }, > { field = "booktitle", default = "", unknown = "" }, -- > if this is an untitled section (e.g., introduction, foreword, preface) of a > book or a review of a book > { field = "maintitle", default = "", unknown = "" }, -- > if this is an untitled section or volume in a multivolume collection > { field = "volume", default = "", unknown = "" }, > { field = "part", default = "", unknown = "" }, > { field = "date", default = "9998-13-32", unknown = > "9999-14-33" }, -- some specifications allow date instead of year, month, > day > { field = "year", default = "9998", unknown = "9999" }, > { field = "month", default = "13", unknown = "14" }, > { field = "day", default = "32", unknown = "33" }, > { field = "index", default = "", unknown = "" }, > }, > } > ``` > > It is also worth noting that in order for the volume field to sort > properly, its values will have to be padded with leading zeroes; otherwise, > an entry with volume = {2} will be sorted after one with volume = {10}. To > accommodate this, specifications would need to remove the leading zeroes > when they typeset volume and part numbers. > > Joey > > On Sun, Sep 19, 2021 at 2:02 PM Joey McCollum > wrote: > >> Hi, >> >> I've had to make another update to the general publications support code >> in order to implement a feature of the SBL rendering. Denis Maier has >> opened some issues on the context-sbl GitHub repo ( >> https://github.com/jjmccollum/context-sbl) to offer some helpful >> suggestions about needed features and bug fixes. One issue was that SBL >> should order list entries by author and title. Thankfully, there is already >> an authordate sortmethod defined in publ-aut.lua (probably to support the >> Chicago rendering), so I was able to use it as a template for the >> following authortitle sort sequence: >> >> ``` >> publications.sortmethods.authortitle = { >> sequence = { >> { field = "author", default = "", unknown = "" }, >> { field = "title", default = "", unknown = "" }, >> { field = "date", default = "9998-13-32", unknown = >> "9999-14-33" }, -- some specifications allow date instead of year, month, >> day >> { field = "year", default = "9998", unknown = "9999" }, >> { field = "month", default = "13", unknown = "14" }, >> { field = "day", default = "32", unknown = "33" }, >> { field = "index", default = "", unknown = "" }, >> }, >> } >> ``` >> >> I added this to publ-aut.lua because publications.sortmethods.authoryear >> is defined in that file, but if another location is more appropriate, then >> feel free to let me know, and I can move it! Otherwise, if this looks okay >> to include in a future update, then feel free to incorporate it! >> >> Joey >> > --000000000000b4b93305cd8e0f09 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm not sure if this thread got lost back when I sent = it, but I just wanted to bump this thread again. The authortitle sort seque= nce detailed in the previous e-mail is working as expected, and it may be a= helpful addition to the publ-aut.lua file for general use. In case the las= t e-mail was lost, I've repeated the code below:

```
publicat= ions.sortmethods.authortitle =3D {
=C2=A0 =C2=A0 sequence =3D {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "author", =C2=A0 =C2=A0defau= lt =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "&= quot; },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "title", =C2= =A0 =C2=A0 default =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unk= nown =3D "" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "b= ooktitle", default =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 unknown =3D "" }, -- if this is an untitled section (e.g., in= troduction, foreword, preface) of a book or a review of a book
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 { field =3D "maintitle", default =3D "&= quot;, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" }, -- if= this is an untitled section or volume in a multivolume collection
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "volume", =C2=A0 =C2=A0defau= lt =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "&= quot; },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "part", =C2= =A0 =C2=A0 =C2=A0default =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 unknown =3D "" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D = "date", =C2=A0 =C2=A0 =C2=A0default =3D "9998-13-32", u= nknown =3D "9999-14-33" }, -- some specifications allow date inst= ead of year, month, day
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "ye= ar", =C2=A0 =C2=A0 =C2=A0default =3D "9998", =C2=A0 =C2=A0 = =C2=A0 unknown =3D "9999" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { fie= ld =3D "month", =C2=A0 =C2=A0 default =3D "13", =C2=A0 = =C2=A0 =C2=A0 =C2=A0 unknown =3D "14" },
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 { field =3D "day", =C2=A0 =C2=A0 =C2=A0 default =3D "= 32", =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "33" },
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "index", =C2=A0 =C2=A0 defau= lt =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "&= quot; },
=C2=A0 =C2=A0 },
}
```

Joey
<= /div>
O= n Sun, Sep 19, 2021 at 10:57 PM Joey McCollum <jmccollum20140511@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Actually,= since some categories (such as=C2=A0@review and=C2=A0@suppbook from biblat= ex) do not necessarily have titles of their own, it may be best to include = a few other fields in the sort sequence to accommodate them. The following = sequence may be better:

```
publications.sortmethods.authortitle = =3D {
=C2=A0 =C2=A0 sequence =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { fiel= d =3D "author", =C2=A0 =C2=A0default =3D "", =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" },
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 { field =3D "title", =C2=A0 =C2=A0 default =3D "&= quot;, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" },
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "booktitle", default =3D = "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" }= , -- if this is an untitled section (e.g., introduction, foreword, preface)= of a book or a review of a book
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D= "maintitle", default =3D "", =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 unknown =3D "" }, -- if this is an untitled section or= volume in a multivolume collection
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field = =3D "volume", =C2=A0 =C2=A0default =3D "", =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" },
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 { field =3D "part", =C2=A0 =C2=A0 =C2=A0default =3D &q= uot;", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" },<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "date", =C2=A0 =C2=A0 = =C2=A0default =3D "9998-13-32", unknown =3D "9999-14-33"= ; }, -- some specifications allow date instead of year, month, day
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "year", =C2=A0 =C2=A0 =C2=A0= default =3D "9998", =C2=A0 =C2=A0 =C2=A0 unknown =3D "9999&q= uot; },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "month", =C2= =A0 =C2=A0 default =3D "13", =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown = =3D "14" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "day&= quot;, =C2=A0 =C2=A0 =C2=A0 default =3D "32", =C2=A0 =C2=A0 =C2= =A0 =C2=A0 unknown =3D "33" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { f= ield =3D "index", =C2=A0 =C2=A0 default =3D "", =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "" },
=C2=A0 =C2=A0 },=
}
```

It is also worth noting that in order for the volume fi= eld to sort properly, its values will have to be padded with leading zeroes= ; otherwise, an entry with volume =3D {2} will be sorted after one with vol= ume =3D {10}. To accommodate this, specifications would need to remove the = leading zeroes when they typeset volume and part numbers.

Joey

On Sun, Sep 19, 2021 at 2:02 PM Joey McCollum <jmccollum20140511= @gmail.com> wrote:
Hi,

I've had to make ano= ther update to the general publications support code in order to implement = a feature of the SBL rendering. Denis Maier has opened some issues on the c= ontext-sbl GitHub repo (https://github.com/jjmccollum/context-sbl) to offe= r some helpful suggestions about needed features and bug fixes. One issue w= as that SBL should order list entries by author and title. Thankfully, ther= e is already an authordate sortmethod defined in publ-aut.lua (probably to = support the Chicago rendering), so I was able to use it as a template for t= he following=C2=A0authortitle sort sequence:

```
publicati= ons.sortmethods.authortitle =3D {
=C2=A0 =C2=A0 sequence =3D {
=C2=A0= =C2=A0 =C2=A0 =C2=A0 { field =3D "author", =C2=A0default =3D &qu= ot;", =C2=A0 =C2=A0 unknown =3D "" },
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 { field =3D "title", =C2=A0 default =3D "", = =C2=A0 =C2=A0 unknown =3D "" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { = field =3D "date", =C2=A0default =3D "9998-13-32", =C2= =A0 =C2=A0 unknown =3D "9999-14-33" }, -- some specifications all= ow date instead of year, month, day
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field = =3D "year", =C2=A0 =C2=A0default =3D "9998", unknown = =3D "9999" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "mo= nth", =C2=A0 default =3D "13", =C2=A0 unknown =3D "14&q= uot; },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "day", =C2=A0 = =C2=A0 default =3D "32", =C2=A0 unknown =3D "33" },
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "index", =C2=A0 default = =3D "", =C2=A0 =C2=A0 unknown =3D "" },
=C2=A0 =C2= =A0 },
}
```

I added this to publ-aut.lua because publications= .sortmethods.authoryear is defined in that file, but if another location is= more appropriate, then feel free to let me know, and I can move it! Otherw= ise, if this looks okay to include in a future update, then feel free to in= corporate it!

Joey
--000000000000b4b93305cd8e0f09-- --===============7917074072050158304== 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== --===============7917074072050158304==--