# Change author font for specific cite command

Consider the following MWE

\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\AtBeginDocument{%
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
}

\begin{document}
\textcite{knuth:ct:e}\\
\fullcite{salam}\\
Footcite\footfullcite{baez/article}
\printbibliography
\end{document}


This will print author surnames in small caps for all cite command both in the document and in the bibliography. Just for the \textcite command I want the surname (i.e Knuth in the example) to be printed in the text in regular font rather than in small caps.

EDIT: As of March 2016 (biblatex 3.3), you need to change \mkbibnamefamily instead of \mkbibnamelast

A possible solution is to introduce a toggle to determine whether we are in a text cite or not. Then the modification of \mkbibnamelast is parametrised to the toggle. This solution uses the xpatch package to modify the textcite bibmacro, to set the toggle to true just before executing the textcite macro and to false right after the textcite macro has been executed.

\newtoggle{textcite}

\AtBeginDocument{
\renewcommand*{\mkbibnamelast}[1]{%
\iftoggle{textcite}{#1}{\textsc{#1}}}
}

\xpretobibmacro{textcite}{\toggletrue{textcite}}{}{}
\xapptobibmacro{textcite}{\togglefalse{textcite}}{}{}


\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\AtBeginDocument{%
\renewcommand*\mkbibnamelast[1]{\textsc{#1}}}
\let\TC\textcite
\renewcommand\textcite[1]{{\def\mkbibnamelast##1{##1}\TC{#1}}}% hold it local
%% If you need the optional argument of \textcite then we have to modify
%% the macro

\begin{document}
\textcite{knuth:ct:e}\\
\fullcite{salam}\\
Footcite\footfullcite{baez/article}
\printbibliography
\end{document}


• This completely breaks the syntax of \textcite: \textcite[⟨prenote⟩][⟨postnote⟩]{⟨key⟩} – egreg Sep 26 '14 at 20:21