Graphics, Figures & Tables ⇒ Figure in list of figures but without caption
Figure in list of figures but without caption
Is it possible to have a silent caption on a figure?
Basically, my figure already includes its caption inside the figure file, so that I don't want to add another one with Latex. However, I do want the figure to appear in the list of figures! Is there any way to do that?
Thanks!
Winnie
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Figure in list of figures but without caption
you can use the \addcontentsline command; an example (I used black rectangles to simulate actual figures, but of course you can use the standard \includegraphics command provided the graphicx package has been loaded):
Code: Select all
\documentclass{book}\begin{document}\listoffigures\begin{figure}[!ht]\centering\rule{2cm}{2cm}\caption{A black rectangle with regular caption.}\end{figure}\begin{figure}[!ht]\centering\stepcounter{figure}\rule{2cm}{2cm}\addcontentsline{lof}{figure}{\protect\makebox[2.3em][l]{\thefigure}A black rectangle without caption but listed in the lof.}\end{figure}\begin{figure}[!ht]\centering\rule{2cm}{2cm}\caption{Another black rectangle with regular caption.}\end{figure}\end{document}
Re: Figure in list of figures but without caption
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Figure in list of figures but without caption
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10