Biblatex で実際の URL の前の URL という単語のフォントを変更する

Biblatex で実際の URL の前の URL という単語のフォントを変更する

\usepackage{url}私は参考文献の作成に取り組んでおり、URL のフォント スタイルを変更したいと考えていました。これは、 とを使用して実行できました\urlstyle{same}。コンパイル後、フォントは変更されましたが、「URL:」という単語は変更されませんでした。これは以下で確認できます。

私はスタイルを再定義しようとしました。これ質問です。しかし、これはうまくいきませんでした。何か提案があればお願いします。よろしくお願いします。

MWE:

\documentclass{article}

\usepackage[style=alphabetic,
isbn=false,
doi=false,
url=false,
language = ngerman]{biblatex}

\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault} 
\usepackage{url}
\urlstyle{same}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@online{Dantam.2018,
    author = {Dantam, Neil},
    title = {Quaternion Computation},
    url = {http://www.neil.dantam.name/note/dantam-quaternion.pdf},
    urldate = {2018-01-05},
    abstract = {},
    organization = {{Institute for Robotics and Intelligent Machines, Georgia Institute of Technology}},
    shorthand = {DANT18}
}
\end{filecontents*}
\bibliography{\jobname}


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

答え1

URL フォントのみを変更したい場合は、次のようにします。

\DeclareFieldFormat{url}{URL\addcolon\space\url{#1}}

小文字の大文字ではなく、標準の大文字で取得します。

しかし、より一般的で適切なアプローチは、「URL」を小文字に設定するマクロを再定義することです。これは、他の頭字語(「DOI」、「ISBN」、「ISSN」など)にも影響するためです。したがって、一貫性を保つために、 の一般的な再定義の方が\mkbibacro適切です(moewe のコメントにも記載されています)。

\renewcommand*{\mkbibacro}[1]{#1}

どちらの結果も(2 番目の方法の方が望ましいですが)、次のようになります。

ここに画像の説明を入力してください

完全な MWE:

\documentclass{article}

\usepackage[style=alphabetic,
isbn=false,
doi=false,
url=false,
language = ngerman]{biblatex}

\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault} 
\usepackage{url}
\urlstyle{same}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@online{Dantam.2018,
    author = {Dantam, Neil},
    title = {Quaternion Computation},
    url = {http://www.neil.dantam.name/note/dantam-quaternion.pdf},
    urldate = {2018-01-05},
    abstract = {},
    organization = {{Institute for Robotics and Intelligent Machines, Georgia Institute of Technology}},
    shorthand = {DANT18}
}
\end{filecontents*}
\bibliography{\jobname}

\renewcommand*{\mkbibacro}[1]{#1}

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

関連情報