Citation Style Language

Citation-label formatting

Currently, CSL assumes that citation-label is provided as flat text by the supplying client. For label citation styles, styles differ regarding their preferred citation label, however (e.g., see https://forums.zotero.org/discussion/80232/citation-label-trying-to-prepare-iste-stylesheet#latest). The main differences are whether to use 3 or 4 letters to define the label, whether to include a year, and how to handle disambiguation and items without authors.

Currently, citeproc-js has a hardcoded pattern: Aaaa00:AaAa00:AaAA00:AAAA00. Jursim has a preference to customize this pattern. Other clients could add similar preferences, but this seems like something that may best be handled by CSL rather than an ad-hoc solution determined by clients.

There was this discussion a while back when citeproc-js added its default format, but that discussion seemed to assume that citation-label referred to a BibTeX key, not a rendered citation label ala DIN 1505-2 or similar styles.

If this isn’t something we want to define in CSL, it seems like at least the processors might want to include a hook for generating or supplying citation-label, in the same way that citeproc-js does. @cormacrelf

If by client you mean processor, then I think I follow. The most obvious thing I can think of is a format string, not unlike formatting dates with “%Y” etc. Some more style guide requirements would help design one that can do them all.

citeproc-js uses the format Aaaa00:AaAa00:AaAA00:AAAA00

Is that a well-known format string that I’m just unfamiliar with? How does it work?

Sorry, it’s (Format for items with one author):(Formats for items with two authors):(Three authors):(Four or more authors). “A” indicates first letter of an author’s family name, “a” indicates subsequent letters of that author’s family name, “00” indicates the final two digits of the year. So “AaAa00” means “The first and second letter of each author’s name, followed by the last two digits of the date.”