0. Use @online
instead of @misc
The @online
entry type always shows the url
field regardless of the global url
option setting.
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear, url=false]{biblatex}
\begin{filecontents}{\jobname.bib}
@online{bronto,
author = {Anne Elk},
title = {Towards a Unified Theory on Brontosauruses},
date = {1972-11-16},
url = {http://example.edu/~elk/bronto.pdf},
urldate = {2015-09-07},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{bronto}
\printbibliography
\end{document}
1. Set the url
option per type (biblatex
3.15 and above)
Since biblatex
3.15 you can set the url
option per type in the standard styles (https://github.com/plk/biblatex/pull/1000), so you can disable url
globally, but reenable it for @misc
.
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear, url=false]{biblatex}
\ExecuteBibliographyOptions[misc]{url=true}
\begin{filecontents}{\jobname.bib}
@misc{bronto,
author = {Anne Elk},
title = {Towards a Unified Theory on Brontosauruses},
date = {1972-11-16},
url = {http://example.edu/~elk/bronto.pdf},
urldate = {2015-09-07},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{bronto}
\printbibliography
\end{document}
2. Delete the url
field with a sourcemap
This solution does not use the url
option. Instead it deletes the url
and urldate
fields for all types except @misc
with a sourcemap.
The advantage is that the field is really gone for good and is not used to generate label data (for example the label date).
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\pernottype{misc}
\step[fieldset=url, null]
\step[fieldset=urldate, null]
}
}
}
\begin{filecontents}{\jobname.bib}
@misc{bronto,
author = {Anne Elk},
title = {Towards a Unified Theory on Brontosauruses},
date = {1972-11-16},
url = {http://example.edu/~elk/bronto.pdf},
urldate = {2015-09-07},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{bronto}
\printbibliography
\end{document}
In all cases the output will be