Many Biblatex-Styles use \mkbibemph{}
to typeset italic parts of an bibliographic entry. By default, \mkbibemph{}
is defined as \emph{}
.
My Problem:
If one redefines \emph{}
like \renewcommand{\emph}[1]{\texttt{\color{red} #1}}
, this breaks the intended appearance of the selected bib-style.
I tried to use \let\mkbibemph\mkbibitalic
to avoid this, but had no success. I read Non-italic \emph, italic biblatex titles. Only setting the affected entries manually with
\DeclareFieldFormat[book]{title}{\mkbibitalic{#1}}
\DeclareFieldFormat[article]{journaltitle}{\mkbibitalic{#1}}
gave me the intended result (bibliographic entry in italic/'emphasized' AND a redefined \emph{}
in the text). It looks like biblatex ignores its own \mkbibemph{}
and uses \emph{}
instead. The only alternative seems to be defining my own \emph{}
.
This is not the behaviour I expect, is my understanding of how Biblatex works wrong? Can you point me to my mistake?
MWE below:
\documentclass{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage{xcolor}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{small,
author = {Freely, I.P.},
title = {A small paper},
journal = {The journal of small papers},
year = 1997,
volume = {-1},
note = {to appear},
}
@article{big,
author = {Jass, Hugh},
title = {A big paper},
journal = {The journal of big papers},
year = 7991,
volume = {MCMXCVII},
}
\end{filecontents*}
\usepackage[bibstyle=authoryear,backend=bibtex8]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{blindtext}
\renewcommand{\emph}[1]{\texttt{\color{red} #1}}
\let\mkbibemph\mkbibitalic % overwrites \mkbibemph, but does not give the intended result
%% The only remedy I could find, uncomment to see intended result:
%\DeclareFieldFormat[book]{title}{\mkbibitalic{#1}}
%\DeclareFieldFormat[article]{journaltitle}{\mkbibitalic{#1}}
\begin{document}
\show\mkbibemph
\mkbibemph{\blindtext}\autocite{small}
\show\mkbibitalic
\mkbibitalic{\blindtext}\autocite{big}
\show\emph
\emph{\blindtext}
\printbibliography
\end{document}
Best Answer
You don't only need to redefine
\mkbibemph
but also the internal macro\blx@imc@mkbibemph
But it is probably nicer to follow Johannes_B's advice and not redefine
\emph
, but use a really semantic command for your red emphasis.