如何修改 biblatex ABNT 样式 - URL;DOI

如何修改 biblatex ABNT 样式 - URL;DOI

总部位于这个问题我写了以下 MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}

\usepackage[style=abnt-numeric, backend = biber]{biblatex}

\DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\addspace<\normalfont\url{#1}>}%

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{website:ArduinoLabview,
  author  = {{National Instruments}},
  title   = {Arduino Compatible Compiler for LabVIEW by Aledyne-TSXperts},
  year    = {2019},
  url     = {https://www.tsxperts.com/arduino-compatible-compiler-for-labview/},
  urldate = {2019-06-07},
}

\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{website:ArduinoLabview}
\printbibliography
\end{document}

如何将 URL 和 DOI 字体改为正常样式?

答案1

biblatex将 URL 和 DOI 格式委托给url包,因此您可以使用其接口将 URL 字体更改为普通文档字体

\urlstyle{same}

没有必要,\normalfont而且无论如何它也不会做任何事情,因此url可以删除字段格式的重新定义。

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}

\usepackage[style=abnt-numeric, backend = biber]{biblatex}

\urlstyle{same}

\begin{filecontents}{\jobname.bib}
@misc{website:ArduinoLabview,
  author  = {{National Instruments}},
  title   = {Arduino Compatible Compiler for LabVIEW by Aledyne-TSXperts},
  year    = {2019},
  url     = {https://www.tsxperts.com/arduino-compatible-compiler-for-labview/},
  urldate = {2019-06-07},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{website:ArduinoLabview}
\printbibliography
\end{document}

“NATIONAL INSTRUMENTS。Aledyne-TSXperts 的 Arduino 兼容 LabVIEW 编译器。[来源:sn],2019 年。可访问:<https://www.tsxperts.com/arduino-compatible-compiler-for-labview/>。访问:2019年6月7日。” URL 采用普通文档字体。

相关内容