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.

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]
    \source{\ref{},\cite{} or free Text}

Should give me:


The source shouldn't appear in \listoffigures.

share|improve this question
Have you tried \caption[Caption]{Caption. Source: here the source of the picture}? –  Daniel Jan 23 '13 at 16:26

1 Answer 1

up vote 5 down vote accepted

There are many ways to do this. The source could be put inside the caption. LaTeX puts the caption in one line, if it fits there. This can be prevented by \hspace{\linewidth} in the following example. When LaTeX tests the width by putting it in a \hbox, then \hspace is taken into account. LaTeX concludes that the caption does not fit into one line and by setting it in several lines, the line break is executed and the white space right after it (\hspace{\linewidth}) is ignored:


    \textbf{Source:} #2%

\begin{figure} [ht]
  \captionsource{Caption}{ref, cite or free Text}

Alternatively package caption provides an option singlelinecheck, where the testing for fitting into a line can be disabled, using possible multi-line mode always.

share|improve this answer

Your Answer


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.