The biblatex unpublished style does not offer the eprint & eprinttype fields. Would you know how to add them (if possible).
[Tex/LaTex] biblatex & references: unpublished style with eprint
biblatex
Related Solutions
\setunit
is an alternative to \newunit
that allows you to set punctuation instead of \newunitpunct
(which is typically a period plus a space). The really neat thing about \newunit
and \setunit
is that you don't need to worry about generating excessive punctuation, particularly when some fields are missing.
The code below defines a new bibliography macro bbx:parunit
. It issues \setunit
to generate line breaks only in the bibliography. With the option setting backref=true
, bbx:parunit
also prints the back reference immediately before the first line break. Edits are applied to generic bibliography macros from biblatex.def
so that the solution should work with most styles.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[american]{babel}
\usepackage[colorlinks]{hyperref}
\usepackage[style=verbose,backref=true]{biblatex}
\newbibmacro*{bbx:parunit}{%
\ifbibliography
{\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\clearlist{pageref}%
\setunit{\adddot\par\nobreak}}
{}}
\renewbibmacro*{doi+eprint+url}{%
\usebibmacro{bbx:parunit}% Added
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\renewbibmacro*{eprint}{%
\usebibmacro{bbx:parunit}% Added
\iffieldundef{eprinttype}
{\printfield{eprint}}
{\printfield[eprint:\strfield{eprinttype}]{eprint}}}
\renewbibmacro*{url+urldate}{%
\usebibmacro{bbx:parunit}% Added
\printfield{url}%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\printtext[urldate]{\printurldate}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill\noindent
Filler text.\footcite{bertram,kastenholz,ctan,itzhaki}
\printbibliography
\end{document}
If you use biber, this might be best handled with the related entries feature supported by biblatex 2.0+.
The preamble below defines a new type of related entry: prelim
. This key specifies the localization string, formatting directive and bibliography macro used to set the entries given in the related
field.
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber]{biblatex}
\usepackage[colorlinks]{hyperref}
\renewcommand*{\relatedpunct}{\addcolon\space}
\renewcommand*{\relateddelim}{\addcomma\space}
\newbibmacro*{related:prelim}[1]{%
\renewcommand*{\newunitpunct}{\addcomma\space}%
\entrydata{#1}{\usebibmacro{doi+eprint+url}}}
\NewBibliographyString{prelim,prelims}
\DefineBibliographyStrings{american}{%
prelim = {Preliminary version},
prelims = {Preliminary versions}}
\begin{filecontents}{\jobname.bib}
@article{v008a021,
author = {Roy Kasher and Julia Kempe},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
year = {2012},
pages = {461-486},
doi = {10.4086/toc.2012.v008a021},
journal = {Theory of Computing},
volume = {8},
number = {1},
related = {kasher/arxiv,kasher/approx},
relatedtype = {prelim}}
@online{kasher/arxiv,
author = {Kasher, Roy and Kempe, Julia},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
eprinttype = {arxiv},
eprintclass = {quant-ph},
eprint = {1005.0512},
month = may,
year = {2010}}
@inproceedings{kasher/approx,
author = {Kasher, Roy and Kempe, Julia},
title = {Two-source extractors secure against quantum adversaries},
booktitle = {Proceedings of the 13th international conference on Approximation,
and the 14th International conference on Randomization, and combinatorial
optimization: algorithms and techniques},
series = {APPROX/RANDOM'10},
year = {2010},
venue = {Barcelona, Spain},
pages = {656--669},
url = {http://dl.acm.org/citation.cfm?id=1886521.1886572},
publisher = {Springer-Verlag},
location = {Berlin, Heidelberg}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{v008a021}
\printbibliography
\end{document}
Here biber accesses data for every entry indicated in the related
field. Each related entry is assigned a hash key and is marked dataonly
. This avoids extraneous entries in the bibliography. It also allows you to cite related works directly and create "circular" relationships between entries.
Since you probably won't be citing preliminary works you could get by without biber, using some additional code to access related entry data and a few more LaTeX/BibTeX runs.
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=bibtex,defernumbers]{biblatex}
\usepackage[colorlinks]{hyperref}
\DeclareBibliographyCategory{related}
\newrobustcmd*{\getrelated}[1]{%
\nocite{#1}\addtocategory{related}{#1}}
\AtDataInput{%
\iffieldundef{usera}{}{\forcsvfield{\getrelated}{usera}}}
\AtEveryBibitem{%
\iffieldundef{usera}{}{%
\edef\bbxusera{\thefield{usera}}%
\edef\bbxuserb{\thefield{userb}}%
\restorefield{related}{\bbxusera}%
\restorefield{relatedtype}{\bbxuserb}}}
\renewcommand*{\relatedpunct}{\addcolon\space}
\renewcommand*{\relateddelim}{\addcomma\space}
\newbibmacro*{related:prelim}[1]{%
\renewcommand*{\newunitpunct}{\addcomma\space}%
\entrydata{#1}{\usebibmacro{doi+eprint+url}}}
\NewBibliographyString{prelim,prelims}
\DefineBibliographyStrings{american}{%
prelim = {Preliminary version},
prelims = {Preliminary versions}}
\begin{filecontents}{\jobname.bib}
@article{v008a021,
author = {Roy Kasher and Julia Kempe},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
year = {2012},
pages = {461-486},
doi = {10.4086/toc.2012.v008a021},
journal = {Theory of Computing},
volume = {8},
number = {1},
usera = {kasher/arxiv,kasher/approx},
userb = {prelim}}
@online{kasher/arxiv,
author = {Kasher, Roy and Kempe, Julia},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
eprinttype = {arxiv},
eprintclass = {quant-ph},
eprint = {1005.0512},
month = may,
year = {2010}}
@inproceedings{kasher/approx,
author = {Kasher, Roy and Kempe, Julia},
title = {Two-source extractors secure against quantum adversaries},
booktitle = {Proceedings of the 13th international conference on Approximation,
and the 14th International conference on Randomization, and combinatorial
optimization: algorithms and techniques},
series = {APPROX/RANDOM'10},
year = {2010},
venue = {Barcelona, Spain},
pages = {656--669},
url = {http://dl.acm.org/citation.cfm?id=1886521.1886572},
publisher = {Springer-Verlag},
address = {Berlin, Heidelberg}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{v008a021}
\printbibliography[notcategory=related]
\end{document}
Best Answer
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 bibmacrodoi+eprint+url
(which also includesurl+urldate
).