Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citation Label #24

Open
rmzelle opened this issue Jan 19, 2011 · 14 comments · May be fixed by zotero/zotero-schema#2
Open

Citation Label #24

rmzelle opened this issue Jan 19, 2011 · 14 comments · May be fixed by zotero/zotero-schema#2

Comments

@rmzelle
Copy link
Collaborator

rmzelle commented Jan 19, 2011

By adding a "Citation Label"/citationLabel field (mapped to citation-label in CSL) to all item types, we should be able to support most label styles. Users will have to add the labels themselves, although here Zotero's forthcoming read/write API might help out: it would be relatively easy to write a label generator.

@simonster
Copy link
Member

r+ generally. Maybe we want to automatically generate labels according to some user-specified schema to satisfy the BibTeX folks and everyone else who has been asking for an easy way to get an item identifier from the interface? Probably maps to BIBO as z:citationLabel on user item.

Copy link
Collaborator

Agreed that the generation of labels should be controlled by a hidden preference that provides sprintf format strings, like we have now within BibTeX.js and for file renaming.

Complex label styles will need a support utility or careful curation, but can we do initialisms using sprintf alone?

I'd also like to add the option of inserting the item key into the label, so that people can more easily pull that out of the data as well.

@bdarcus
Copy link
Collaborator

bdarcus commented Mar 25, 2011

I'd also like to add the option of inserting the item key into the label, so that people can more easily pull that out of the data as well.

This sounds a little odd of a solution. We have an opaque database id for machines (which cannot change), and then a natural language key for machines and humans (but which can change) to achieve the same thing: uniquely identify an item within the scope of a library. And now we'd have one field which can represent either?

I'd prefer another method to expose the machine key if necessary.

On the configurable generation, I was recently playing with a function in ruby, with I think a clever way to generate a portion of a title as a disambiguator (is that a word?):

https://gist.github.com/886834

But to Avram's point, main thing is to be able to:

  1. downcase strings
  2. disambiguate same author/year items

@simifilm
Copy link

simifilm commented Jan 7, 2013

Any chance this gets implemented?

@adam3smith
Copy link
Collaborator

If I understand correctly, this is all tied up in the revamp of Zotero fields, which in turn is tied to rewriting syncing to ensure compatibility between clients etc. As per Simon above this is generally supported by devs and that was still the case when I talked to him a couple of months ago, but it may unfortunately take a bit of time still.

@retorquere
Copy link

Is any news available on a possible ETA for that revamp?

@adam3smith
Copy link
Collaborator

"later this year" has been what Dan is saying and recent activity on github suggests things are pretty far advanced.

@bwiernik bwiernik added zotero and removed zotero labels May 26, 2020
@bwiernik
Copy link
Collaborator

Hmm, note that there are two things being described as a "citation label".

The original post referred to citation-label--a variable that should actually appear in text for label/trigraph styles (e.g., "SmJo1965"). There is a discussion for providing a syntax for automatically generating labels here.

In all of the replies, that variable is usually described as a "citation key" or "citekey". That is analogous to the id variable in CSL-JSON and indicates a placeholder used while writing in plain text systems like BibTeX or Markdown, which is eventually replaced with formatted citations.

@dstillman
Copy link
Member

So do we want citationKey (for BibTeX/etc.) and citationLabel (for label styles) for all types, or can we just have a citationKey field that also gets used for label styles? (People are going to be confused by the difference.)

@retorquere
Copy link

I don't know what citation-label does in CSL, but if there's a strong overlap, I could switch to citationLabel with citationKey as an alias. Bibtex users will be more used to citation key though, and semantically, in bibtex, it is a key (it uniquely identifies an item) rather than a label (which describes one of potentially multiple characteristics of an item, and can be shared between items).

@adam3smith
Copy link
Collaborator

My view is the field should just be key. Label formats actually vary by citation style, so ideally would be configurable algorithmically, but they are also fairly rare.

@retorquere
Copy link

retorquere commented Aug 23, 2021

WRT algorithmic generation, would appreciate being part of the dialogue, I'd prefer to align BBTs pattern format as close as possible (even if only by adding a formatter function that will yield a style-bound key generated by the csl processor - people are going to want them)

@bwiernik
Copy link
Collaborator

CSL 1.1 will include style syntax for specifying a label. citation-label will be generated by the processor and should not have an item field in Zotero.

citation-key ala BibTeX should be specified as part of the item. This is mostly to facilitate use with BibTeX/pandoc systems to be a human-readable variable that can be called in lieu of the machine-readable id

dstillman added a commit to zotero/zotero-schema that referenced this issue Aug 23, 2021
- Add DOI to all item types (closes zotero/zotero-bits#1)
- Add `citationKey` to all item types (closes zotero/zotero-bits#24)
- Add `date` to `podcast` (closes zotero/zotero-bits#2)
- Add `ISSN` to additional types (closes zotero/zotero-bits#4)
- Add `section` to `journalArticle` (closes zotero/zotero-bits#5)
- Add `PMID`, `PMCID`, and `arXiv ID` to `journalArticle` (closes
  zotero/zotero-bits#10)
- Add `originalPlace`, `originalPublisher`, and `originalDate` to `book`
  and `bookSection` (closes zotero/zotero-bits#13)
- Add `priorityDate` to `patent`, mapped to `originalDate` (closes
  zotero/zotero-bits#76)
- Add `partNumber` and `partTitle` to `journalArticle` (closes
  zotero/zotero-bits#12)
- Move `shortTitle` and `language` near the bottom, since most people
  either won't use them or will use them purely as a technical measure to
  adjust citation output
- Move `libraryCatalog` and `callNumber` to the bottom, above rights,
  since they never made that much conceptual sense in Zotero (and
  `libraryCatalog` is mostly just used for the translator name these days)
@dstillman dstillman linked a pull request Aug 23, 2021 that will close this issue
dstillman added a commit to zotero/zotero-schema that referenced this issue Jun 29, 2022
- Add DOI to all item types (closes zotero/zotero-bits#1)
- Add `citationKey` to all item types (closes zotero/zotero-bits#24)
- Add `date` to `podcast` (closes zotero/zotero-bits#2)
- Add `ISSN` to additional types (closes zotero/zotero-bits#4)
- Add `section` to `journalArticle` (closes zotero/zotero-bits#5)
- Add `PMID`, `PMCID`, and `arXiv ID` to `journalArticle` (closes
  zotero/zotero-bits#10)
- Add `originalPlace`, `originalPublisher`, and `originalDate` to `book`
  and `bookSection` (closes zotero/zotero-bits#13)
- Add `priorityDate` to `patent`, mapped to `originalDate` (closes
  zotero/zotero-bits#76)
- Add `partNumber` and `partTitle` to `journalArticle` (closes
  zotero/zotero-bits#12)
- Move `shortTitle` and `language` near the bottom, since most people
  either won't use them or will use them purely as a technical measure to
  adjust citation output
- Move `libraryCatalog` and `callNumber` to the bottom, above rights,
  since they never made that much conceptual sense in Zotero (and
  `libraryCatalog` is mostly just used for the translator name these days)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

9 participants