Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using biblatex with the chem-rsc package option. I sometimes make use of the \textcite{<key>} or \citeauthor{<key>} commands to put the authors' name into text. When there are many, it writes "Bloke et al.", but I would like to make it put the "et al." in italics.

I'm sure there are some hacky ways of doing this by rewriting parts of commands. I'm hoping that there is some fairly straight forward and robust method for it though.

share|improve this question

2 Answers 2

up vote 21 down vote accepted

"et al." corresponds to the localization key andothers. In most styles it is set by the generic bibliography macro name:andothers. You can redefine this macro to wrap \bibstring{andothers} in \emph.

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=chem-rsc]{biblatex}

\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\emph]{andothers}}
    {}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\textcite{companion} \citeauthor{companion}
\printbibliography
\end{document}

enter image description here

share|improve this answer
1  
Thanks Audrey, this solution works. Might I ask though to any biblatex developers that might have seen this, that it would be nice to have some option to do this without redefining the name:andothers macro. –  aghsmith Jan 13 '12 at 14:04
    
@aghsmith You can submit feature requests here, though I have my doubts such an option would be incorporated. This is a style issue and the existing style can easily be adapted to meet your needs. –  Audrey Jan 13 '12 at 14:26
5  
@Audrey: A simple: \bibstring[\emph]{andothers} is enough. –  Marco Daniel Jan 13 '12 at 16:47
    
@MarcoDaniel Ah, the wrapper argument. Thanks for the suggestion. –  Audrey Jan 13 '12 at 17:05
    
@aghsmith Just an addendum. egreg's new xpatch package will make it much easier to make small changes like these to both bibliography macros and drivers. Feel free to accept lockstep's answer instead. –  Audrey Jan 13 '12 at 17:52

This is another case where egreg's xpatch package comes in handy. Instead of copy-pasting the whole content of the name:andothers bibmacro, one may selectively apply changes (as suggested by Marco Daniel):

\documentclass{article}

\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=chem-rsc]{biblatex}

\usepackage{xpatch}

\xpatchbibmacro{name:andothers}{%
  \bibstring{andothers}%
}{%
  \bibstring[\emph]{andothers}%
}{}{}

\addbibresource{biblatex-examples.bib}

\begin{document}
\textcite{companion} \citeauthor{companion}
\printbibliography
\end{document}
share|improve this answer
3  
Or with the \xpatchbibmacro provided by the xpatch package, of course, soon to be also on TeX Live. :) –  egreg Jan 13 '12 at 16:36
    
@egreg One of my aims in answering this question is to make Audrey aware of your great solution. :-) –  lockstep Jan 13 '12 at 16:38
1  
@lockstep: Please see my comment under the previous answer. The wrapper of bibstring must be command like emph. –  Marco Daniel Jan 13 '12 at 16:49
    
@lockstep +1 Yes, I upvoted that answer (and your use case with the year format) other day. I considered using the patch, but went with a redefinition instead. –  Audrey Jan 13 '12 at 17:12
1  
@moewe Done. (some filler text) –  lockstep Jan 14 at 15:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.