TeX - LaTeX Asked by David Olean on January 22, 2021
I am trying to change doi font style to Times New Roman. By default, the font is not in Times New Roman but something else. I have tried:
usepackage{lipsum}
newcommand{TNR}{fontfamily{ptm}selectfont}
DeclareTextFontCommand{textTNR}{TNR}
DeclareFieldFormat{doi}{ %
color{black}{doi}%
mkbibacro{}addcolon selectfont
textTNR{underline{
ifhyperref
{href{https://doi.org/#1}{nolinkurl{#1}}}
{nolinkurl{#1}}
}
}
}
I have the above code by the following references link:
[1] Change font to comicneue only for one sentence
[2] Formatting only the DOI using biblatex
Can anyone point out what’s wrong with the above? I appreciate your time.
Assuming the rest of your document is already set up for Times (or with a Times clone), you only need urlstyle{same}
to have URLs, DOIs and the like in the main document font.
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage{babel}
usepackage{csquotes}
usepackage{times}
usepackage[backend=biber, style=authoryear]{biblatex}
urlstyle{same}
addbibresource{biblatex-examples.bib}
begin{document}
Lorem autocite{sigfridsson}
printbibliography
end{document}
Correct answer by moewe on January 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP