# Biblatex publication (year) in bold

I am trying to display the year and also the parentheses in bold

Author (year):

Here is a 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

%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}

\begin{document}
\textcite{Hansen2011}
\printbibliography
\end{document}


I tried using \mkbibbold in some way, but it didnt work well. A short explanation would be great.

biblatex-ext defines additional formats for fields, and among them biblabeldate which controls the "format for the labeldate in the bibliography for authoryear-like styles", so that's what you have to use for your purpose:

\DeclareFieldFormat{biblabeldate}{\mkbibbold{\mkbibparens{#1}}}



\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space}


(for this to include the colon in bold font, as set in the formatting directive for biblabeldate the option punctfont=true is required).

In full:

\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

%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}

• \DeclareDelimFormat[bib,biblist]{nametitledelim}... would be prettier than \renewcommand{\labelnamepunct}.... If you set the punctfont option to true it should not even be necessary to add the \mkbibbold, the format of the previous field would automatically be applied to the following punctuation. – moewe Dec 30 '18 at 7:39
• @moewe The answer's "prettification" is duly done. Thank you! Btw, if I'm not mistaken, this must be my first biblatex-ext answer. :-) – gusbrs Dec 30 '18 at 10:28
• The \setpunctfont{\textbf} is superfluous since you are using \mkbibbold in the field format. The \mkbib... commands execute the appropriate \setpunctfont automatically. – moewe Dec 30 '18 at 15:44
• @moewe I see, neat. As a matter of fact, I didn't really know punctfont existed (or didn't remember...). But, in general, is it usually safe to assume that the following punctuation mark will obey the previous field formatting directive? It is not really intuitive (true, it makes sense in light of the punctuation tracker). – gusbrs Dec 30 '18 at 16:09
• If punctfont is active and all field formats use the \mkbib... commands then the following punctuation command will use the same font (italic, bold, upright). If it works properly this is quite intuitive I think, at least if you want this to happen. – moewe Dec 30 '18 at 16:15