
Я пишу свою диссертацию с классическим тезисом. Можно ли включить название главы, но только если в ней присутствуют цифры в lof?
Использование listof = chapterentry в опции KOMA также включает главы без иллюстраций, а я бы этого избегал.
Спасибо!!
МВЭ
\documentclass[10pt, a4paper, twoside, openright, titlepage, fleqn, headinclude, footinclude, BCOR5mm, numbers=noenddot, cleardoublepage=empty,
listof = withchapterentry]{scrbook}
%classic thesis template
\usepackage[eulerchapternumbers, eulermath, pdfspacing, listings, floatperchapter,parts]{classicthesis}
\begin{document}
\listoffigures
\chapter{Introduction with no Figures}
\chapter{Test Chapter with Figures}
\begin{figure}
\caption{caption text}
\end{figure}
\begin{figure}
\caption{caption text}
\end{figure}
\chapter{Test Chapter with no Figures}
\chapter{Another Test Chapter with Figures}
\begin{figure}
\caption{caption text}
\end{figure}
\end{document}
Как вы можете видеть на картинке, введение и глава первая также перечислены, но не содержат рисунков. Я бы избегал перечислять главу без рисунков.
решение1
\documentclass[10pt, a4paper, twoside, openright, titlepage, fleqn, headinclude, footinclude, BCOR5mm, numbers=noenddot, cleardoublepage=emptyast]{scrbook}
%classic thesis template
\usepackage[eulerchapternumbers, eulermath, pdfspacing, listings, floatperchapter,parts]{classicthesis}
\makeatletter
\newcommand{\chapterwithfigures}{\addxcontentsline{lof}{chapteratlist}[{\thechapter}]{\scr@ds@tocentry}}%
\makeatother
\begin{document}
\listoffigures
\chapter{Introduction with no Figures}
\chapter{Test Chapter with Figures}
\chapterwithfigures
\begin{figure}
\caption{caption text}
\end{figure}
\begin{figure}
\caption{caption text}
\end{figure}
\chapter{Test Chapter with no Figures}
\chapter{Another Test Chapter with Figures}
\chapterwithfigures
\begin{figure}
\caption{caption text}
\end{figure}
\end{document}