3

I want to add text (i.e the image source), which includes a citation, at the bottom right of a figure like this:

figure with source

I wrote the following piece of code:

\begin{figure}[h]   
\center{\includegraphics[width=1\linewidth]{merit_order}}  
{\small{\raggedleft{test \cite{_some_citation_}}}       %this does not work    
\caption{Merit-order of generating plants}  
\label{fig:meritorder}  
\end{figure}  

which produces this result:

figure latex no source

I have tried several variations of the code, by putting the "test" text before the \centercommand and by enclosing \center within {} (which, strangely, makes the "test" text left justified). What is the correct way to achieve what I want?

PS: I am using the bookest document class and the graphicx, float and wrapfig packages. I havent posted the preamble because I dont know if its relevant, but can do so if asked.

1 Answer 1

4
\begin{figure}[!htb]\centering
\includegraphics[width=\linewidth]{merit_order}\\
\hfill\small test \cite{_some_citation_}    
\caption{Merit-order of generating plants} \label{fig:meritorder}  
\end{figure} 
2
  • thanks! just so I know, is \hfill the only (or easiest) way? More generally, do \raggedleft and such not work within float environments?
    – avg
    Jul 19, 2014 at 20:06
  • 2
    sure, it works too. But \hfill is easier in this case. For \raggedleft you have to use a paragraph
    – user2478
    Jul 19, 2014 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .