This is only of note for those who want to or must use BibTeX. It is also useful if one writes final output in LaTeX, using local install or a tool like Overleaf. In that context, the link for (body) text cites to reference list items is the ref’s BibTeX cite key†.
The cite key is stored after the opening {
in the BibTeX item data up to and not including the comm at the end of the line. Here is an example as seen in BBEdit) where the cite key has been underlined in red in the screen grab:
I’m importing references from Bookends where the export format is set to BibTeX‡, so the dragged reference sets the Tinderbox-generated note’s $Text to the BibTeX code. The later includes the cite key but I really want it as an attribute value.
So, I make a String-type user attribute CiteKey
and add it to the built-in prototype ‘Reference’ Displayed Attributes. Now I add this to the prototype’s $Edict:
$Text.skipTo("{").captureTo(",","CiteKey");
This ensures the BibTeX cite key is now $CiteKey ready fro me to use as a cite in my LaTeX source text like so: \cite{joyce:1994:ss}
.
Of course if you want $Text for a different purpose, e.g. to show the full Abstract (already in $Abstract and a Displayed Attribute), then you could add a line to the edict:
$Text.skipTo("{").captureTo(",","CiteKey");
$Text = $Abstract;
Don’t want to lose the BibTeX code? Add another String-type attribute BibTeXCode
and make the prototype’s $Edict this:
$Text.skipTo("{").captureTo(",","CiteKey");
$BibTeXCode = $Text;
$Text = $Abstract;
Of course if you already use code in the prototype’s edict, you would add the abovce to the existing code!
HTH
†. Is it ‘citekey’ or ‘cite key’? Both get used interchangeably but—(in a BibTeX context—only to describe the same thing.
‡. Actually my slightly customised version of the data (i.e. field choices) but this doesn’t afect the overall