Graphics, Figures & Tables ⇒ Displaying figure source under caption
-
- Posts: 8
- Joined: Sun Aug 09, 2009 3:29 am
Displaying figure source under caption
When I insert a figure I want to name the source of the figure under the figure caption. Is there anyway to do this instead of just naming the source in the caption. Prefferably in a different font to the font in the caption.
I would appreciate any help
Thanks
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Displaying figure source under caption
for the source, you can use the \caption* command provided by the caption package (make sure that you are using a recent version of the package). Take a look at the following example:
Code: Select all
\documentclass{book}
\usepackage{caption}
\begin{document}
\begin{figure}[!ht]
\centering
\rule{4cm}{3cm}% to simulate an actual figure
\caption{a test figure}
\label{tab:test}
\captionsetup{font={footnotesize,bf,it}}
\caption*{the source of the figure}
\end{figure}
\end{document}
-
- Posts: 8
- Joined: Sun Aug 09, 2009 3:29 am
Re: Displaying figure source under caption
Cheers
-
- Posts: 1
- Joined: Fri Nov 19, 2010 9:48 am
Displaying figure source under caption
Code: Select all
...
\newenvironment{figuree}[1]{
\begin{figure}
\includegraphics{#1}
\def\catext{#1}
\def\latext{fig:#1}
\caption{\catext}
\label{\latext}
}{
\end{figure}
...
\begin{document}
...
\begin{figuree}{<picture_source>}\end{figuree}
...
\end{document}
Displaying figure source under caption
Your code has an obvious typo: there's a missing closing brace right after \end{figure}. Besides, the code does not solve the original problem at all.romanwarlock wrote:Code: Select all
... \newenvironment{figuree}[1]{ \begin{figure} \includegraphics{#1} \def\catext{#1} \def\latext{fig:#1} \caption{\catext} \label{\latext} }{ \end{figure} ... \begin{document} ... \begin{figuree}{<picture_source>}\end{figuree} ... \end{document}