0

This problem might be more pointed towards Zotero and the way it exports to .bib-files, but I'll try here either way.

I am writing a LaTeX document in Overleaf, with a group library in Zotero. The references are imported into Overleaf by using the external URL of the group library (Explained here), ending up as "references.bib" in Overleaf.

When referencing to an official website of some company, the written date is often not specified (leaving it blank), and today's date is entered into Zotero in the accessed-field.

The title of the document is often "COMPANYNAME blabla". So the command will look like: \cite{COMPANYNAME COMPANYNAME nodate}. When later adding another source from the same website (But a different article/page from the same company), the older one is therefore called "COMPANYNAME COMPANYNAME nodate-1", making previous footnotes refer to the newer one i.e. the wrong source.

How can I avoid this?

The packages/config I am using:

\bibliographystyle{IEEEtran}
\usepackage[backend = biber,    % Recommended backend for sorting bibliography
            %style = IEEEtran,    % Close to the 'Harvard' referencing style
            urldate = long,     % Long: 24th Mar. 1997 | Short: 24/03/1997
            maxcitenames = 2,   % Number of authors in cite before replaced with 'Author#1 et al.'
            ]{biblatex}
\addbibresource{references.bib}     % Adding our file containing the references

Example:

If I were to write a statement about a Lamborghini Aventador, i would do it like this:

"Aventador is a fast car\cite{lamborghini_lamborghini_nodate}."

When I later add a second source from Laborghini, in this example the Urus page, to Zotero, it will be called "lamborghini_lamborghini_nodate" in the references.bib file. The old aventador-source will be called "lamborghini_lamborghini_nodate-1".

This will result in the statement I wrote earlier (and referenced to the Aventador page) is now pointing to the wrong source (the Urus page).

These two examples in the references.bib file:

Example with Lamborghini.com

13
  • 1
    I am using Zotero too and export specific collections to a .bib file, that subsequently is used in a (Lua)LaTeX document using \addbibresource{refernces.bib}. My references are formatted correctly and without the issues you're describing. I use Better BibTeX to handle export and citation keys in Zotero, which probably circumvents the call to Zotero API.
    – alchemist
    Jan 30, 2023 at 11:01
  • Did you have a look at the contents of the references.bib file? How is it constructed in terms of Biblatex labels? Does that look the same as the references in your Zotero library? When only websites are affected, take a careful look how those entries are done in Zotero, especially which fields are entered and which not.
    – alchemist
    Jan 30, 2023 at 11:05
  • Afterthought: could it be that the way you import your group library into the Overleaf document forces Zotero's API to check on the websites included in the library, thereby updating / replacing the fields of those entries?
    – alchemist
    Jan 30, 2023 at 11:08
  • My references are also formatted correctly in the document, the problem I am describing is more of a problem when writing and the sources getting a bit mixed up, so the in-text footnotes are pointing to the wrong source. In the example I added in the original post, there is a screenshot from the references.bib file.
    – QualZy
    Jan 30, 2023 at 13:28
  • Ok. Your edit is much clearer on the issue at hand. Do the two examples you gave have the same citation key in your Zotero library as in the shown references.bib file? The way you describe it could mean Zotero is doing something odd when you enter another reference linking to the same website.
    – alchemist
    Jan 30, 2023 at 14:38

2 Answers 2

3

Based upon @alchemist's help, I found a solution that works in this context.

Better BibTex does come a long way, as it introduces a better way of handling citation keys that take into account already existing keys. However, when importing the .bib file into Overleaf, the only formats available is BibTeX and BibLaTeX (and not Better BibTex / Better BibLaTeX).

I solved this by the use of Better BibTeX's automatic export. The exported file was saved in a Google Drive (In the Better BibLaTex format) with the "Keep updated"-option checked. The file was then imported into Overleaf by "Import via URL" by creating a direct download link from the Google Drive folder.

Since this was a group-project using a group library, to make it such that all of the members can refresh the library into Overleaf, all of the group members were given access to the Google Drive folder, and exported the .bib file the same way as mentioned previously. By using the same folder with the same filename for the .bib file, the .bib file is getting overwritten every time someone refreshes, and the URL-import into Overleaf will still be working.

1
  • 1
    Way to go @QualZy and glad to be of some assistance solving the issue.
    – alchemist
    Feb 2, 2023 at 10:21
0

One thing that struck me as odd, was the way you call upon the IEEE referencing style. According to this question How to use biblatex with IEEE bibtex style? the use of \bibliographystyle{IEEEtran} conflicts with biblatex.

The proper use of the IEEE-style should be to use the commented out line in your options: style=ieee, which should tell biblatex to load the package biblatex-ieee. You could also explicitly load that package when in doubt that it is loaded (or present in Overleaf).

The Zotero addon Better BibTeX specifically states that it will generate unique citation keys keeping existing keys intact. This addon thus prevents alterations in keys when adding comparable items to the Zotero library. The Better BibTeX addon can be found on https://retorque.re/zotero-better-bibtex/ as well as information about installing and using the addon.

1
  • Hmm, I might look into that. My problem is however not regarding an error-message or references missing, but to the "name" that is going into the \cite{}-command is changing when a similar source as an existing one is added. I updated the original question and added an example to make it clearer.
    – QualZy
    Jan 30, 2023 at 13:23

You must log in to answer this question.

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