如何让目录位于其自己的页面上?

如何让目录位于其自己的页面上?

所以我尝试:

\documentclass[english]{article}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\usepackage{amsmath}
\usepackage{tocloft}
\usepackage{xstring}
\usepackage{titlesec}
\usepackage{tocloft}
\usepackage[unicode=true, pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
 {hyperref}

\makeatletter
\numberwithin{equation}{section}

% we use this for our refernces as well
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}

% redefinition of \equation for convenience
\let\oldequation = \equation
\let\endoldequation = \endequation
\AtBeginDocument{\let\oldlabel = \label}% \AtBeginDocument because hyperref redefines \label
\newcommand{\mynewlabel}[1]{%
  \StrBehind{#1}{eq:}[\Str]% remove "eq:" from labels
  \myequations{\Str}\oldlabel{#1}}
  \renewenvironment{equation}{%
  \oldequation
  \let\label\mynewlabel
}{\endoldequation}

\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
      \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}}
\setlength{\cftmyequationsnumwidth}{3em}

\makeatother

\begin{document}
\begin{titlepage}
\begin{flushleft}
Education Institution\\
Location
\end{flushleft}

\vspace*{3cm}
\begin{center}
\Large Centered title a little cover over the middle page
\end{center}

\vfill

\begin{flushright}
\begin{tabular}{l@{:\hspace*{\tabcolsep}}l}
Author & my \\
Respansable Teacher & my teacher \\
\end{tabular}
\end{flushright}

\end{titlepage}
\begin{tableofcontents}
\tableofcontents
\listofmyequations
\end{tableofcontents}

\section{Brushless Motor Fundamentals}
\subsubsection{DC Motor Operation}
Torque is generated in DC motors from the magnetic force,
also known as the Lorentz force, which is produced when an
electric current is passed through a coil in a magnetic field.
This force is given by \ref{eq:Force}.
\begin{equation}
  F=q[E+(v\times B)]
  \label{eq:Force}
\end{equation}
where $F$ is the force perpendicular to the coil,
$E$ is the electric field in the coil,
$v$ is the velocity of the charged particles in the coil,
and $B$ is the magnetic field. From mechanics, torque is
\begin{equation}
  \tau=F\times r
  \label{eq:Torque}
\end{equation}
\section{Brushless Motor Fundamentals 2}
\subsection{DC Motor Operation 2}
\subsubsection{DC Motor Operation 2}
\paragraph{paragraph}
If the electrical force in \ref{eq:Force} is ignored,
and the remaining magnetic force is used in \ref{eq:Torque},
with the assumption that $v$ is perpendicular to $B$, we find that
\begin{equation}
      \tau=qvBrsin\theta
  \label{eq:Magnetic}
\end{equation}

\end{document}

但是它不会将目录放在单独的页面上。那么,如果目录很长,如何才能让它放在单独的页面/页面集中呢?

答案1

尝试用分页符包围目录:

\newpage
  \tableofcontents
  \listofmyequations
\newpage

有时,还希望包含目录的页面(也称为“前言”)使用罗马数字进行页码编号,而主文档(或“主要内容”)将重置页数并使用阿拉伯数字。可以使用以下方法实现此效果\pagenumbering

\newpage
  \pagenumbering{roman}
  \tableofcontents
  \listofmyequations
\newpage
\pagenumbering{arabic}

然而,这种风格可能更适合书籍而不是文章。

答案2

\clearpage在之前插入\tableofcontents

既然您认为您需要一个单独的目录,而且似乎还需要一个单独的标题页,那么report文档类可能比更适合您的需求articlearticle适用于短篇和中篇文章,不会浪费空间。适用report于较长的文章、报告甚至短篇论文,并在不同的页面上按逻辑排版单独的元素。

相关内容