Home > graphics > Cite references in figure caption

# Cite references in figure caption

February 12Hits:1

Problem:

Getting error messages when trying to cite a reference in the figure caption. Not sure what I am doing wrong. Can't seem to find that this has been up previously either.

Minimal Working Example:

\documentclass{book} \usepackage[utf8]{inputenc} \usepackage[pdftex]{graphicx} \usepackage{epstopdf} \graphicspath{{figures/}}  \usepackage{apacite} \bibliographystyle{apacite}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{rub14,    author = {Rubin, Jared},    title = {Printing and {Protestants}: An empirical test of the role of printing in the {Reformation}},    journal = {Review of Economics and Statistics},    volume = {96},    number = {2},    pages = {270--286},    year = {2014}, } \end{filecontents}  \begin{document} \begin{figure}[htp] \centering \includegraphics[width=\textwidth]{conceptdriven.eps} \caption{\label{fig:researchscope}The process of concept-driven design approach in relation to theory and use situation, adopted from \citeA[p.~282]{rub14}}  \end{figure}  \bibliography{\jobname}  \end{document} 


Desired outcome:

The reference to be directly after the words "adopted from".

The macro \citeA is "fragile", in the LaTeX-specific sense of the word. If it occurs inside a "moving argument" (more LaTeX jargon, sorry), such as the argument of a \caption instruction, one must prefix a \protect instruction:

\caption{\label{fig:researchscope}The process of concept-driven design approach in
relation to theory and use situation, adopted from \protect\citeA[p.~282]{rub14}}



For another example of this type, see the posting Using \input{} inside caption.

There is a similar question in StackOverflow.

The problem with the \cite command in the figure caption is that it generates conflicts with the automatic creation of the List of Figures. So the first option is to put an alternative caption into brackets:

\caption[test caption]{test caption from~\cite{MyCite}}



You can also use the \protect environnement as suggested in the comments:

\caption{test caption from~\protect\cite{MyCite}}



As for your minimal working example, you could do it as follows:

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\graphicspath{{figures/}}

\usepackage{lipsum} % just for the example

\usepackage{apacite}
\bibliographystyle{apacite}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{rub14,
author = {Rubin, Jared},
title = {Printing and {Protestants}: An empirical test of the role of printing in the {Reformation}},
journal = {Review of Economics and Statistics},
volume = {96},
number = {2},
pages = {270--286},
year = {2014},
}
\end{filecontents}

\begin{document}
\listoffigures

\vspace{0.5cm}
\lipsum[3]
\begin{figure}[htp]
\centering
\includegraphics[width=8cm,height=5cm]{sample_pic}%
%\includegraphics[width=\textwidth]{conceptdriven.eps}
\caption[The process of concept-driven design approach in relation to theory and use situation]{The process of concept-driven design approach in relation to theory and use situation, adopted from~\citeA[p.~282}
\label{fig:researchscope}
\end{figure}

\lipsum[2]
\bibliography{\jobname}

\end{document}



And the output would look like:

## Related Articles

• ### Cite references in figure captionFebruary 12

Problem: Getting error messages when trying to cite a reference in the figure caption. Not sure what I am doing wrong. Can't seem to find that this has been up previously either. Minimal Working Example: \documentclass{book} \usepackage[utf8]{inputen

• ### Stop Classicthesis starting its reference count from figure captions November 27

When using the \cite command in figure captions and the ieeetr bibliography style, then BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]). Is there any way to get Bi

• ### Put \cite in Figure caption, but don't want to show this in TOC February 7

Sometimes I'd like to cite the reference in the caption of a graphic. But I want to avoid that this citation is displayed in the \listoffigures. How can I achieve that? Fore example with this code: \begin{figure}[htb] \centering \includegraphics{over

• ### figure captions, references using knitr and markdown to htmlDecember 12

I'm writing an Rmd file, to be processed by knitr into HTML. It contains some R chunks that generate figures, which get stored as data URIs in HTML. 1) How do I add a caption to such an image? I'd like to have a caption that says something like "Figu

• ### Figure caption and reference formattingMay 16


• ### How is it possible that references are not in the correct order if I put them in a figure caption in LyX?December 15

