合并页面

合并页面

我试图将 \listoftables 命令(定义如下)的内容放在与 \listoffigures 命令(也定义如下)的最后一页相同的页面上。换句话说,我不想在两个命令之间出现换页或页面跳跃。这是别人的模板,我并不完全理解它——我尝试删除 \listoffigures 和 \listoftables 命令之间的 \newpage,但它无法编译。

\newcommand\listoffigures{%
    \@chapteronefalse
    \if@arabic\relax\else\renewcommand{\thepage}{\roman{page}}\fi
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapteruaf*{\listfigurename
      \@mkboth{\uppercase{\listfigurename}}%
              {\uppercase{\listfigurename}}}%
    \@chapteronetrue
    %% get this in contents as a section
    \addcontentsline{toc}{frontchapter}{\listfigurename}
    %\cftafterloftitle
    \@starttoc{lof}%
    \if@restonecol\twocolumn\fi
    %\newpage\renewcommand{\thepage}{\arabic{page}}}
    \renewcommand{\thepage}{\arabic{page}}}

\newcommand\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\newcommand\listoftables{%
    \@chapteronefalse
    \if@arabic\relax\else\renewcommand{\thepage}{\roman{page}}\fi
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapteruaf*{\listtablename
      \@mkboth{\uppercase{\listtablename}}{\uppercase{\listtablename}}}%
    %% get this in contents as a section
    \@chapteronetrue
    \addcontentsline{toc}{frontchapter}{\listtablename}
    %\cftafterloftitle
    \@starttoc{lot}%
    \if@restonecol\twocolumn\fi
    \newpage\renewcommand{\thepage}{\arabic{page}}}
\let\l@table\l@figure

相关内容