Graphics, Figures & Tables ⇒ streamlining caption use for listoffigures
-
- Posts: 2
- Joined: Wed Feb 10, 2010 1:53 am
streamlining caption use for listoffigures
I'm envisioning something like:
\begin{figure}[hb]
\includegraphics{someImage}
\caption[The astonishing results were highly significant]
{Unfortunately, the data were fabricated.}
\end{figure}
That would produce a listing in listoffigures:
The astonishing results were highly significant.
and a caption of,
The astonishing results were highly significant. Unfortunately, the data were fabricated.
I could add a kludgy sed command to my typesetting script, but I'd like to go with something as robust as possible.
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
streamlining caption use for listoffigures
perhaps something along the lines of the command \mycaption
defined below could be useful:
Code: Select all
\documentclass{report}
\newcommand\mycaption[2]{\caption[#1]{#1.\ #2}}
\begin{document}
\listoffigures
\begin{figure}[!ht]
\centering
\rule{4cm}{2cm}
\mycaption{The astonishing results were highly significant}
{Unfortunately, the data were fabricated.}
\label{fig:test}
\end{figure}
\end{document}
-
- Posts: 2
- Joined: Wed Feb 10, 2010 1:53 am