Style-specific ordinals

The Bluebook specifies a quirky set of ordinals:

1st
2d (not rd)
3d (not nd)
4th

Locally, I implemented this by opening up style-specific localization
of ordinal strings, through the ordinary localization machinery. The
CSL frontmatter contains this:

st d d th

Because these are not registered in the global localization defaults,
other languages fall back to English. The result is that the ordinals
given in the style file (for English only, if that’s all that’s
written in) will take effect for all languages. This seems to work
well for the issue, and shouldn’t step on other styles. The syntax of
the names is extensible as well, which might come in handy if it
proves necessary to support ordinals in languages with more than four
suffixes. The downside, I suppose, is that “localization” has a
slightly different meaning for these terms, and requires a bit of
explanation. But it works smoothly.

Thoughts on this approach as a proposal for inclusion in CSL?

Frank Bennett

Frank Bennett wrote:

The Bluebook specifies a quirky set of ordinals:

1st
2d (not rd)
3d (not nd)
4th

Locally, I implemented this by opening up style-specific localization
of ordinal strings, through the ordinary localization machinery. The
CSL frontmatter contains this:

st d d th

Because these are not registered in the global localization defaults,
other languages fall back to English. The result is that the ordinals
given in the style file (for English only, if that’s all that’s
written in) will take effect for all languages. This seems to work
well for the issue, and shouldn’t step on other styles. The syntax of
the names is extensible as well, which might come in handy if it
proves necessary to support ordinals in languages with more than four
suffixes. The downside, I suppose, is that “localization” has a
slightly different meaning for these terms, and requires a bit of
explanation. But it works smoothly.

Thoughts on this approach as a proposal for inclusion in CSL?

Frank Bennett


Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
Best Open Source Mac Front-Ends 2023


xbiblio-devel mailing list
xbiblio-devel@lists.sourceforge.net
xbiblio-devel List Signup and Options

Hello,
How can I make difference between masculin and feminin (German, French,
Romanian etc.)?
In Romanian:

  1. for edition, it’s correct: 1-a, a 2-a, a 3-a
  2. for volume, it’s correct: 1, al 2-lea, al 3-lea

Thanks,
Nicu

Frank Bennett wrote:

The Bluebook specifies a quirky set of ordinals:

1st
2d (not rd)
3d (not nd)
4th

Locally, I implemented this by opening up style-specific localization
of ordinal strings, through the ordinary localization machinery. The
CSL frontmatter contains this:

st d d th

Because these are not registered in the global localization defaults,
other languages fall back to English. The result is that the ordinals
given in the style file (for English only, if that’s all that’s
written in) will take effect for all languages. This seems to work
well for the issue, and shouldn’t step on other styles. The syntax of
the names is extensible as well, which might come in handy if it
proves necessary to support ordinals in languages with more than four
suffixes. The downside, I suppose, is that “localization” has a
slightly different meaning for these terms, and requires a bit of
explanation. But it works smoothly.

Thoughts on this approach as a proposal for inclusion in CSL?

Frank Bennett


Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
Best Open Source Mac Front-Ends 2023


xbiblio-devel mailing list
xbiblio-devel@lists.sourceforge.net
xbiblio-devel List Signup and Options

Hello,
How can I make difference between masculin and feminin (German, French,
Romanian etc.)?
In Romanian:

  1. for edition, it’s correct: 1-a, a 2-a, a 3-a
  2. for volume, it’s correct: 1, al 2-lea, al 3-lea

Thanks,
Nicu

Ah, point taken. Gender can be handled using the same approach, by
assigning suffixes to variables explicitly:

st d d th -al -lea -lea -lea -a -a -a -a

If, after application of the algorithm, no locale value is found for
the ordinal, the fallback should be to the plain ordinal. In this
case, you would get English as visible breakage.

An interesting case is Swedish, with five ordinal suffixes and largely
arbitrary rules of assignment:

But if wikipedia is to be believed, Swedish publishing appears to use
a simplified set of conventions for abbreviated suffixes, so it looks
like the same schema will cope:

:a :e :e :e

How does that do?

Frank Bennett

Another thought on ordinals …

How can I make difference between masculin and feminin (German, French,
Romanian etc.)?
In Romanian:

  1. for edition, it’s correct: 1-a, a 2-a, a 3-a
  2. for volume, it’s correct: 1, al 2-lea, al 3-lea

Thanks,
Nicu

Ah, point taken. Gender can be handled using the same approach, by
assigning suffixes to variables explicitly:

st d d th -al -lea -lea -lea -a -a -a -a

Hmm … when implementing this, the ordinal suffixes will need to go
into some sort of array specific to this category of terms. It might
make that task simpler, and make the CSL more readable, if instead of
“term” this used an element “ordinals” that contains several “ordinal”
elements. That would also keep the “variable” attribute out of the
term element, where it has no general purpose.

Frank

Revisiting this now from the perspective of implementing CSL, I’m
wondering whether it might make sense to add the term names ordinal-01
through ordinal-04 to the standard CSL locale files.

That makes sense to me. Andrea?

Note: I added a :‘long-ordinal’ option over the weekend.

Bruce

Note: I added a :‘long-ordinal’ option over the weekend.

Thanks. On the topic of numbering, did we ever decide on a good way
of choosing whether or not to superscript the ordinal suffix?

e.g.
(1), 2nd,
(2), ^{2nd},
(3), 2^{nd},

(I can’t think of why anyone would want behavior (2), but it still
seems like that would be a consistent use of formatting rules.)

I think this subject came up (probably in the Zotero forums, but maybe
in their TRAC), but I can’t immediately find it.

–Rick

Revisiting this now from the perspective of implementing CSL, I’m
wondering whether it might make sense to add the term names ordinal-01
through ordinal-04 to the standard CSL locale files.

That makes sense to me. Andrea?

Note: I added a :‘long-ordinal’ option over the weekend.

A couple of questions on long-ordinal:

  1. Is there an upper limit on the integers that this should handle?
  2. If so, what should be the behaviour when the limit is exceeded?

I don’'t really know how to deal with this, and don’t have time ATM to
think about it. Be if people have thoughts/ideas, please post them.

Bruce