[Tex/LaTex] Selective URLs in bibliography using alpha or alphaurl

biblatexbibliographiesurls

Is there a way to selectively adding URLs to bibliorgraphy elements?
I use Mendeley and it automatically adds URLs to the DOI entries but I dont want these.
I don't want to eliminate all URLs though, as I quote a couple of documents from the web (specifications and RFCs).

Is there a way to mark the entries that should display the URLs differently from the rest?

Best Answer

With biblatex, you could use the package option url=false to disable URLs generally and then set the internal bbx:url toggle to true for entries belonging to a certain bibliography category. Note that for the entry type @online the URL will be displayed even if you set url=false.

\documentclass{article}

\usepackage[style=alphabetic,url=false]{biblatex}

\DeclareBibliographyCategory{displayurl}
\addtocategory{displayurl}{A01}

\AtEveryBibitem{%
  \ifcategory{displayurl}{\toggletrue{bbx:url}}{}%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  url = {http://www.alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
  url = {http://www.beta},
}
@online{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
  url = {http://www.charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here