Counting authors

I’ve just taken a look back over the discussion of count-max, and I’d
like to float an idea.

That issue was prompted by the need to fetch the count of author names
into a sort key with a limit of 3, to satisfy the sort requirements of
AGU and AGU-based styles. Generality is nice, but on the face of it,
it seems like a simpler solution would be to just give the name
element an additional attribute value form=“count”, and provide an
option name=“max-name-count”. This would keep numeric values in a
familiar location where they are already used (for et-al-min etc), and
wouldn’t clutter up the conditional statement with complex attributes,
some of which work together and some of which don’t.

I know it’s late in the day on this item, but this solution does seem
like a good fit, and I’m curious what people think. It would
certainly be simple to implement, and it would leverage the existing
substitution logic very nicely.

Frank

I’m open to other solutions, but am not sure exactly what you’re
proposing. Care to give an example?

Bruce

I’m open to other solutions, but am not sure exactly what you’re
proposing. Care to give an example?

Here’s the concept in test form.

Frank

sort_NumberOfAuthorsAsKey.txt (2.08 KB)

I’m open to other solutions, but am not sure exactly what you’re
proposing. Care to give an example?

Here’s the concept in test form.

Here’s another test that illustrates what the output of form=“count” would be.

Frank

name_AuthorCount.txt (1.16 KB)

OK, now I’m getting confused by the syntax. :slight_smile:

Can we pull back and try to pin down the conceptual difference, and
why you think what you’re proposing is easier? I gather part of it is
that the counting is limited to (contributor) names. Is there
something else?

Bruce

I’m open to other solutions, but am not sure exactly what you’re
proposing. Care to give an example?

Here’s the concept in test form.

OK, now I’m getting confused by the syntax. :slight_smile:

Can we pull back and try to pin down the conceptual difference, and
why you think what you’re proposing is easier? I gather part of it is
that the counting is limited to (contributor) names. Is there
something else?

In the discussion, it was agreed that getting the author count in
string form was key (so to speak). This just does that directly, by
rendering the author set as a number. The CSL is more concise with
this approach, and I think it would be easier to understand and to
read.

A test based on count-max/count-min is attached for comparison. It’s
based on what I gleaned from a quick reading of the discussion
threads; if I’ve missed something please fix. The example assumes
that will return a count value for the
first non-nil element. If it returned a total value, you would need
nesting on each of the three conditional branches, which would take an
additional 15 lines of code or something.

Using form=“count” accomplishes the same thing, plus into the bargain
it could be extended to support totals across namesets without too
much pain, and with no changes to CSL syntax (i.e. by evaluating
). With count-min/count-max, it’s
more complicated to cover both use cases, and what gets counted and
whether and how multiple variables are totaled is not plain from the
CSL.

This only covers creator names, but extending form=“count” to cover
other countable things (although I can’t think of a use case offhand)
would not be difficult, if the need arises.

If I’ve missed something in how count-min/count-max is meant to work,
I’ll stand corrected, of course.

Frank

sort_NumberOfAuthorsAsKeyCountMinMax.txt (2.37 KB)

I’m open to other solutions, but am not sure exactly what you’re
proposing. Care to give an example?

Here’s the concept in test form.

OK, now I’m getting confused by the syntax. :slight_smile:

Can we pull back and try to pin down the conceptual difference, and
why you think what you’re proposing is easier? I gather part of it is
that the counting is limited to (contributor) names. Is there
something else?

In the discussion, it was agreed that getting the author count in
string form was key (so to speak). This just does that directly, by
rendering the author set as a number. The CSL is more concise with
this approach, and I think it would be easier to understand and to
read.

A test based on count-max/count-min is attached for comparison. It’s
based on what I gleaned from a quick reading of the discussion
threads; if I’ve missed something please fix. The example assumes
that will return a count value for the
first non-nil element. If it returned a total value, you would need
nesting on each of the three conditional branches, which would take an
additional 15 lines of code or something.

Actually, I was wrong about the number of extra lines needed to cope
with substitutions if the variable counts were totalled. It would
basically explode out of control; you would need to clone the entire
condition statement inside each branch, for each variable added. You
couldn’t use macros for it, unless there were a means of getting at
the output of the text elements, and feeding them back into the count
mechanism. So it looks like totals would basically be out, which cuts
against generality.

I hadn’t thought things through completely. With form=“count”, you
wouldn’t need an extra option attribute, because the count can be
limited by end=“3”. And the situation if count-min/count-max supplies
cross-variable totals is not quite as bad as I thought (although it’s
still not pretty).

Amended test samples attached. Sorry for the extra traffic.

Frank

sort_NumberOfAuthorsAsKey.txt (2.04 KB)

sort_NumberOfAuthorsAsKeyCountMinMax.txt (3.07 KB)

OK, this is a PITA.

Let’s go back to the source. Here’s the description from the AGU style guide:

