报告类:在图表列表和表格列表中添加文字、图片和页面

报告类:在图表列表和表格列表中添加文字、图片和页面

我找到了一个适用book class于 [将文字、图形和页面添加到图形列表中]的解决方案1.不幸的是,当我更改\documentclass[12pt,letterpaper,oneside]{book}代码时\documentclass[a4paper,12pt]{extreport}出现了错误。

我想要的是

  1. 我想在不带下划线的中添加单词figure和。pagelist of figuresreport class
  2. 我想在相同的位置添加单词table和,但不添加下划线。pagelist of tablesreport class
%\documentclass[12pt,letterpaper,oneside]{book}
\documentclass[a4paper,12pt]{extreport}
\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} 

我得到了另一个example,但没有图表和表格的列标题。

\documentclass[a4paper,12pt]{extreport}
\usepackage{mwe}
\usepackage{tikz}
\begin{document}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \begin{center}
        {%
            \let\oldnumberline\numberline%
            \renewcommand{\numberline}{\tablename~\oldnumberline}%
            \listoftables%
        }
    \end{center}
    \addcontentsline{toc}{chapter}{List of Tables}% add "list of table" to table of content
    %%%\addtocontents{lot}{\textbf{Table Name}~\vfill\textbf{Page}\par}% put "page" on rigt top of the first page "List of Tables"
    %\newpage
    \begin{center}
        {%
            \let\oldnumberline\numberline%
            \renewcommand{\numberline}{\figurename~\oldnumberline}%
            \listoffigures%
        }
    \end{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \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} 

答案1

您遇到的唯一错误是命令\frontmatter\mainmatter未在报告类中定义。您的文档中是否有任何不需要编号的前言章节(例如摘要、献词和致谢)?如果没有,您只需删除命令\frontmatter和即可\mainmatter。如果您不想要下划线,只需将替换{~\ul{Figure}}{~Figure}和替换{\ul{Page}}{Page}。对表格和页面命令执行相同操作。

%\documentclass[12pt,letterpaper,oneside]{book}
\documentclass[a4paper,12pt]{extreport}
\usepackage{soul}
\usepackage{afterpage}
\usepackage{mwe}
\usepackage{tikz}
\begin{document}
    \listoffigures
    \addtocontents{lof}{{~Figure}~\hfill{Page}\par}
    \makeatletter
    \addtocontents{lof}{\protect\afterpage{\protect\hbox to \linewidth%
            {{~Figure}~\hfill{Page}}\par%
            \protect\addvspace{10\p@}}}
    \makeatother
    \listoftables
    \addtocontents{lot}{{~Table}~\hfill{Page}\par}
    \makeatletter
    \addtocontents{lot}{\protect\afterpage{\protect\hbox to \linewidth%
            {{~Table}~\hfill{Page}}\par%
            \protect\addvspace{10\p@}}}
    \makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add some dummy list entries %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \setcounter{figure}{1}
    \setcounter{table}{1}
    \loop
    \addcontentsline{lof}{figure}{\protect\numberline{\thefigure}{\ignorespaces dummy figure}}%
    \stepcounter{figure}%
    \ifnum\value{figure}<51 
    \repeat
    \loop
    \addcontentsline{lot}{table}{\protect\numberline{\thetable}{\ignorespaces dummy table}}%
    \stepcounter{table}%
    \ifnum\value{table}<51 
    \repeat
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% start the main contents %
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{one}
\end{document}

在此处输入图片描述 在此处输入图片描述

相关内容