Thanks Taco. I hope you don’t mind, but I’m cc-ing my reply to the
list. Taco wrote and maintains the ConTeXt bib module, so have no
doubt a lot of first hand experience with sorting and grouping issues.
Bruce D’Arcus wrote:
Taco – do you have any thoughts on this issue? The concrete issue
I’m trying work out here is how to configure the logic that says
“sort on creator name; if not present, then if article, use
periodical title, if book use “Anonymous”, etc.”
What I’d really like is a way to change the global sort order without
having to edit lots of places in the style
Yes, I’d like to keep the CSL as simple as it can be.
, but besides that, I’m
not quite sure what the best solution would be.
It would be weird to sort ‘article’ fundamentally different from
say ‘manual’, so I believe it makes sense to define an abstract
sort specification like
The thing is, there are some reference types that do sort differently.
For example, a legal case uses the case title as the sortkey. This is
the example that threw me (I have a few legal documents in the book I’m
working on), and made me reconsider the whole damned thing!
somewhere on top-level. Then (if needed) use an extra block in the
reftype to map element names to abstraction layer:
Anonymous.
..
But , there will be ‘defaulting’ problems with this approach as
well, I’m afraid.
Let me tell what I started to think last night, and see if this makes
sense:
All along I’ve tried to keep CSL fairly simple. Where I can, this
means I either make implicit assumptions, or have a parameter that
makes it explicit.
So, the most important parameter is the citation style class. The
citation class that I’m working on here is author-year. Other classes
are number, citekey, and note-nobib and note-bib (both footnote/endnote
styles).
I assume most of the sorting logic based on the citation style class.
So, the citekey class will sort on the citekey (with an option for
author-year sorting), the number class on the number, etc.
Now, the tricky part is that you often have stuff like this in
author-year, if there is no “author”:
if a periodical article, then substitute the periodical title
if a monograph, substitute "Anonymous"
Now, what dawned on me yesterday is that this complicated substitution
only needs to be configured in the author-year class, and it only needs
to apply to cs:creator. If I define something like:
...
Then that title will be there (it has to be). I don’t need to allow
users infinite configurability here, and indeed it will make their
lives (and mine!) easier.
So now I’m just thinking that I model that in CSL (I’m using RELAX NG,
so I can do this):
BibliographyLayout-author-year = element bibliography { ( Creator |
Title ), OtherFormatting }
Creator = element creator { attribute alternate-sortkey {
“container-title”, “anonymous”, “title” }
… and then have the formatting of “anonymous” defined somewhere else.
How’s that?
How does tend to work in m-bib?
Bruce