我每一章都有几张图片,我需要根据章节为每张图片指定一个图号,并且它必须自动反映在图片列表部分中。我该怎么做?请帮忙!
答案1
\documentclass{book}
\begin{document}
\tableofcontents
\listoffigures
\chapter{First}
\begin{figure}
\caption{First figure from chapter \thechapter}
\caption{Second figure from chapter \thechapter}
\end{figure}
\chapter{Second Chapter}
\begin{figure}
\caption{First figure from chapter \thechapter}
\caption{Second figure from chapter \thechapter}
\end{figure}
\end{document}