0

I am using a refs.bib file for writing papers, as I'm sure everyone does. However, the problem is that I don't have a quick way to refer to a particular paper when working on a different, non-latex document. For example, let's say I'm handwriting a note or reminder to myself, and I want to refer to a specific paper without using the entire title (since the titles are usually unwieldy). I want to refer to the paper using some shorthand notation like (TOPIC-ID#).

The problem is that refs.bib assigns a single reference to each bibtex entry, but those references change depending on where they are in the document, etc. So, reference [1] today might be reference [7] tomorrow. I'm looking for a unique identifier that remains fixed long after the day it enters my bib file.

Is there a electronic citation tool (perhaps not latex/refs.bib) that allows me to fix a unique identifier for each paper that won't change? E.g. (TOPIC-ID#) would be perfect. Or, is there a way to force latex to organize my papers in the refs.bib file this way?

4
  • 3
    Why not use the unique citekey in the bibTeX database? You could standardize the format of those using whatever system you please.
    – Anyon
    Commented Nov 13, 2023 at 5:51
  • 2
    I don't understand this question. The advantage of a bib file is the clear identifier for each source. Why do you not use this identifier? If you use a sensible naming system (e.g. I name all my entries with name of first author, EA for et al if applicable and year, e.g. SmithEA2010, plus an A, B, C if multiple papers fit that scheme) you can easily use tha same identifier in non-latex instances.
    – Sursula
    Commented Nov 13, 2023 at 8:08
  • thanks @Anyon. Can you please elaborate on what is a "citekey"? Never heard of it. Commented Nov 17, 2023 at 6:55
  • @Sursula what do you mean by "name all my entries"? bib determines the name for you, right? Or am I misunderstanding? Commented Nov 17, 2023 at 6:57

1 Answer 1

1

There should be a unique identifier, a citation key, for each reference in your .bib file. That is how BibTeX figures out which reference to put in your bibliography when you write \cite{citekey}. If it isn't unique, you might end up citing a different document than you intended.

The .bib file is just a text file containing various entries, such as

@article{PhysRevE.85.046117,
  title = {Walking with coffee: Why does it spill?},
  author = {Mayer, H. C. and Krechetnikov, R.},
  journal = {Phys. Rev. E},
  volume = {85},
  issue = {4},
  pages = {046117},
  numpages = {7},
  year = {2012},
  month = {Apr},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevE.85.046117},
  url = {https://link.aps.org/doi/10.1103/PhysRevE.85.046117}
}

The anatomy is that they start with @, which is followed by the entry type (here article), and then the citation key. In this BibTeX entry downloaded directly from the publisher, the citation key is PhysRevE.85.046117, which you would cite as \cite{PhysRevE.85.046117}, but you're free to change it to whatever you want. It's common to see author-year formats like Mayer2012, for example, which you'd cite as \cite{Mayer2012}. Just keep the unique identifier unique.

The proposal in the comments is that you can use the same citation key, perhaps written in some reasonably non-cryptic format, as a quick way to identify sources also in your notes in formats where you can't use reference management software. Reasonable BibTeX reference managers will be able to automatically generate citation keys according to customizable patterns. I don't know of one that will easily construct keys of the TOPIC-ID# form, but basing keys on fields in the actual BibTeX entries is typically possible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .