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

Include DOI in references #146

Closed
hochleitner opened this issue Dec 28, 2022 · 3 comments · Fixed by #148
Closed

Include DOI in references #146

hochleitner opened this issue Dec 28, 2022 · 3 comments · Fixed by #148
Assignees
Labels
enhancement Issue or PR proposing an enhancement of a current features.
Milestone

Comments

@hochleitner
Copy link
Member

People in our department, notably @schedldave, requested that we include DOIs in the references. They are standardized and way shorter than URLs (especially long and ugly ones to sites like Research Gate), and Biblatex converts them to a clickable URL nicely.

I do support this because it makes digitally reviewing a thesis easier. One does not need to search for a referenced paper but can access it through the DOI. Yet it does not blow up entries as any arbitrary URL could do.

The only issue is that most exporter citations (from ACM, IEEE and the like) tend to have a doi and an url field set (which contains the DOI URL). This creates reference entries with the DOI appearing twice. To counter this, I suggest adding a rule to hgbbib.sty that goes through the items and clears the url entry when doi is present. Something like this (inspired from here) should do the trick:

\AtEveryBibitem{
    \iffieldundef{doi}{}{\clearfield{url}}
}

If necessary, we can limit this to specific bib types, but I can't think of anything where a DOI and an URL are both required.

@hochleitner hochleitner added the enhancement Issue or PR proposing an enhancement of a current features. label Dec 28, 2022
@hochleitner hochleitner added this to the Release 2023 milestone Dec 28, 2022
@hochleitner hochleitner self-assigned this Dec 28, 2022
@schedldave
Copy link

+1

In the hgbbib.sty the following changes are necessary:

\ExecuteBibliographyOptions{
	bibencoding=auto,
	bibwarn=true,
	sortcites=true,
	defernumbers=true,
	isbn=false,
	doi=true, % CHANGED!
	backref=true,
	backrefstyle=three}

% ADDED remove URL if DOI is given
\AtEveryBibitem{
    \iffieldundef{doi}{}{\clearfield{url}}
}

I tested it very roughly here: https://github.com/schedldave/thesis-doi/
For articles with URLs and DOIs it leads to nice results:
image

The main effort will be to update all existing example references, as there are no DOIs right now.

@hochleitner
Copy link
Member Author

Thanks for the input. I'll create a PR with the necessary changes and updated references. You're welcome to review it alongside @imagingbook.

@imagingbook
Copy link
Collaborator

I think it is generally a good idea to promote the use of DOIs (in contrast to what our manual currently suggests) and the proposed URL removal rule seems to be a viable compromise. However, I do not see the need to convert "all existing example references" since (a) no DOIs may exist for many of them and (b) a traditional reference without a DOI (although perhaps available) should still be fully acceptable. So let's go ahead with this.
One note of caution about citation "exporters" though: They are notoriously unreliable, i.e., their output is usually messed up in one or the other way. In fact, I don't think I have ever downloaded a single bibtex item from any of the big publishers which I found 1:1 acceptable and did not have to manually edit afterwards. What I am saying is that it is still the final responsibility of the (thesis) authors to check that entries are complete and correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue or PR proposing an enhancement of a current features.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants