My .bib
files are generated by Mendley desktop and usually contain URLs, ISSN and DOIs, but I don't want those to be displayed in my list of references. How can I get rid of them (short of deleting those from the entries, I just want to not display them…) I am using biblatex
.
[Tex/LaTex] Biblatex: Get rid of ISSN, URLs and DOIs in references
biblatexdoiurls
Related Solutions
The example in the updated answer misses a couple of details: you have to announce what .bib
file(s) to search in; moreover you somewhere have to tell LaTeX where to print the bibliography:
\documentclass[a4paper,12pt]{article}
\usepackage[style=numeric-comp,doi=false]{biblatex}
\bibliography{bob}
\title{Here is the title.}
\author{John S. Doe}
\begin{document}
\maketitle
\begin{abstract}
Blah blah blah-blah blah.
\end{abstract}
\section{Introduction}
Blah blah blah-blah blah \cite{AD_Smith2001}.
Blah blah blah-blah blah.
\printbibliography
\end{document}
Here's where biblatex differs from the usual way: the \bibliography
command (or the more modern \addbibresource
) should go in the preamble, while the bibliography is printed by \printbibliography
.
The command to run for checking the references with the database is
bibtex bob
(if bob.tex
is your main file) or
biber bob
but this one requires also backend=biber
in the options to biblatex.
Add url=false
to the options given to biblatex if you don't want the URL to be printed.
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
Assuming you are using standard styles, use
biblatex
package optionsdoi=false,isbn=false,url=false,eprint=false
. For example,The manual describes these as 'style-specific' options, as they do depend on the bibliography style in use.