When I use \section*{namename}, if I want to insert it in the toc, I will use \addcontentsline{toc}{section}{namename}

So, I want to know, if I want insert some figure name (I don't use \caption{} for some special figure) in the list of figure, what command should be using?

Is there some way just like use addcontentsline???

  • try \addcontentsline{lof}{figure}{namename} – touhami Jul 2 '18 at 19:01

The \caption does not have a *-version, so you would have to make it.

Furthermore, you'd have to replicate \addcontentsline to behave like \caption does.

This is one way to implement the \addcontentsline for \listoffigures:

    \addcontentsline{\csname ext@figure\endcsname}{figure}{\protect\numberline{\csname thefigure\endcsname}{\ignorespaces #1}}

Further, here is also an implementation of a starred version of caption:

This is one way to do that:

% Redefine @caption
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
% Make a starred version of \caption
% If you don't care about the star thing, the command below is all you need:
    \addcontentsline{\csname ext@figure\endcsname}{figure}{\protect\numberline{\csname thefigure\endcsname}{\ignorespaces #1}}
        \addtoLOF{Not caption}

Edit: Fixed recursion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.