plk / biblatex

biblatex is a sophisticated bibliography system for LaTeX users. It has considerably more features than traditional bibtex and supports UTF-8
520 stars 118 forks source link

Association for Cryptologic Research (IACR) eprint support #786

Closed thomwiggers closed 6 years ago

thomwiggers commented 6 years ago

The cryptographic community uses https://eprint.iacr.org as the go-to place for preprint papers. It would be nice if support would be added to biblatex.

e.g. https://eprint.iacr.org/2018/766

moewew commented 6 years ago

Are there any conventions how this eprint would be styled? I didn't find anything on https://eprint.iacr.org/about.html (I was looking for something like https://arxiv.org/help/faq/references)

At the moment I fail to see how

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}
\usepackage{hyperref}

\DeclareFieldFormat{eprint:iacr}{%
  Cryptology ePrint Archive\addcolon\space
  \ifhyperref
    {\href{https://eprint.iacr.org/#1}{\nolinkurl{#1}}}
    {\nolinkurl{#1}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{kobeissi,
  author     = {Nadim Kobeissi and Karthikeyan Bhargavan},
  title      = {Noise Explorer: Fully Automated Modeling and Verification for Arbitrary Noise Protocols},
  date       = {2018-08-23},
  version    = {20180823:110852},
  eprint     = {2018/766/20180823:110852},
  eprinttype = {iacr},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{kobeissi}
\printbibliography
\end{document}

Kobeissi, Nadim and Karthikeyan Bhargavan (23rd Aug. 2018). Noise Explorer: Fully Automated Modeling and Verification for Arbitrary Noise Protocols. Version 20180823:110852. Cryptology ePrint Archive: 2018/766/20180823:110852.

would be more helpful than

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}
\usepackage{hyperref}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{kobeissi,
  author     = {Nadim Kobeissi and Karthikeyan Bhargavan},
  title      = {Noise Explorer: Fully Automated Modeling and Verification for Arbitrary Noise Protocols},
  date       = {2018-08-23},
  version    = {20180823:110852},
  url        = {https://eprint.iacr.org/2018/766/20180823:110852},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{kobeissi}
\printbibliography
\end{document}

Kobeissi, Nadim and Karthikeyan Bhargavan (23rd Aug. 2018). Noise Explorer: Fully Automated Modeling and Verification for Arbitrary Noise Protocols. Version 20180823:110852. url: https://eprint.iacr.org/2018/766/20180823:110852.

The second solution with the URL is only marginally longer and leaves no ambiguity. It could even be shortened to

url = {https://ia.cr/2018/766},

Related: https://github.com/plk/biblatex/issues/38

thomwiggers commented 6 years ago

I may have misunderstood what the purpose of the eprint feature in biblatex is. I thought it served to easily add a link to preprint versions of papers when citing the full version, like this example. If I misunderstood this, the issue can be closed I suppose.

moewew commented 6 years ago

The eprint field can be used to add a link to a (pr)eprint version of a paper, it does not matter whether there is a published version or not. What matters is that the eprint field usually does not simply contain a URL, it contains an identifier that is resolved via a certain URL. It is similar to the doi field. But it is not different in status from doi or url. You may want to refer to §3.13.7 Electronic Publishing Information and §4.11.2 Electronic Publishing Information of the manual.

@online{wassenberg,
  author       = {Wassenberg, Jan and Sanders, Peter},
  title        = {Faster Radix Sort via Virtual Memory and Write-Combining},
  date         = {2010-08-17},
  version      = 1,
  langid       = {english},
  langidopts   = {variant=american},
  eprinttype   = {arxiv},
  eprintclass  = {cs.DS},
  eprint       = {1008.2849v1},
}

Just prints

arXiv: 1008.2849v1 [cs.DS]. instead of https://arxiv.org/abs/1008.2849v1

This is similar to the doi field which prints as

doi: 10.1063/1.2172593 and links to https://doi.org/10.1063/1.2172593

The idea being that the "type: identifier" scheme saves a bit of space over the full URL and that these "type: identifier" combinations are established and easily recognised. (In case of the arXiv there actually is an option that governs where exactly the link points to.)

In case of the Cryptology ePrint Archive there seems to be no officially sanctioned "type: identifier" shorthand and a short google search did not reveal an established practice to refer to these entries in an abbreviated form other than https://eprint.iacr.org/2018/766/ or https://ia.cr/2018/766

thomwiggers commented 6 years ago

Right. So I guess that if we do not want to invent a practice here, I should just use the notes field with eprint: https://ia.cr/2018/766.

Thanks for the discussion.

moewew commented 6 years ago

What's wrong with the URL field?

url = {https://eprint.iacr.org/2018/766/},

Do you want to specifically stress that this is a preprint?