The titletoc
package offers an easy way to configure the entries to the ToC.
\titlecontents{⟨section⟩}[⟨left⟩]{⟨above-code⟩}
{⟨numbered-entry-format⟩}{⟨numberless-entry-format⟩}
{⟨filler-page-format⟩}[⟨below-code⟩]
It is possible to add text before the section number by setting the numbered entry format. This requires enclosing the text in the number in a parbox
wide enough to include the chosen text and up to two-digit section numbers to keep the section titles aligned in the ToC.
To simplify this process we used the eqparbox
package which makes the boxes as wide as the widest member of the group (called sect
in the example).
\documentclass{article}
\usepackage{eqparbox} % make boxes as wide as the widest member of the group <<<<<<<<<
\usepackage{titletoc} % added <<<<<<<<
\titlecontents{section}
[0em]
{\vspace{.25\baselineskip}}
{\eqparbox{sect}{Some Text \thecontentslabel}\enspace}{}
{\hspace{1ex}\titlerule*[5pt]{$\cdot$}\contentspage}
\begin{document}
\tableofcontents
\section{Introduction}
\section{Example}
\end{document}
To check the code add more text and/or create a section numbered with two digits.
\documentclass{article}
\usepackage{eqparbox} % make boxes as wide as the widest member of the group <<<<<<<<<
\usepackage{titletoc} % added <<<<<<<<
\titlecontents{section}
[0em]
{\vspace{.25\baselineskip}}
{\eqparbox{sect}{Some more Text \thecontentslabel}\enspace}{}
{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
\begin{document}
\tableofcontents
\section{Introduction}
\section{Example}
\setcounter{section}{9} % to create section 10
\section{Conclusion}
\end{document}
Sometimes it is necessary to compile twice when changing the configuration.