# biblatex & references: unpublished style with eprint

The biblatex unpublished style does not offer the eprint & eprinttype fields. Would you know how to add them (if possible).

-
How can I use the sign "&" in the reference list in LaTex? For example "Chaos, Solitons & Fractals" – user12913 Mar 24 '12 at 15:57
If you're using biblatex, try \renewcommand*{\finalnamedelim}{\addspace\&\space}. – lockstep Mar 24 '12 at 17:24
@Roz Better post your own question separately. – Stefan Kottwitz Mar 24 '12 at 21:13

I'm not sure if this is a good idea (a work with eprint information may be considered as "published"), but here's how to do it: In the bibliography driver for @unpublished, the bibmacro url+urdate needs to be replaced by the bibmacro doi+eprint+url (which also includes url+urldate).

\documentclass{article}

\usepackage{biblatex}

\DeclareBibliographyDriver{unpublished}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\printfield{howpublished}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{location+date}%
%  \newunit\newblock% DELETED
%  \iftoggle{bbx:url}% DELETED
%    {\usebibmacro{url+urldate}}% DELETED
%    {}% DELETED
\newunit\newblock% NEW
\usebibmacro{doi+eprint+url}% NEW
\newunit\newblock
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@unpublished{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
eprint = {(eprint_information)},
}
\end{filecontents}

\bibliography{\jobname}

\begin{document}

\nocite{*}

\printbibliography

\end{document}

-
thank you for the answer. It looks very sophisticated. Please, visit the following link http://hal.archives-ouvertes.fr/hal-00551910/fr/ to understand the relevance of my question. If you click on "Récupérer au format...bibtex" [top right], you'll see that the document is referred to as unpublished but still there is an access to arxiv [bottom of the page] with a link to a pdf file. There may be a better way to reference such documents that I am not aware of. – pluton Jan 5 '11 at 2:41
@pluton. biblatex takes a somewhat different line on 'unpublished' to the traditional BibTeX styles, reflecting the changes in publication in the internet age. So I'd agree with lockstep's comment that this really is not an 'unpublished' item in a biblatex sense. – Joseph Wright Jan 5 '11 at 8:15
@Joseph: so what should be used instead? Thanks "paperlyunpublished"? :) – pluton Jan 5 '11 at 13:44
@pluton. 'article': biblatex deals with the document type, and whether it's on dead trees or not it's still an article. – Joseph Wright Jan 5 '11 at 14:25
@Joseph: correct but the paper of interest is not related to any official journal, that's pretty much what makes it unpublished. I do not know how to reflect that. – pluton Jan 5 '11 at 14:38

This is how I do it: put the arXiv info in journaltitle (because this is how Zotero exports it) and have a biber SourceMap rewrite it, to put eprint as entrysubtype. Then it can be automatically selected with subtype=eprint as in the below example. I have to remove the awful-looking "in:", which nobody likes anyway.

\documentclass{article}
\usepackage{biblatex}

% Remove IN: in articles
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\DeclareSourcemap{%
\maps[datatype=bibtex]{
% If journal title is arXiv, map to eprint
\map{ \step[fieldsource=journaltitle,
match={\regexp{arXiv:([.\w]+)\s*\\?$?([\w-]*)}},final] \step[fieldset=journaltitle,null] \step[fieldset=eprinttype,fieldvalue={arxiv}] \step[fieldset=eprint,fieldvalue={1}]% \step[fieldset=eprintclass,fieldvalue={2}]% \step[fieldset=entrysubtype,fieldvalue=eprint]% } } } \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Foo, title = {Important unpublished paper}, journaltitle = {arXiv:0000.0000 \[quant-ph$},
author = {A. N. Author},
year = 2014,
}
@article{Bar,
title = {Unimportant published paper},
journaltitle = {Journal of Irreproducible Research},
author = {N. O. Body},
year=2014,
}
\end{filecontents}

\bibliography{\jobname}

\begin{document}

\nocite{*}

\printbibliography[title=Publication in peer-reviewed
journals,type=article,notsubtype=eprint]

\printbibliography[title=Electronic preprints,subtype=eprint]

\end{document}

-