# Make author names bold in bibliography only

I am using an adaption of the verbose-ibid citestyle (as suggested here) and a custom bbx file based on authoryear. One of the things it changes is that it makes the author names appear bold. The only problem is that the verbose-ibid style seems to use the same macro and the bold names therefore appear in footcites as well.

Here is the relevant part of the bbx:

\RequireBibliographyStyle{authoryear}

\ExecuteBibliographyOptions{dashed=false,firstinits=true}

\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\usebibmacro{bbx:savehash}%
\textbf{\printnames{author}}% THIS IS THE IMPORTANT LINE
\iffieldundef{authortype}
\iffieldundef{authortype}
{}
{\usebibmacro{authorstrg}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\usebibmacro{date+extrayear}}

\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}


How can I apply textbf in the bibliography ony, not touching citations and footnotes?

Most biblatex styles use the name format sortname to print the author names in the bibliography, so we can redefine that format.

In particular sortname is the name format used for the authoryear- and authortitle-based bibliography styles (including the verbose family). If you want a similar effect for numeric and alphabetic styles you should redefine the name formats author, editor and translator directly.

First we define a new format: first-last-bold, it is based on first-last, but with an added \mkbibbold{

\DeclareNameFormat{given-family-bold}{\mkbibbold{%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}}


similarly one could have

\DeclareNameFormat{family-given-bold}{\mkbibbold{%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}}


or

\DeclareNameFormat{family-given/given-family-bold}{\mkbibbold{%
\ifnumequal{\value{listcount}}{1}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\ifboolexpe{%
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}}
{}
{\usebibmacro{name:revsdelim}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}}


then we tell biblatex to use the new format

\DeclareNameAlias{sortname}{given-family-bold}


This last step might have to be

\DeclareNameAlias{author}{given-family-bold}
\DeclareNameAlias{editor}{given-family-bold}
\DeclareNameAlias{translator}{given-family-bold}


with some styles.

MWE

\documentclass{article}
\usepackage[style=verbose-ibid,backend=biber]{biblatex}

\DeclareNameFormat{given-family-bold}{\mkbibbold{%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}}

\DeclareNameAlias{sortname}{given-family-bold}

\begin{document}
\cite{cicero,wilde,baez/article,knuth:ct,aristotle:physics}

\printbibliography
\end{document}


The answer has been updated to conform with the new name format in version 3.3, see Biblatex 3.3 name formatting.

• This doesn't work for more recent versions of biblatex: see this answer by Ulrike Fischer – David R May 16 '17 at 12:42
• @DavidRobertson Indeed this is a common problem for answers about the name format. Are you interested in an updated answer or are you OK with the hint in Ulrike's answer? – moewe May 16 '17 at 22:02
• I think I've got the hang of it; I'll try to post it as an answer later today. Thanks for the offer though! – David R May 17 '17 at 13:26

You can use the hook \AtBeginBibliography:

\AtBeginBibliography{%
\renewcommand*{\mkbibnamefirst}[1]{\mkbibbold{#1}}%
\renewcommand*{\mkbibnamelast}[1]{\mkbibbold{#1}}%
\renewcommand*{\mkbibnameprefix}[1]{\mkbibbold{#1}}%
\renewcommand*{\mkbibnameaffix}[1]{\mkbibbold{#1}}%
}

• Maybe you would like to use \mkbibbold instead of \tetxbf. – moewe May 18 '14 at 12:34
• @moewe: Indeed. It's done. – Marco Daniel May 18 '14 at 12:37
• One draw-back of this solution is though that all names in the bibliography will be printed in bold, even editors and translators. Also the "and" between author names is not printed in bold. – moewe May 18 '14 at 12:44
• @PatrickT And \mkbibnamefirst has become \mkbibnamegiven; \mkbibnameaffix is \mkbibnamesuffix now. Note that this solution bolds all names (for example also editors of @incollections) which may or may not be desired. – moewe Jul 5 '18 at 20:27
• @PatrickT In general I would only use biblatex-apa if I have to follow the APA style - or a derived style with tiny modifications. Usually the standard styles are much easier to customise and modify because biblatex-apa has to work hard to implement the APA guidelines (the same goes for a specialist styles, biblatex-chicago, biblatex-mla, ...). style=authoryear or its derived styles might be a good start. – moewe Jul 6 '18 at 8:31

You should be able to add the \textbf-command by using the xpatch-package.

In the preamble:

\usepackage{xpatch}


Then you have to write before the \printbibliography:

\xpatchbibmacro{author}{\printnames{author}}{\textbf{\printnames{author}}}{}{}


which will replace the command.

(untested)

• I think you mixed up the order of the arguments, it ought to be \xpatchbibmacro{author}{\printnames{author}}{\textbf{\printnames{author}}}{}{}. Also note that this will only work with styles that use the original author macro and will not set editors of @collections in bold even though they are displayed like authors in the bibliography. I would suggest you use \mkbibbold instead of \textbf. – moewe May 18 '14 at 12:42
• you are right, i've read it wrong. and this of course only work for the wanted author-bibmacro. – musicman May 18 '14 at 14:56

Here's a version of moewe's answer that's updated to work with biblatex versions 3.3+. I'm not an expert with biblatex at all, but wanted to write down what what I did to update the name format.

On my machine at work, the system-wide installation of biblatex is version 2.8a. Section 4.4.2 of the documentation explains that \DeclareNameFormat takes an three arguments. Within the third argument, #1 through to #8 are used to refer to various components of a person's name. The odd numbers give the full string, whereas even numbers abbreviate this to just initials. Here they are. In brackets I've added what they'd be if my name was Richard Wayne "Dick" van Dyke Senior.

• #1 and #2: Surname(s), aka family names (Dyke, or D.)
• #3 and #4: First and middle name(s), aka given names (Richard Wayne Dick'')
• #5 and #6: Any name prefixes (van)
• #7 and #8: Any name suffixes, aka affixes (Senior)

More recent versions of biblatex don't pass this information around as positional arguments; instead they're available as named macros. (This certainly makes it easier for a novice to understand what the format is actually doing. Here's what the arguments numbers above need to be translated into. Notice that the abbreviated versions are the same macro with an i at the end.

• \namepartfamily and \namepartfamilyi
• \namepartgiven and \namepartgiveni
• \namepartprefix and \namepartprefixi
• \namepartsuffix and \namepartsuffixi

If we replace all instances of #1 through #8 in this way, we get a document that compiles happily with bold surnames in the bibliography. However, biblatex isn't completely happy with us.

Package biblatex Warning: '\iffirstinits' is deprecated, use '\ifgiveninits'.
Package biblatex Warning: 'name:first-last' is deprecated, please use 'name:given-family'.


I guess the change in terminology is to better support names where the family comes first, e.g. with Japanese names. After updating the macro and strings as requested, the MWE is as follows.

\documentclass{article}
\usepackage[style=verbose-ibid, backend=biber]{biblatex}

\DeclareNameAlias{sortname}{first-last-bold}

\DeclareNameFormat{first-last-bold}{\mkbibbold{%
\ifgiveninits
{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}
{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
\usebibmacro{name:andothers}}}

\begin{document}
\cite{cicero,wilde,baez/article,knuth:ct,aristotle:physics}

\printbibliography
\end{document}


The output from LaTeX is just as in moewe's answer.