Implementing name sorts

Thinking about setting up some systematic tests of name sorting, and I
have a question.

Macros are normally used as the sort key for a name, to take advantage
of substitution, but macros may not display the name in the order to
be used in sort keys. So I’m wondering whether name-as-sort-order
should be forced to “all” when a name is processed to generate a sort
key.

Put another way, are there any cases in which names should be sorted
given-name first?

I can’t think of any such cases, and if it’s safe to force names into
the correct order for sorting when building a key, it would make
things a lot more foolproof for designers. Maybe this is the way
things work already in Zotero – I don’t know.

(I see that there are some styles in the repository that use . I assume that the individual names of which the
variable is composed should be delivered in sort order in this case –
I don’t think citeproc-js handles this yet, but I’ll fix it up along
with the rest of the name sorting stuff when I get there.)

Frank

Thinking about setting up some systematic tests of name sorting, and I
have a question.

Macros are normally used as the sort key for a name, to take advantage
of substitution,

Correct.

but macros may not display the name in the order to
be used in sort keys. So I’m wondering whether name-as-sort-order
should be forced to “all” when a name is processed to generate a sort
key.

Effectively, yes, but I’d go farther I think. For example, if et-al is
in effect, that also isn’t included in the sort string. I’d think of a
normalized string constructed specifically for sorting?

wall:jane;king:samuel;smith:david

Put another way, are there any cases in which names should be sorted
given-name first?

Only if there’s no family name.

I can’t think of any such cases, and if it’s safe to force names into
the correct order for sorting when building a key, it would make
things a lot more foolproof for designers. Maybe this is the way
things work already in Zotero – I don’t know.

What I describe above is how my XSLT code works.

Bruce

Thinking about setting up some systematic tests of name sorting, and I
have a question.

Macros are normally used as the sort key for a name, to take advantage
of substitution,

Correct.

but macros may not display the name in the order to
be used in sort keys. So I’m wondering whether name-as-sort-order
should be forced to “all” when a name is processed to generate a sort
key.

Effectively, yes, but I’d go farther I think. For example, if et-al is
in effect, that also isn’t included in the sort string. I’d think of a
normalized string constructed specifically for sorting?

wall:jane;king:samuel;smith:david

Right. I think that’s mentioned in the spec, actually.

Put another way, are there any cases in which names should be sorted
given-name first?

Only if there’s no family name.

I can’t think of any such cases, and if it’s safe to force names into
the correct order for sorting when building a key, it would make
things a lot more foolproof for designers. Maybe this is the way
things work already in Zotero – I don’t know.

What I describe above is how my XSLT code works.

Very good, looks like this squared away, then. Just needs testing and
coding, time permitting.