“”"
Organize the reference list by strict letter-by-letter alphabetization
of the first item in the reference, as in the
sequence of Lane, Le Pichon, Macaulay, MacDonald, McDonald, Sanders,
Sandia National Laboratories, St.
Amant, Urey, von Seggern.

List references by the same first author in the following order:

  1. First author alone, list chronologically, earliest work first.
  2. One coauthor, list alphabetically by coauthor and then chronologically.
  3. Two or more coauthors (i.e., cited as “et al.” in text), list
    chronologically.

The following list illustrates this sequence:

Smith, A. (1989a),…
Smith, A. (1989b),…
Smith, A. (1991),…
Smith, A., and C. Allen (1992),…
Smith, A., and B. Frank (1995),…
Smith, A., and B. Frank (1997),…
Smith, A., L. Roberts, and T. Jones (1993),…
Smith, A., T. Jones, and L. Roberts (1997),…

Use only initials for first names. Alphabetize different first authors
having the same last name according to the
initials of their first names. If their initials are the same,
alphabetize them by their full names or by the last names
of the second authors if any. Use first author and et al. for more
than 10 authors: Smith, A., et al.
"""

So suggestion #1 is to incorporate these exact examples into the tests
(though see below b/c these examples aren’t as clear as they could
be).

Suggestion #2 is that our next round of test files needs to deal with
sorting more generally.

With that out of the way …

OK, this is a PITA.

Let’s go back to the source. Here’s the description from the AGU style guide:

“”"
Organize the reference list by strict letter-by-letter alphabetization
of the first item in the reference, as in the
sequence of Lane, Le Pichon, Macaulay, MacDonald, McDonald, Sanders,
Sandia National Laboratories, St.
Amant, Urey, von Seggern.

List references by the same first author in the following order:

  1. First author alone, list chronologically, earliest work first.
  2. One coauthor, list alphabetically by coauthor and then chronologically.
  3. Two or more coauthors (i.e., cited as “et al.” in text), list
    chronologically.

The following list illustrates this sequence:

Smith, A. (1989a),…
Smith, A. (1989b),…
Smith, A. (1991),…
Smith, A., and C. Allen (1992),…
Smith, A., and B. Frank (1995),…
Smith, A., and B. Frank (1997),…
Smith, A., L. Roberts, and T. Jones (1993),…
Smith, A., T. Jones, and L. Roberts (1997),…

Use only initials for first names. Alphabetize different first authors
having the same last name according to the
initials of their first names. If their initials are the same,
alphabetize them by their full names or by the last names
of the second authors if any. Use first author and et al. for more
than 10 authors: Smith, A., et al.
"""

So suggestion #1 is to incorporate these exact examples into the tests
(though see below b/c these examples aren’t as clear as they could
be).

Suggestion #2 is that our next round of test files needs to deal with
sorting more generally.

With that out of the way …

I hadn’t thought things through completely. With form=“count”, you
wouldn’t need an extra option attribute, because the count can be
limited by end=“3”. And the situation if count-min/count-max supplies
cross-variable totals is not quite as bad as I thought (although it’s
still not pretty).

OK, this is a PITA.

Looks pretty on the page, though. :slight_smile:

Let’s go back to the source. Here’s the description from the AGU style guide:

“”"
Organize the reference list by strict letter-by-letter alphabetization
of the first item in the reference, as in the
sequence of Lane, Le Pichon, Macaulay, MacDonald, McDonald, Sanders,
Sandia National Laboratories, St.
Amant, Urey, von Seggern.

List references by the same first author in the following order:

  1. First author alone, list chronologically, earliest work first.
  2. One coauthor, list alphabetically by coauthor and then chronologically.
  3. Two or more coauthors (i.e., cited as “et al.” in text), list
    chronologically.

The following list illustrates this sequence:

Smith, A. (1989a),…
Smith, A. (1989b),…
Smith, A. (1991),…
Smith, A., and C. Allen (1992),…
Smith, A., and B. Frank (1995),…
Smith, A., and B. Frank (1997),…
Smith, A., L. Roberts, and T. Jones (1993),…
Smith, A., T. Jones, and L. Roberts (1997),…

Use only initials for first names. Alphabetize different first authors
having the same last name according to the
initials of their first names. If their initials are the same,
alphabetize them by their full names or by the last names
of the second authors if any. Use first author and et al. for more
than 10 authors: Smith, A., et al.
“”"

So suggestion #1 is to incorporate these exact examples into the tests
(though see below b/c these examples aren’t as clear as they could
be).

Agreed, I’ll set this up.

Suggestion #2 is that our next round of test files needs to deal with
sorting more generally.

Outputting the bibliography covers that, no?

No, the last two items should be in year order, ignoring all authors
but the first.

Are you sure? I’m re-reading the style guide, and I’m not seeing this.
Can you point it out for me?

But, as I said, I think the guide is ambiguous.

Bruce

No, the last two items should be in year order, ignoring all authors
but the first.

