ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Joey McCollum via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Joey McCollum <jmccollum20140511@gmail.com>
Subject: Addition of authortitle sorttype for bibliographies
Date: Sun, 19 Sep 2021 14:02:07 -0400	[thread overview]
Message-ID: <CAGxRUG8P5QtRnoTx0GHJfZrPNoWtTT++wHrT=v4skXn5nkvoLQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1490 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1918 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2021-09-19 18:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 18:02 Joey McCollum via ntg-context [this message]
2021-09-20  2:57 ` Joey McCollum via ntg-context
2021-10-04 22:01   ` Joey McCollum via ntg-context
2021-10-05 12:55     ` Hans Hagen via ntg-context
2021-10-05 13:52       ` mf via ntg-context
2021-10-05 15:03         ` Henning Hraban Ramm via ntg-context
2021-10-05 16:46         ` Hans Hagen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGxRUG8P5QtRnoTx0GHJfZrPNoWtTT++wHrT=v4skXn5nkvoLQ@mail.gmail.com' \
    --to=ntg-context@ntg.nl \
    --cc=jmccollum20140511@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).