I am using Biblatex to handle the full citations in footnotes and the bibliography. With @online Bibtex/Biblatex entries, I understand the DOI and URL fields in a citation need to be in some special font, often typewriter, to distinguish ‘i' and ‘l’, for example. However, the font being different and a little larger than the rest, it looks bold to me and I don’t want the URL to be the first thing you notice in a page of an article. How to make the font smaller?
I found some bits here and there that offer another solution (\urlstyle{rm}
or \urlstyle{same}
), but it seems to require the url
package to be loaded seperately -- I am just using Biblatex.
Update: thanks for the comment and the answer. I forgot to mention that I am using a special format, instead of URL I need "en ligne <>". See the MWE below and correct me if I do this the wrong way. In both situations (\urlstyle{same}
or \UrlFont
), I still get the prefix "en ligne" printed with that boldish URL font. Or maybe this is yet another font type. How to fix it all at once? I appreciate the \UrlFont
method more because it allows me to change the font and the size at the same time. It should also be best to keep a monospace font for URLs and DOIs, too bad they look bold, even when it has been made smaller. Hence \small\rm
instead of \small\tt
in the following MWE.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman,frenchb]{babel}
\usepackage{csquotes}
\usepackage[style=verbose-trad1,backend=bibtex8]{biblatex}
\DeclareFieldFormat{url}{\addcolon\space\bibstring{en ligne <}\url{#1}\bibstring{>}}
\renewcommand{\UrlFont}{\small\rm}
\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill\noindent
\cite{markey}
\cite{kastenholz}
\printbibliography
\end{document}
Update 2: Now the icing on the cake (both questions above have been answered), is it possible to make the url and doi font lighter, with some height trick or a color trick (gray or lightgrey)? I appreciate the leo style a lot, especially when you look at the printed result on the page -- I don't have that lighter effect at all when I try it. I can make another post for this if you want.
biblatex
loadsurl
internally, so\urlstyle{same}
works like a charm here.\DeclareFieldFormat{url}{\addcolon\space\bibstring{en ligne <}\url{#1}\bibstring{>}}
(correct me if I do this in a bad way, I don't know if there is something similar to mkbibparens for <>) and that string (only "en ligne") is still using the weird font!\usepackage{xcolor}
, and use\DeclareFieldFormat{url}{\bibstring{url}\space\mkbiblege{\textcolor{blue}{\url{#1}}}}
or\DeclareFieldFormat{url}{\bibstring{url}\space\textcolor{blue}{\mkbiblege{\url{#1}}}}
.