Is it possible to have a section-wise Table of Contents in the article class?

## marked as duplicate by Werner, user13907, user31729, ChrisS, moeweApr 25 '15 at 6:58

• Welcome to TeX.SX! Yes, this is possible. For example with minitoc or with the newer package etoc. But please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document} (in future ;-). – user31729 Apr 25 '15 at 4:47

The easiest way seems to be etoc by your fellow user [tag:jfbu] here, just using the \localtableofcontents where appropiate

\documentclass{article}

\usepackage{etoc}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\clearpage
\section{One}
\localtableofcontents

\subsection{First}
\blindtext
\clearpage
\section{Two}
\localtableofcontents

\clearpage
\subsection{First}
\end{document}


I resolved this query by a bit of search on the forum.

Using package,

\usepackage{titletoc}


with command,

\newcommand\MiniToC{%
\setcounter{tocdepth}{2}
\startcontents
\printcontents{}{1}{\section*{\contentsname}\vskip-3.5ex\hrulefill\vskip1ex}
\vskip-0.5ex\noindent\hrulefill
\setcounter{tocdepth}{0}
}
\setcounter{tocdepth}{0}


helps me with what I want.