From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112892 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: Sun, 19 Sep 2021 22:57:26 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4523447458547102846==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 20 04:58:30 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 1mS9Vk-00071X-OR for gctc-ntg-context-518@m.gmane-mx.org; Mon, 20 Sep 2021 04:58:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 46C1B287782; Mon, 20 Sep 2021 04:57:52 +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 ygpZRYxxXdLa; Mon, 20 Sep 2021 04:57:50 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 41594287759; Mon, 20 Sep 2021 04:57:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 969A9287753 for ; Mon, 20 Sep 2021 04:57:48 +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 QvuylN6C_aLA for ; Mon, 20 Sep 2021 04:57:47 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.170; helo=mail-il1-f170.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (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 3FBA9287739 for ; Mon, 20 Sep 2021 04:57:47 +0200 (CEST) Original-Received: by mail-il1-f170.google.com with SMTP id x2so2572550ilm.2 for ; Sun, 19 Sep 2021 19:57:47 -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=MR5BkWmOAhReaGQS6gWsaDHiR/gO8wockXF4k3spLJM=; b=dWg1phtQ77UvmJMjlasXR/H4ibq6sQbw8KAtw3gzu+5lZXLTucbzZpQWlQB0McpHKn RuUwXKbfKV26qpqXP8NRK6Fc5Ijd7OwA99HaEvWy4UEKt5anu04ba8tSo/yLvqGGFVBs M7g0sUjbZHYOPmRUulSrWrwiH1d7rlwpyN5yIwL6LAzUZ3H/hhAit2ZViJ2u8wOpzF/j /ZMOqD9sYeFOgiuRlxwcq1+iN8r0mgK9Jaai1oKCo0OsFqT4/PwIKZGk0rFk8HxcqgmE CaIPBWoplyHiN+d0kQkej2HnghLQjLAynRdU1X08pxWm9XNu1mcFimCnRCSjsAHvBsCt YbVw== 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=MR5BkWmOAhReaGQS6gWsaDHiR/gO8wockXF4k3spLJM=; b=u8moBgZyhVxxjbXnZz3KuuUlKCZOZviyfjCpxIFBvV4PKaGGXgNNphEuScDli7kr6q VNLvICHgmM4L0YRQDZ7+oIZSC36mSfrwnZS2k6nzw3MCEbv+9pgorjYAkr79XwiR7XM8 LpYuYeS6qsWb4WvXBoz5bYRyRFbjQdk4IoF/hLVD1qJKpLrYRgnm8QeD7qBF8VNzA9tJ vBnFxLb/Ue1KNfcsiMycTUrp6MpBx2szXJEaYDp88Qi5cesTNrpbjWgghZQYg0a8Xkla J7m7VFjI79M9fhQuL1ShM2SXpJ4VIrbNvWrUk2nOm09T3OKVCMD2acmY3nA12pjkPwTA Iouw== X-Gm-Message-State: AOAM533d8X5eMU8YIpdI6vnW1N23mJDzD5WUIykWj5d8FVu5p3UlbV6f ZsMB1ySNeNI45nrxjxC1m4xwnioL7eyiNX0v9JXeR1ngqJg= X-Google-Smtp-Source: ABdhPJxfS+miRN0jNrrUsYJNex42nNjStbPtE8mOahKvakfSjzhDmr42yEva/h14ythF4SfVhwuTFZBt5PWoDl4GUvQ= X-Received: by 2002:a05:6e02:12c9:: with SMTP id i9mr15540234ilm.20.1632106665116; Sun, 19 Sep 2021 19:57:45 -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:112892 Archived-At: --===============4523447458547102846== Content-Type: multipart/alternative; boundary="00000000000002877e05cc6472f1" --00000000000002877e05cc6472f1 Content-Type: text/plain; charset="UTF-8" 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 > --00000000000002877e05cc6472f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Actually, since some categories (such as=C2=A0@review and= =C2=A0@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 accom= modate them. The following sequence may be better:

```
publicatio= ns.sortmethods.authortitle =3D {
=C2=A0 =C2=A0 sequence =3D {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 { field =3D "author", =C2=A0 =C2=A0default = =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unknown =3D "&quo= t; },
=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 unknown= =3D "" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "bookt= itle", default =3D "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 un= known =3D "" }, -- if this is an untitled section (e.g., introduc= tion, 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 i= s 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 "", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unkn= own =3D "" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D "da= te", =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=A0default =3D "9998", =C2=A0 =C2=A0 =C2=A0 u= nknown =3D "9999" },
=C2=A0 =C2=A0 =C2=A0 =C2=A0 { field =3D &= quot;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 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 or= der for the volume field to sort properly, its values will have to be padde= d with leading zeroes; otherwise, an entry with volume =3D {2} will be sort= ed after one with volume =3D {10}. To accommodate this, specifications woul= d need to remove the leading zeroes when they typeset volume and part numbe= rs.

Joey

<= div dir=3D"ltr" class=3D"gmail_attr">On Sun, Sep 19, 2021 at 2:02 PM Joey M= cCollum <jmccollum2014051= 1@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
--00000000000002877e05cc6472f1-- --===============4523447458547102846== 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== --===============4523447458547102846==--