我试图以粗体显示年份和括号
作者(年):
这是 MWE
\documentclass[12pt, bibliography=totocnumbered, listof=totoc]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage{filecontents}
%Bibliotheken
\usepackage
[style=ext-authoryear,labelnumber, useprefix=true,
sorting=nyt,maxbibnames=9,maxcitenames=3,uniquelist=false, backend=biber,
doi=false,isbn=false,url=false,
uniquename=false,bibencoding=utf8, date=year, giveninits=true, terseinits=false, dashed=false]
{biblatex}
%Colon after year
\renewcommand{\labelnamepunct}{\mkbibbold{\addcolon}\space}
%Year and parantheses in bold
\DeclareFieldFormat{date}{\mkbibbold{#1}}
\DeclareFieldFormat{parens}{\mkbibbold{\mkbibparens{#1}}}
\begin{filecontents}{\jobname2.bib}
@Article{Hansen2011,
author = {Hansen, Peter R. and Lunde, Asger and Nason, James M.},
title = {The Model Confidence Set},
journal = {Econometrica},
year = {2011},
volume = {79},
number = {2},
pages = {453-497},
url = {https://EconPapers.repec.org/RePEc:ecm:emetrp:v:79:y:2011:i:2:p:453-497},
}
\end{filecontents}
\addbibresource{\jobname2.bib}
\begin{document}
\textcite{Hansen2011}
\printbibliography
\end{document}
我尝试过以某种方式使用 \mkbibbold,但效果不佳。如果能给出简短的解释就更好了。
答案1
biblatex-ext
定义字段的附加格式,并在其中biblabeldate
控制“参考书目中标签日期的格式authoryear
”,因此这就是您必须用于您的目的的格式:
\DeclareFieldFormat{biblabeldate}{\mkbibbold{\mkbibparens{#1}}}
除此之外,尽管从技术上来说,你可以nametitledelim
用重新定义\renewcommand
,因为它nametitledelim
是上下文敏感的分隔符,但在使用时,\renewcommand
你会失去这种上下文敏感度。因此,你最好使用适当的专用\DeclareDelimFormat
:
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space}
(为此需要以粗体字体显示冒号,如biblabeldate
选项的格式指令中所设置的那样)。punctfont=true
在全:
\documentclass[12pt, bibliography=totocnumbered, listof=totoc]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage{filecontents}
%Bibliotheken
\usepackage
[style=ext-authoryear,labelnumber, useprefix=true,
sorting=nyt,maxbibnames=9,maxcitenames=3,uniquelist=false, backend=biber,
doi=false,isbn=false,url=false,
uniquename=false,bibencoding=utf8, date=year, giveninits=true, terseinits=false,
dashed=false, punctfont=true]
{biblatex}
%Colon after year
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space}
%Year and parantheses in bold
\DeclareFieldFormat{biblabeldate}{\mkbibbold{\mkbibparens{#1}}}
\begin{filecontents}{\jobname2.bib}
@Article{Hansen2011,
author = {Hansen, Peter R. and Lunde, Asger and Nason, James M.},
title = {The Model Confidence Set},
journal = {Econometrica},
year = {2011},
volume = {79},
number = {2},
pages = {453-497},
url = {https://EconPapers.repec.org/RePEc:ecm:emetrp:v:79:y:2011:i:2:p:453-497},
}
\end{filecontents}
\addbibresource{\jobname2.bib}
\begin{document}
\textcite{Hansen2011}
\printbibliography
\end{document}