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.

In my document, the captions are set in italics. I use a customized biblatex author/year citation style.

If I \cite within a caption, the citation is set in italics as well. How can I avoid that?

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

biblatex offers the \AtEveryCite hook:

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\AtEveryCite{\normalfont}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\begin{figure}
\itshape
\centering
\rule{1cm}{1cm}
\caption{A figure \autocite{A01}}
\end{figure}

\printbibliography

\end{document}

enter image description here

share|improve this answer
    
Very nice and clean solution, thanks! –  Tom P. Jul 19 '12 at 7:04
add comment

The standard latex cite has a formatting hook \@cite@ofmt other packages may offer different interfaces to setting this but something like

\makeatletter
\def\@cite@ofmt#1{\hbox{\reset@font #1}}
\makeatother

probably does what you want.

share|improve this answer
add comment

Unfortunately, David's answer didn't work for me. But based on his solution, I added \reset@font which worked for me:

\DeclareCiteCommand{\cite}[\reset@font\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
share|improve this answer
add comment

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.