# citation-label

**URL:** <https://discourse.citationstyles.org/t/citation-label/761>\
**Category:** CSL Development\
**Created:** [September 8, 2009, 9:28pm UTC](https://discourse.citationstyles.org/t/citation-label/761 "2009-09-08T21:28:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [September 8, 2009, 9:28pm UTC](https://discourse.citationstyles.org/t/citation-label/761/1 "2009-09-08T21:28:05Z")

</div>

Rintze has pointed out that we have a citation-label item in the  
schema, which is apparently intended to provide BibTeX keys. If there  
are no objections, the processor can build these automatically, using  
one of the common key generation patterns, like:

Family name of first author or editor, plus year issued, plus a  
year-suffix style disambiguation string if needed.

If family name is unavailable, use the short form of the "references"  
term (this term needs cleaning up, thanks to yours truly – more on  
that in a following post). If year is unavailable, use “0000” as a  
placeholder. This would allow implementation of an AMS style, which  
is conspicuously missing from the repository.

If there is strong demand for more flexibility further down the road,  
then either Zotero can add a field to override the auto-generated  
value, or some configuration scheme can be implemented  
([http://jabref.sourceforge.net/help/LabelPatterns.php](http://jabref.sourceforge.net/help/LabelPatterns.php)). But for now,  
a simple key is no problem to introduce, if there are no objections.

Frank

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [September 9, 2009, 4:23pm UTC](https://discourse.citationstyles.org/t/citation-label/761/2 "2009-09-09T16:23:00Z")

</div>

Nope; that’s the idea behind it.

Bruce

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [September 10, 2009, 1:44am UTC](https://discourse.citationstyles.org/t/citation-label/761/3 "2009-09-10T01:44:41Z")

</div>

> > Rintze has pointed out that we have a citation-label item in the  
> > schema, which is apparently intended to provide BibTeX keys. If there  
> > are no objections, the processor can build these automatically, using  
> > one of the common key generation patterns, like:
> > 
> > Family name of first author or editor, plus year issued, plus a  
> > year-suffix style disambiguation string if needed.
> > 
> > If family name is unavailable, use the short form of the “references”  
> > term (this term needs cleaning up, thanks to yours truly – more on  
> > that in a following post). If year is unavailable, use “0000” as a  
> > placeholder. This would allow implementation of an AMS style, which  
> > is conspicuously missing from the repository.
> > 
> > If there is strong demand for more flexibility further down the road,  
> > then either Zotero can add a field to override the auto-generated  
> > value, or some configuration scheme can be implemented  
> > ([Page Redirection](http://jabref.sourceforge.net/help/LabelPatterns.php)). But for now,  
> > a simple key is no problem to introduce, if there are no objections.
> 
> Nope; that’s the idea behind it.

Excellent. It’s implemented now.

Frank

---

<div class="post-metadata">

**Author:** ![Robert\_Knight](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Robert\_Knight](https://discourse.citationstyles.org/u/Robert_Knight)\
**Post date:** [September 10, 2009, 10:57am UTC](https://discourse.citationstyles.org/t/citation-label/761/4 "2009-09-10T10:57:21Z")

</div>

> If there is strong demand for more flexibility further down the road,  
> then either Zotero can add a field to override the auto-generated  
> value

Is the method of generating the citation-label field value part of the  
spec? Mendeley  
implements the scheme described for auto-generating Bibtex keys but it  
also allows the user  
to manually edit them afterwards. In which case I take it the correct  
behavior when generating the citation  
would be to use that value rather than ignoring it and re-running the  
auto-generator?

One thing to note with auto-generation is that the same document/item  
should always have the same citation key.  
This means that if you have multiple papers by the same author in the  
same year and you disambiguate them using some  
scheme you need to make sure that each paper always has the same  
disambiguating suffix regardless of which order  
the citations are fed to the processor.

Regards,  
Robert.2009/9/10 Frank Bennett \<@Frank\_Bennett\>:

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [September 10, 2009, 11:50am UTC](https://discourse.citationstyles.org/t/citation-label/761/5 "2009-09-10T11:50:04Z")

</div>

> > If there is strong demand for more flexibility further down the road,  
> > then either Zotero can add a field to override the auto-generated  
> > value
> 
> Is the method of generating the citation-label field value part of the  
> spec?

No, but:

a) it should be, and …

b) we might want to add a parameter to allow different algorithms?

> Mendeley implements the scheme described for auto-generating Bibtex keys but it  
> also allows the user  
> to manually edit them afterwards. In which case I take it the correct  
> behavior when generating the citation  
> would be to use that value rather than ignoring it and re-running the  
> auto-generator?

Yes, except …

If we include the b option above, that might suggest preferring the  
auto-generated key if that parameter is present?

> One thing to note with auto-generation is that the same document/item  
> should always have the same citation key.  
> This means that if you have multiple papers by the same author in the  
> same year and you disambiguate them using some  
> scheme you need to make sure that each paper always has the same  
> disambiguating suffix regardless of which order  
> the citations are fed to the processor.

Am not following you here.

Bruce

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [September 10, 2009, 11:50am UTC](https://discourse.citationstyles.org/t/citation-label/761/6 "2009-09-10T11:50:47Z")

</div>

> > If there is strong demand for more flexibility further down the road,  
> > then either Zotero can add a field to override the auto-generated  
> > value
> 
> Is the method of generating the citation-label field value part of the  
> spec? Mendeley  
> implements the scheme described for auto-generating Bibtex keys but it  
> also allows the user  
> to manually edit them afterwards.

Interesting. Edit in the document or the data store?

> In which case I take it the correct  
> behavior when generating the citation  
> would be to use that value rather than ignoring it and re-running the  
> auto-generator?
> 
> One thing to note with auto-generation is that the same document/item  
> should always have the same citation key.  
> This means that if you have multiple papers by the same author in the  
> same year and you disambiguate them using some  
> scheme you need to make sure that each paper always has the same  
> disambiguating suffix regardless of which order  
> the citations are fed to the processor.

Of course. It’s the same case as disambiguation of author-date cites.

---

<div class="post-metadata">

**Author:** ![Robert\_Knight](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Robert\_Knight](https://discourse.citationstyles.org/u/Robert_Knight)\
**Post date:** [September 10, 2009, 1:25pm UTC](https://discourse.citationstyles.org/t/citation-label/761/7 "2009-09-10T13:25:50Z")

</div>

> No, but:  
> a) it should be, and …  
> b) we might want to add a parameter to allow different algorithms?

I suspect auto-generation alone might be insufficient for users who  
want to work with their Bibtex libraries which were  
generated outside of Zotero/Mendeley etc. though - because presumably  
they will want to preserve their  
existing Bibtex keys in whatever (quite possibly custom and  
inconsistent) style they had used  
before.

> Interesting. Edit in the document or the data store?

Edit in the data store. It is filled in automatically when required  
(usually the first time that the item is exported to Bibtex) if it was  
previously empty.

Regards,  
Robert.2009/9/10 Frank Bennett \<@Frank\_Bennett\>:

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [September 10, 2009, 1:42pm UTC](https://discourse.citationstyles.org/t/citation-label/761/8 "2009-09-10T13:42:56Z")

</div>

There is a use case that’s behind my suggestion:

There are styles that actually specify the key algorithm, and it’s not  
typically going to be what users have pre-entered. I vaguely recall  
examples like [SmJoMi2003]. Note the funky author name thing.

Bruce

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [September 10, 2009, 8:53pm UTC](https://discourse.citationstyles.org/t/citation-label/761/9 "2009-09-10T20:53:12Z")

</div>

> > > No, but:  
> > > a) it should be, and …  
> > > b) we might want to add a parameter to allow different algorithms?
> > 
> > I suspect auto-generation alone might be insufficient for users who  
> > want to work with their Bibtex libraries which were  
> > generated outside of Zotero/Mendeley etc. though - because presumably  
> > they will want to preserve their  
> > existing Bibtex keys in whatever (quite possibly custom and  
> > inconsistent) style they had used  
> > before.
> 
> There is a use case that’s behind my suggestion:
> 
> There are styles that actually specify the key algorithm, and it’s not  
> typically going to be what users have pre-entered. I vaguely recall  
> examples like [SmJoMi2003]. Note the funky author name thing.

For full coverage, we could make the key configurable (see jabref link  
in my first post in this thread), and offer an override field.  
Extending Bruce’s suggestion above, priority would be default, or  
field if present, or configured key if specified.

But for the moment, throwing this out there to attract attention is  
enough. Some LaTeX users may want to have a word in the discussion  
before things are finalized.
