2

Consider this example:

\documentclass{report}
\usepackage[backend=bibtex]{biblatex}
\urlstyle{same}
\addbibresource{testbibfont.bib}
\begin{document}
See \cite{aauu:2012kp}
\printbibliography
\end{document}

where testbibfont.bib is

@article{aauu:2012kp,
      author         = "aauutt",
      title          = "{The algorithm}",
      journal        = "Journal",
      volume         = "7",
      year           = "2012",
      pages          = "T10003",
      doi            = "10.1089/1749-0221/7/11/T10003",
      eprint         = "1204.2201",
      archivePrefix  = "arXiv",
      primaryClass   = "data-an",
      reportNumber   = "BBB-12"
}

I already align the font of DOI with the rest of the text with \urlstyle{same} (different font while using url). That would be sufficient were it not for primaryClass which uses a different font:

enter image description here

How to have the font of main text everywhere in bibliography?

4

Indeed the arXiv eprint field format is pretty much the only place where biblatex has an explicit \texttt instead of \nolinkurl/\url which are governed by \urlstyle.

You have to modify the format a bit to remove the \tetxttt

\makeatletter
\DeclareFieldFormat{eprint:arxiv}{%
  arXiv\addcolon\space
  \ifhyperref
    {\href{https://arxiv.org/\abx@arxivpath/#1}{%
       \nolinkurl{#1}%
       \iffieldundef{eprintclass}
         {}
         {\addspace\mkbibbrackets{\thefield{eprintclass}}}}}
    {\nolinkurl{#1}%
     \iffieldundef{eprintclass}
       {}
       {\addspace\mkbibbrackets{\thefield{eprintclass}}}}}
\makeatother

The original definition can be found in biblatex.def, ll. 471-482.

Output without typewriter/monospace font.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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