Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

So I try:

\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}

But it does not make TOC on its own page. So how to make it so that it would be on its own page/set of pages if it is long?

share|improve this question
1  
There is no tableofcontents environment. Either place \newpage before and after it to force the page break or maybe change that environment to {minipage}{\textwidth}. –  Martin Scharrer May 10 '11 at 15:17
    
The environment tableofcontents doesn't exist. You should remove it from the code. The reason why \begin{tableofcontents}\end{tableofcontents} works is due to how environments are implemented in LaTeX. –  Andrey Vihrov May 10 '11 at 15:19
    
You might be also interested in reading this question: meta.tex.stackexchange.com/questions/228/… –  Andrey Vihrov May 10 '11 at 15:21

2 Answers 2

up vote 6 down vote accepted

Try surrounding the table of contents with page breaks:

\newpage
  \tableofcontents
  \listofmyequations
\newpage

Sometimes, it is also expected that pages containing the table of contents (also called the "front matter") will use Roman numerals for page numbering and that the main document (or "main matter") will reset the page count and use Arabic numerals. This effect can be achieved using \pagenumbering:

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

However, this style may be more appropriate for a book than an article.

share|improve this answer
2  
+1 on the newpage, -1 on the tableofcontents which doesn't exists. Note that \begin{foo} executes \foo internally (and \end{foo} executes \endfoo), so that code would insert the ToC twice. –  Martin Scharrer May 10 '11 at 15:19
    
@Martin Very correct, was just blindly copying what seemed like the appropriate section out of the example. –  Sharpie May 10 '11 at 15:29

Insert a \clearpage before \tableofcontents.

Since you've thought you want a separate ToC and, it seems, also a separate title page, the report document class may better suit your needs than article. article is meant for short and medium size articles and doesn't waste space. report is meant for longer articles, reports and even short theses, and typesets logically separate elements on distinct pages.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.