How to delete number of figures in the list of figures? I use \listoffigures and \captionof.
Asked
Active
Viewed 1,415 times
1
Sebastiano
- 54,118
Anis
- 11
-
2Welcome to TeX.SX! Please post a MWE of your code. It helps us help you (e.g. to not suggest packages incompatible to your documentclass etc.). – TeXnician Jun 29 '17 at 12:16
-
IIRC, the figure number is added by \caption as part of the label field, not a separate argument to \addcontentsline. Easy solution is to use an empty [short caption] argument and write your own \addcontentsline. – John Kormylo Jun 29 '17 at 15:00
1 Answers
2
The generic function that sets the number of content in a ToC (that also includes the LoF and LoT) is \numberline. It takes a single argument which holds the number of the entry being set. Manipulating this macro to ignore it's argument around the LoF is easy enough with the following:
\let\oldnumberline\numberline% Copy \numberline into \oldnumberline
\renewcommand{\numberline}[1]{\oldnumberline{}}% Remove number argument
\listoffigures% Set the List of Figures
\let\numberline\oldnumberline% Restore \numberline (if needed)
Note that the argument removal still sets the figure entries away from the margin, because the figure number is set in a box of predetermined width. If you want that removed as well, use the \numberline macro to insert a negative space:
\let\oldnumberline\numberline% Copy \numberline into \oldnumberline
\renewcommand{\numberline}[1]{\hspace*{-1.5em}}% Remove number argument
\listoffigures
\let\numberline\oldnumberline% Restore \numberline (if needed)
The space between the number and the title in the LoF is 1.5em (by default).
Werner
- 603,163
-
_ @Werner Can I achieve the format
Figure NumberPeriodby modifying the above arguments.. For example if the figure number is 3.2 it should be shown as Figure 3.2. in the list of figures – mert May 06 '20 at 15:33 -
@mert: Consider this code. It uses
tocloftto insertFigurebefore the number and a period.after the number, also adjusting the width of this new "figure number" to match. It uses content from List of Figures - how to add caption label (an FAQ). – Werner May 06 '20 at 19:18