I'm using LyX and I added a reference to a figure caption. Now this reference is the number [1] in the reference list even if it appears later than many others. It looks like the float captions have a higher priority in counting references' appearanc

• ### list of figures reference to image, caption on another pageMarch 20

Using the caption package to put a caption of a figure on another page, the List of Figures shows the number of the page where the caption is, not the page where the actual image is. \documentclass{article} \usepackage{graphicx} \usepackage{caption}

• ### Get BibTeX to ignore citation numbering in a figure captionFebruary 14

Here's the problem. I have the main text of a document which includes a citation late in the document, say \cite{ref20}. One of my figure captions has in it, the \cite{ref20}. What happens is that the number given to ref20 is now entirely dependent u

• ### Table and Figure Caption Citation ProblemJune 5

When I build a LaTeX code, the references to figures and tables labels are not recognized, so latex builder prints "?" in the place. And simplifying the entire text I found out that even the simple dummy document \documentclass{book} \begin{docu

• ### Insert a reference in a caption?February 13

After visiting wiki on labels and cross-referencing, a couple of tex sites (1,2), and a stackexchange solution, the following reference will not appear in the caption. I'm using pdflatex on ubuntu. The section label that is being referenced (appen) i

• ### Prefix "Figure" and giving reference to figuresMay 6

Is it possible to adjust the font size of the prefix Figure when captioning an included image? Furthermore, is it possible to refer to a picture in a meaningful way without using a caption; I tried but no number was attributed to the figure I get dou

• ### Preventing line break in figure captionDecember 9

I have the following figure with the corresponding caption: As you can see the caption inappropriately breaks the line, which I want to avoid. Optimally without simply reducing the font size of the caption text. Code as follows: \documentclass[12pt,

• ### Giving book reference to figuresJune 22

\documentclass[a4paper,12pt,numbers=noenddot]{scrartcl} \usepackage{amsmath} \usepackage{amsmath} \begin{document} \begin{figure}[H] \centering \includegraphics[scale=0.5]{1.png} \caption{Motion of Body \textit{H}} \label{fig:two} \end{figure} \end{d

• ### Errors with figure caption since using siunitxNovember 24

I am a bit of a newbie with LaTeX. Everything was working well (mostly) but I am running into all sorts of weird errors since I added the siunitx package. The error log first showed errors with tables, which I was able to fix (I think) using a quick

• ### Problem when using pdfcomment in figure captions and then referencingJanuary 31

This is possibly a bug in the pdfcomment package, maybe not. I use the \pdfmarkupcomment[]{}{} macro to insert highlighting into the caption of a figure. Then follows a lable. I reference the figure using \autoref or \cleverref. In both cases the ref

• ### How can I turn off table and figure captions?November 28

I am using my figures and tables both in report documents, where I want them to have caption text, an in presentations made with Beamer, where I want them to not have a caption text. I am using the Caption package (2011/08/11) both for my report and

• ### Add source to figure captionJanuary 23

How can I add a source to a figure? I need to add \ref, \cite or just free text. Something like that: \begin{figure} [ht] \centering \includegraphics[width=0.95\textwidth]{res/figure.pdf} \caption{Caption} \source{\ref{},\cite{} or free Text} \label{

• ### How to cite a complete figure which contains several subfigures extending over multiple pagesAugust 27

I would like to cite a complete figure (say Fig.1) which contains several sub-figures (say a,b,c,d,e,f,g,h) and extends over next page. Here is the code which I used. \begin{figure}[!htb] \captionsetup{labelformat=empty} \makebox[\textwidth][c] { \su

• ### Change color of figure caption textSeptember 10

In my code below, I wanted to change the color of the text for the table and figure caption. I am using this: \usepackage[svgnames]{xcolor} \definecolor{ocre}{RGB}{243,102,25} \usepackage{caption} \usepackage[labelfont={color=ocre,bf}]{caption} \rene

• ### apa6.cls helvetica font in section headers and figure captionsNovember 2

Usually the section headers of apa6documents are sans-serif and bold. I needed them not bold so I redefined all sections/subsections like this to meet my criteria: \documentclass[man,12pt,a4paper,noextraspace,donotrepeattitle,longtable]{apa6} % 12 pt