6

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?

7

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

| improve this answer | |
3

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.

| improve this answer | |
3

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}}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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