[Tex/LaTex] URL field only for certain reference types with biblatex

biblatexurls

I'm using biblatex for my references. My bib file includes many references which I have imported from different sources. Not all references have a url entry and some of them are bogus. I now like to suppress the url entries by default but use them for specific reference types, e.g. @manual, only.

Currently I use:

\usepackage[
    style=numeric-comp,
    sorting=none,
    doi=false,
    isbn=false,
    url=true,
    eprint=false,
    maxnames=99
]{biblatex}

Is there a possibility to say url=false in general but something like manual={url=true}? I like to avoid going to my big bib file and comment out all other url entries.

Best Answer

\documentclass{article}

\usepackage{biblatex}

\AtEveryBibitem{%
  \ifentrytype{manual}{%
  }{%
    \clearfield{url}%
    \clearfield{urldate}%
  }%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@manual{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  url = {tex.stackexchange.com},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
  url = {tex.stackexchange.com},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here