Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.