1

If I load the following:

\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\Huge \bfseries \sffamily}

and below (below is the add in subfigure in the List of Figure)

\usepackage[demo]{graphicx}
\usepackage[hypcap=false]{caption}
\usepackage[list=true]{subcaption}

The list of subfigure does not appear in List of Figure.

The full MWE:

\documentclass{book}

\usepackage[most]{tcolorbox}

% \usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage[list=true]{subcaption}

\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\Huge \bfseries \sffamily}


\begin{document}
\listoffigures

\chapter{One}
\section{One}

\begin{figure}[!b]
        \centering
        \begin{subfigure}[b]{0.1\textwidth}
            \includegraphics[width=\textwidth]{example-image}
            \subcaption{$Q^{*}$ values for arm 1}
            \label{fig:arm1}
        \end{subfigure}
    %

        \begin{subfigure}[b]{0.1\textwidth}
            \includegraphics[width=\textwidth]{example-image}
            \subcaption{$Q^{*}$ values for arm 2}
            \label{fig:arm2}
        \end{subfigure}


            \begin{subfigure}[b]{0.1\textwidth}
            \includegraphics[width=\textwidth]{example-image}
            \subcaption{$Q^{*}$ values for arm 3}
            \label{fig:arm2}
        \end{subfigure}
        \caption{$Q^{*}$ values for different arms}


          \end{figure}
    %

    \begin{figure}[htb]\ContinuedFloat
        \centering

        \begin{subfigure}[b]{0.6\textwidth}
            \includegraphics[width=\textwidth]{example-image}
            \subcaption{$Q^{*}$ values for arm 4}
            \label{fig:arm3}
        \end{subfigure}
    %
        \begin{subfigure}[b]{0.6\textwidth}
            \includegraphics[width=\textwidth]{example-image}
            \subcaption{$Q^{*}$ values for arm 5}
            \label{fig:arm4}
        \end{subfigure}
        \caption{$Q^{*}$ values for different arms (cont.)}
        \label{fig:arms}
    \end{figure}


\end{document}

enter image description here

If I cancel off:

% \usepackage{tocloft}
% \renewcommand{\cfttoctitlefont}{\Huge \bfseries \sffamily}

enter image description here

2
  • Could you please prepare a MWE?
    – leandriis
    Jan 1 '20 at 14:39
  • @leandriis, sorry for that. I eddited my question and added MWE
    – aan
    Jan 1 '20 at 14:45
3

If you use the tocloft package it will take control of the look+feel of the List of Figures, furthermore it offers an own mechanism for filtering subfigures from the list which was inherited from the (obsolete) subfigure package.

With

\setcounter{lofdepth}{2}

(after loading of the tocloft package) the subfigures will be listed in the LOF.

Unfortunately this mechanism is only documented in the subfigure package documentation, and not in the tocloft package documentation.

5
  • thanks. It works. Brillant. Can I know what is the meaning of 2 in setcounter{lofdepth}{2} in simple explanation?
    – aan
    Jan 1 '20 at 14:56
  • @aan 1 means "only show main figures", 2 means "show main + subfigures" in the listing. This mechanism is copied from the LaTeX counter tocdepth (offered by LaTeX itself) which does the same thing for the Table of Content.
    – user2574
    Jan 1 '20 at 15:01
  • thanks. Noted now. So i guess the maximum is 2. there impossible to have 3
    – aan
    Jan 1 '20 at 15:12
  • Related: gitlab.com/axelsommerfeldt/caption/issues/15
    – user2574
    Jan 3 '20 at 12:28
  • @aan You could certainly have 3, but that would do nothing unless there were subsubfigures. Jan 6 '20 at 18:21

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.