将单词、图片和页面添加到图片列表中

将单词、图片和页面添加到图片列表中

这也适用于目录和表格列表,并且与在目录中的页码上方添加“页面”但是,当在跨越多页的图表列表顶部添加单词“图形”和“页面”时,添加的内容在第一页上的排版与在第二页上的排版不同。

这里我使用\addtocontents{lof}{{~\ul{Figure}}~\hfill{\ul{Page}}\par}以下内容\listoffigures将其添加到第一页,并\addtocontents{lof}{\protect\afterpage{{~\ul{Figure}}~\hfill{\ul{Page}}\par}}使用图 2.8 和 2.9 之间将其添加到第二页的顶部。

我很喜欢第一页的显示效果,间距看起来不错。我不明白为什么第二页的显示效果不同。我也明白,在我的代码中\noindent,在前面加上~“Figure”一词可能更合适。问题是为什么会出现不同的行为?我该如何做才能使文本在每一页上都显示相同。有什么想法吗?我花了相当多的时间,但无法找到解决方案。

\documentclass[12pt,letterpaper,oneside]{book}
\usepackage{soul}
\usepackage{afterpage}
\usepackage{mwe}
\usepackage{tikz}
\begin{document}
\frontmatter
\listoffigures
\addtocontents{lof}{{~\ul{Figure}}~\hfill{\ul{Page}}\par}
\mainmatter
\chapter{one}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\chapter{one}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\addtocontents{lof}{\protect\afterpage{{~\ul{Figure}}~\hfill{\ul{Page}}\par}}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\end{document}

答案1

更换线路

\addtocontents{lof}{\protect\afterpage{{~\ul{Figure}}~\hfill{\ul{Page}}\par}}

\makeatletter
\addtocontents{lof}{\protect\afterpage{\protect\hbox to \linewidth%
                    {{~\ul{Figure}}~\hfill{\ul{Page}}}\par%
                    \protect\addvspace{10\p@}}}
\makeatother

请注意,由于您使用的是afterpage,因此您无需猜测将这些行放在哪里。您可以将它们放在

\addtocontents{lof}{{~\ul{Figure}}~\hfill{\ul{Page}}\par}

梅威瑟:

\documentclass[12pt,letterpaper,oneside]{book}
\usepackage{soul}
\usepackage{afterpage}
\usepackage{mwe}
\usepackage{tikz}
\begin{document}
\frontmatter
\listoffigures
\addtocontents{lof}{{~\ul{Figure}}~\hfill{\ul{Page}}\par}
\makeatletter
\addtocontents{lof}{\protect\afterpage{\protect\hbox to \linewidth%
                    {{~\ul{Figure}}~\hfill{\ul{Page}}}\par%
                    \protect\addvspace{10\p@}}}
\makeatother
\mainmatter
\chapter{one}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\chapter{one}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{dummy figure}
\end{figure}
\end{document} 

输出:

在此处输入图片描述

相关内容