3

I have an image I would like to don with a citation. However, placing the citation on top of the image has proven to be a bit of a challenge. Simply placing the citation after the image with

\includegraphics[width=0.8\textwidth]{image.jpg}\cite{source[1]}

produces the following result:

Citation after an image.

As you can see, the citation appears outside of the image, which is not surprising. Using

\includegraphics[width=0.8\textwidth]{image.jpg}\hspace{-1em}\cite{source}

moves the citation on top of the image horizontally:

Picture citation with negative hspace.

In the last image, it an be seen that the citation is still partly outside of the image, so I attempted the following:

\includegraphics[width=0.8\textwidth]{image.jpg}\vspace{-0.5em}\hspace{-1em}\cite{source}

However, this changes nothing:

Image citation with vspace and hspace.

Why is this, and how could I apply \vspace and \hspace simultaneously to a citation, in order to properly place it on top of an image? I also accept more elegant solutions.

  • You should probably consider adding that information via the caption for this image instead. That is generally the most accepted way. Also when posting here, please post a full minimal example instead of sniplets like this, then we have a better idea of what exactly you are doing, For image replacements you can use the images that come along with the mwe package. – daleif Apr 12 at 14:55
  • I would add a caption, if this was actually a presentation I was making for a scientific conference, but in this case it would just take up unnecessary space on the slide. I will add a MWE in just a second. – SeSodesa Apr 12 at 14:58
3

This usage of \stackinset places the citation with a 2pt gap at the bottom right of the image.

\documentclass{article}
\usepackage{graphicx,filecontents,stackengine}
\begin{filecontents*}{mybib.bib}
@TECHREPORT{segl83,
 AUTHOR = "Segletes, Steven B.",
 TITLE   = "Drift Velocity Computations for Shaped-Charge Jets",
        NUMBER  = "ARBRL-MR-03306 (ADA 133 756)",
        INSTITUTION = "Army Ballistic Research Laboratory (US)",
        ADDRESS = "Aberdeen Proving Ground (MD)",
 YEAR = "1983",
 MONTH = sep    }
\end{filecontents*}

\begin{document}
\stackinset{r}{2pt}{b}{2pt}{\cite{segl83}}{\includegraphics[width=2in]{example-image}}
\bibliographystyle{unsrt}
\bibliography{mybib}
\end{document}

enter image description here

2

Raise a bit a zero width box.

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}
\centering

\includegraphics[width=5cm]{example-image}% <-- Don't forget
\raisebox{1ex}{\makebox[0pt][r]{\cite{uthor}\ }}

\caption{Image with citation}

\end{figure}

\begin{thebibliography}{1}

\bibitem{uthor} A. Uthor, A paper.

\end{thebibliography}

\end{document}

enter image description here

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.