0

I have the following MWE where I'm adjusting how my sections are rendered using the titlesec package. Based on this question, I came up with the following:

\documentclass{article}
\usepackage{titlesec}
\usepackage{titletoc}

\titlelabel{Article \thetitle: } \titlecontents {section} [0pt] % mandatory, sets left margin from left page margin {} % above code {Article \thecontentslabel} % numbered entry {} % numberless entry {\thecontentspage} % add dots here if desired, filler page format

\begin{document} \tableofcontents \clearpage

\section{Intro}
\section{General}

\end{document}

The section labels look like I expect:

enter image description here

However, the section labels in the table of contents look different:

enter image description here

I'm not sure why this happens. What am I doing wrong?

user32882
  • 1,594

1 Answers1

1

Follow the description of each argument of \titlecontents that you already have in your code as comments.

So that modifying the command such a way should do the thing

\documentclass{article}
\usepackage{titlesec}
\usepackage{titletoc}

\titlelabel{Article \thetitle: } \titlecontents {section} [0pt] % mandatory, sets left margin from left page margin {} % above code {\bf Article \thecontentslabel: } % numbered entry {} % numberless entry {} % add dots here if desired, filler page format

\begin{document} \tableofcontents \clearpage

\section{Intro}
\section{General}

\end{document}

enter image description here

antshar
  • 4,238
  • 9
  • 30