# Change format of the contents page

I want to label some of my sections listed in my contents page as 'Introductory'.

I thought I could achieve this by having a dotted box around these chapters in the contents page that marks them as introductory, though I am open to other suggestions.

Have you any suggestions as to how I can edit my contents page to accommodate this?

-

## Code

\documentclass{article}
\usepackage{etoolbox}

\makeatletter
\newcounter{introsection}
\newcommand*{\introsectionmark}[1]{}
\renewcommand \theintrosection {\@arabic\c@section}
\newcommand\introsection{%
\@start@introsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}
}
\let\@start@introsection\@startsection
\patchcmd{\@start@introsection}{\@sect}{\@introsect}{}{}
\def\intronumberline#1{\hspace*{-3.5pt}\numberline{\fbox{#1}}\hspace*{2.5pt}}
\let\@introsect\@sect
%\patchcmd{\@introsect}{\numberline}{\intronumberline}{}{}
\def\intromatter{\let\section\introsection}
\def\mainmatter{\let\section\ltx@section}
\let\ltx@section\section
\makeatother

\begin{document}
\tableofcontents
\introsection{One}
\introsection{Two}
\section{Three}
\section{Four}
\end{document}


## Remark

This solution provides a sectioning command \introsection that can be used as usual, but adds a framebox around its toc entry. Alternatively you can have the box only around the section number by using line 21 instead of 20.

If you are using the article class you can also use the above defined macros \intromatter and \mainmatter which are meant to be used like the similar and anologous ones of the book class:

\begin{document}
\tableofcontents
\intromatter
\section{One}
\section{Two}
\mainmatter
\section{Three}
\section{Four}
\end{document}


## Output

You can of course use another styling of frame by replacing \fbox with another macro that fulfills your needs.