Are you sure? I’m re-reading the style guide, and I’m not seeing this.
Can you point it out for me?

Yes, very sure. Their example has Jones after Roberts.

OIC; got it!

Let’s see if we can first describe this in plain English, as
succinctly as possible. How about …

"sort by first author, then number of contributors/authors, then year"

… ?

Or am I missing the fact that it makes no difference if there are
three or four or five author; that all of them get treated the same?

If yes, is there some necessary connection between this particular
aspect of the rules, and the et al specification?

Bruce

No, the last two items should be in year order, ignoring all authors
but the first.

Are you sure? I’m re-reading the style guide, and I’m not seeing this.
Can you point it out for me?

Yes, very sure. Their example has Jones after Roberts.

OIC; got it!

Let’s see if we can first describe this in plain English, as
succinctly as possible. How about …

“sort by first author, then number of contributors/authors, then year”

… ?

Or am I missing the fact that it makes no difference if there are
three or four or five author; that all of them get treated the same?

There’s a threshold. If there are two, they are placed in the second
group, and the second author is used as key #3, then year as key #4.
If there are more than three, the other authors become irrelevant –
year effectively becomes key #3 for that group.

If yes, is there some necessary connection between this particular
aspect of the rules, and the et al specification?

It’s just a succinct way (in the sense of not extending CSL or the
implementations) of disabling the third key in the third group.

No, the last two items should be in year order, ignoring all authors
but the first.

Are you sure? I’m re-reading the style guide, and I’m not seeing this.
Can you point it out for me?

Yes, very sure. Their example has Jones after Roberts.

OIC; got it!

Let’s see if we can first describe this in plain English, as
succinctly as possible. How about …

“sort by first author, then number of contributors/authors, then year”

… ?

FWIW, I’ve hooked up bibliographies in citeproc-js, done a trial
implementation of form=“count”, and have sort_NumberOfAuthorsAsKey
passing. I’ll set up the AGU example as a test later today and see
how that goes.

Andrea, if you have a little time do you have thoughts on the
respective proposals? The essence is in the examples:

Counting authors with form=“count”

Counting authors with count-max:

Both do the same thing, by different means. The issue they address is
the need to include an integer count of item contributors in the bib
sort key, which is required by the sorting conventions of some common
styles. (Personally, I’m fond of the form=“count” approach because
it’s shorter and easier to code, but I won’t scream if the decision
goes the other way. If we can reach consensus, though, we can put
this one behind us.)

Frank

FWIW, I’ve hooked up bibliographies in citeproc-js, done a trial
implementation of form=“count”, and have sort_NumberOfAuthorsAsKey
passing. I’ll set up the AGU example as a test later today and see
how that goes.

Andrea, if you have a little time do you have thoughts on the
respective proposals? The essence is in the examples:

Counting authors with form=“count”

XBib download | SourceForge.net

Counting authors with count-max:

XBib download | SourceForge.net

Both do the same thing, by different means.

And there’s the third option, which is only to support this as a
parameter option.

Bruce

FWIW, I’ve hooked up bibliographies in citeproc-js, done a trial
implementation of form=“count”, and have sort_NumberOfAuthorsAsKey
passing. I’ll set up the AGU example as a test later today and see
how that goes.

Andrea, if you have a little time do you have thoughts on the
respective proposals? The essence is in the examples:

Counting authors with form=“count”

XBib download | SourceForge.net

Counting authors with count-max:

XBib download | SourceForge.net

Both do the same thing, by different means.

And there’s the third option, which is only to support this as a
parameter option.

True, but everyone is going to code the infrastructure anyway, so why
restrict the functionality. In commerce that would make sense; the
first version gives you AGU, for variants you need to move up to the
deluxe version (which actually just runs additional parts of the same
code but costs more). I must confess that I don’t like the idea of a
single parameter governing hard-coded sort rules. Style designers
will understand sorting, they might as well have access to the logic.
I’m also not sure how you would stitch it in. Something like this?

Seems a bit like abandoning the field in the 10th inning somehow.

Frank

And there’s the third option, which is only to support this as a
parameter option.

True, but everyone is going to code the infrastructure anyway, so why
restrict the functionality.

You’re thinking about CSL from a programmer’s perspective. But we also
need to think about it from the style author’s or the GUI designer’s
perspective.

It is an option we need to consider. Each choice has trade-offs.

Bruce

And there’s the third option, which is only to support this as a
parameter option.

True, but everyone is going to code the infrastructure anyway, so why
restrict the functionality.

You’re thinking about CSL from a programmer’s perspective. But we also
need to think about it from the style author’s or the GUI designer’s
perspective.

It is an option we need to consider. Each choice has trade-offs.

Sure thing. As I said, I won’t kick up a fuss however it’s settled.
But my reservation isn’t driven by implementation worries, it is
exactly about giving designers the freedom to choose. I can guess at
what their views might be, but it’s just my guess, which is not known
for its reliability. I wonder if Elena’s watching the traffic lately.