![список нумерации рисунков](https://rvso.com/image/309874/%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%BD%D1%83%D0%BC%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8%20%D1%80%D0%B8%D1%81%D1%83%D0%BD%D0%BA%D0%BE%D0%B2.png)
Я хочу включить номер «детали» в список нумерации рисунков.
Вот как сейчас выглядит мой список фигур:
Вместо этого я хотел бы, чтобы каждый элемент показывал
I.1.1 Caption for Figure 1.1 Part I Chapter 1
I.1.2 etc...
I.2.1 etc...
I.2.2 etc...
II.1.1 etc...
II.1.2 etc...
II.2.1 etc...
II.2.2 etc...
Это, конечно, часть гораздо большего документа. Я включил всю свою преамбулу с MWE:
\documentclass[12pt]{report}
\usepackage[left=1.0in, right=1.0in, top=1.0in, bottom=1.0in]{geometry}
% including package for figures
\usepackage{float}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
% indent first paragraph
\usepackage{indentfirst}
% change table of contents and list of figures spacing
\usepackage{titletoc}
\setcounter{tocdepth}{2}
\titlecontents{part}[0em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{chapter}[4em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{section}[6em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsection}[9em]{\addvspace{.1pc}\bfseries}{\contentslabel{3em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{figure}[2.5em]{\addvspace{.1pc}\bfseries}{\contentslabel{2.5em}}{} {\titlerule*[1pc]{.}\contentspage}
% change spacing of part, chapter, section, and subsection headings
\usepackage{xcolor}
\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}[hang]{\normalfont\huge\bfseries\color{red}}{Chapter\ \thepart:}{5pt}{}
\titlespacing*{\part}{0pt}{0pt}{0pt}
\titleformat{\chapter}[hang]{\centering\normalfont\LARGE\bfseries\color{blue}}{Section\ \thechapter:}{5pt}{}
\titlespacing*{\chapter}{0pt}{12pt}{0pt}
\titleformat{\section}[hang]{\normalfont\Large\bfseries\color{black}}{\thesection}{5pt}{}
\titlespacing*{\section}{0em}{12pt}{0pt}
\titleformat{\subsection}[hang]{\normalfont\large\bfseries\color{black}}{\thesubsection}{5pt}{}
\titlespacing*{\subsection}{3em}{12pt}{0pt}
% remove new page as start of new chapter
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
% links
\usepackage[linkcolor=black, urlcolor=blue, colorlinks=true]{hyperref}
\usepackage[capitalise,noabbrev]{cleveref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End Of Preamble and start of document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\makeatletter\def\ttl@tocsep{}\makeatother
\tableofcontents
\listoffigures
\part{Title for Part \thepart\space}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\setcounter{chapter}{0}
\part{Title for Part \thepart\space}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\end{document}
Заранее спасибо за любые советы.
решение1
\documentclass[12pt]{report}
\usepackage[left=1.0in, right=1.0in, top=1.0in, bottom=1.0in]{geometry}
% including package for figures
\usepackage{float}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
% indent first paragraph
\usepackage{indentfirst}
% change table of contents and list of figures spacing
\usepackage{titletoc}
\setcounter{tocdepth}{2}
\titlecontents{part}[0em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{chapter}[4em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{section}[6em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsection}[9em]{\addvspace{.1pc}\bfseries}{\contentslabel{3em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{figure}[2.5em]{\addvspace{.1pc}\bfseries}{\contentslabel{2.5em}}{} {\titlerule*[1pc]{.}\contentspage}
% change spacing of part, chapter, section, and subsection headings
\usepackage{xcolor}
\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}[hang]{\normalfont\huge\bfseries\color{red}}{Chapter\ \thepart:}{5pt}{}
\titlespacing*{\part}{0pt}{0pt}{0pt}
\titleformat{\chapter}[hang]{\centering\normalfont\LARGE\bfseries\color{blue}}{Section\ \thechapter:}{5pt}{}
\titlespacing*{\chapter}{0pt}{12pt}{0pt}
\titleformat{\section}[hang]{\normalfont\Large\bfseries\color{black}}{\thesection}{5pt}{}
\titlespacing*{\section}{0em}{12pt}{0pt}
\titleformat{\subsection}[hang]{\normalfont\large\bfseries\color{black}}{\thesubsection}{5pt}{}
\titlespacing*{\subsection}{3em}{12pt}{0pt}
% remove new page as start of new chapter
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
\usepackage{ragged2e}
\usepackage{tocloft}
\let\standardthefigure\thefigure
\renewcommand{\thefigure}{\thepart.\standardthefigure}
\addtolength{\cftfignumwidth}{10pt}
% links
\usepackage[linkcolor=black, urlcolor=blue, colorlinks=true]{hyperref}
\usepackage[capitalise,noabbrev]{cleveref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End Of Preamble and start of document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\makeatletter\def\ttl@tocsep{}\makeatother
\tableofcontents
\listoffigures
\part{Title for Part \thepart\space}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\setcounter{chapter}{0}
\part{Title for Part \thepart\space}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\end{document}
РедактироватьУпрощенная версия
Это проще, чем ожидалось ;-)
Используйте \DeclareCaptionListFormat
команду для определения нового стиля ввода рисунка LoF, скажите *partfigure and
\captionsetup`, чтобы активировать этот стиль.
\DeclareCaptionListFormat{partfigure}{\thepart.\thefigure}
\captionsetup{listformat=partfigure}
Здесь не tocloft
используется
\documentclass[12pt]{report}
\usepackage[left=1.0in, right=1.0in, top=1.0in, bottom=1.0in]{geometry}
% including package for figures
\usepackage{float}
\usepackage[demo]{graphicx}
\usepackage{caption}
\DeclareCaptionListFormat{partfigure}{\thepart.\thefigure}
\captionsetup{listformat=partfigure}
\usepackage{subcaption}
% indent first paragraph
\usepackage{indentfirst}
% change table of contents and list of figures spacing
\usepackage{titletoc}
\setcounter{tocdepth}{2}
\titlecontents{part}[0em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{chapter}[4em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{section}[6em]{\addvspace{.1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsection}[9em]{\addvspace{.1pc}\bfseries}{\contentslabel{3em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{figure}[2.5em]{\addvspace{.1pc}\bfseries}{\contentslabel{2.5em}}{} {\titlerule*[1pc]{.}\contentspage}
% change spacing of part, chapter, section, and subsection headings
\usepackage{xcolor}
\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}[hang]{\normalfont\huge\bfseries\color{red}}{Chapter\ \thepart:}{5pt}{}
\titlespacing*{\part}{0pt}{0pt}{0pt}
\titleformat{\chapter}[hang]{\centering\normalfont\LARGE\bfseries\color{blue}}{Section\ \thechapter:}{5pt}{}
\titlespacing*{\chapter}{0pt}{12pt}{0pt}
\titleformat{\section}[hang]{\normalfont\Large\bfseries\color{black}}{\thesection}{5pt}{}
\titlespacing*{\section}{0em}{12pt}{0pt}
\titleformat{\subsection}[hang]{\normalfont\large\bfseries\color{black}}{\thesubsection}{5pt}{}
\titlespacing*{\subsection}{3em}{12pt}{0pt}
% remove new page as start of new chapter
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
% links
\usepackage[linkcolor=black, urlcolor=blue, colorlinks=true]{hyperref}
\usepackage[capitalise,noabbrev]{cleveref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End Of Preamble and start of document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\makeatletter\def\ttl@tocsep{}\makeatother
\tableofcontents
\listoffigures
\part{Title for Part \thepart\space}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\setcounter{chapter}{0}
\part{Title for Part \thepart\space}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\chapter{Title for Part \thepart\space Chapter \thechapter\space}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\begin{figure}[H]
\centering\includegraphics[width=0.5\textwidth]{demo}
\caption{Caption for Figure \thefigure\space Part \thepart\space Chapter \thechapter}
\end{figure}
\end{document}