# 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.

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

\DeclareNameFormat{first-last-bold}{\mkbibbold{%
\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}}


similarly one could have

\DeclareNameFormat{last-first-bold}{\mkbibbold{%
\iffirstinits
{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}}


or

\DeclareNameFormat{last-first/first-last-bold}{\mkbibbold{%
\ifnumequal{\value{listcount}}{1}
{\iffirstinits
{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
\ifblank{#3#5}
{}
{\usebibmacro{name:revsdelim}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\usebibmacro{name:andothers}}}


then we tell biblatex to use the new format

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


MWE

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

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

\DeclareNameFormat{first-last-bold}{\mkbibbold{%
\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}}

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

\printbibliography
\end{document}


-
Works like a charm, thanks! –  just.kidding May 27 '14 at 14:54

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
@moewe Is there any way to prevent that? If not, I'll use your suggestion. –  just.kidding May 26 '14 at 17:30
@just.kidding It will be hard to avoid the first shortcoming I mentioned above without redefining (potentially quite a lot of) other commands. The second issue (noon bold and) can probably be dealt with, even though this will cause all "and"s to be bold (bringing you back to issue #1). –  moewe May 26 '14 at 17:49

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