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.

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.

share|improve this question

1 Answer 1

up vote 5 down vote accepted
\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} 
share|improve this answer
    
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 at 20:06
2  
sure, it works too. But \hfill is easier in this case. For \raggedleft you have to use a paragraph –  Herbert Jul 19 at 20:07

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.