How to fix the URL and DOI font? Say, make it smaller

You can set the \UrlFont including a sizing command:

Sample output

\documentclass{article}

\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\renewcommand{\UrlFont}{\small\ttfamily}

\begin{document}

\cite{ctan,markey,kastenholz}

\printbibliography

\end{document}

If you only want this to affect the bibliography, then place the command \renewcommand{\UrlFont}{\small\ttfamily} just before \printbibliography instead of in the preamble.


I figured my long comments to your updated question were not that good so here goes a thorough explanation.

Your redefinition of the url field format contains two sources of error for biblatex.

\DeclareFieldFormat{url}{\addcolon\space\bibstring{en ligne <}\url{#1}\bibstring{>}}

Firstly, it starts with a command to add a colon and a space before printing any text at all, fortunately biblatex ignores this (there is no unnecessary colon before "en ligne" in your MWE), but we should get rid of it anyway.

Secondly, and more importantly, en ligne < is not actually a bibstring. bibstrings are certain localisation keys that change with the language, so \bibstring{editor} prints "editor" in an English, "Herausgeber" in a German and (apparently) "éditeur" in an French document. In order for this to work biblatex has to know these bibstrings and en ligne < is certainly not one of them (neither is > for that matter; a list of standard bibstrings can be found in the biblatex documentation §4.9.2 Localization Keys). Unknown bibstrings will trigger a warning (Bibliography string 'en ligne <' undefined) and their "key" will be printed in bold to clearly notify you in the document that something went wrong.

To print verbose text in biblatex use \printtext{foo} instead of \bibstring{foo}, but in \DeclareFieldFormat \printtext is not actually needed, so in this case

\DeclareFieldFormat{url}{en ligne <\url{#1}>}

might do what you want.

But you can use biblatex's localisation utilities for this.

\DefineBibliographyStrings{french}{
  url = {en ligne}
}

Will make sure the bibstring url contains "en ligne" in a French document, so \bibstring{url} prints "en ligne" in French and "address" in English.

We can also define a macro \mkbiblege analogous to \mkbibparens to wrap text in < and >.

\makeatletter
\newrobustcmd{\mkbiblege}[1]{%
  \begingroup
  \blx@blxinit
  \blx@setsfcodes
  <#1>
  \endgroup}
\makeatother

So we can define

\DeclareFieldFormat{url}{\bibstring{url}\space\mkbiblege{\url{#1}}}

Finally, our MWE

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman,frenchb]{babel}
\usepackage{csquotes}
\usepackage[style=verbose-trad1,backend=bibtex8]{biblatex}

\renewcommand{\UrlFont}{\small\rm}

\DefineBibliographyStrings{french}{
  url = {en ligne},
}
\DefineBibliographyStrings{german}{
  url = {online},
}

\makeatletter
\newrobustcmd{\mkbiblege}[1]{%
  \begingroup
  \blx@blxinit
  \blx@setsfcodes
  <#1>
  \endgroup}
\makeatother

\DeclareFieldFormat{url}{\bibstring{url}\space\mkbiblege{\url{#1}}}
\addbibresource{biblatex-examples.bib}

\begin{document}
  \nocite{markey}
  \printbibliography
\end{document}

gives

enter image description here

Tags:

Biblatex

Urls