# \addcontentsline is causing indents in TOC

I am generating a document with multiple custom tables and sections that don't follow standard numbering and am using \addcontentsline to place them in the TOC as below.

\documentclass[12pt]{report}

\pagenumbering{roman}

\begin{document}
%begin revision history
\begin{raggedright}
{\bf\LARGE{REVISION HISTORY}}\\
\rule{\linewidth}{0.5pt}\\
Add Revision History. If initial release, delete page.\\
%end revision history
\bigskip %replace \newpage for code snippet
\rule{\linewidth}{0.5pt}\\
\end{raggedright}
\begin{center}
\makeatletter
\makeatother
\end{center}
\bigskip %replace \newpage for code snippet
%begin list of figures
\begin{raggedright}
{\bf\LARGE{LIST OF FIGURES}}\\
\rule{\linewidth}{0.5pt}\\
Add List of Figures. If not utilized, delete page.
\end{raggedright}
\end{document}


The code above produces a table of contents with the first item as I would expect and the next two indented, even though they are the same depth.

Why are second and third lines of the TOC indented and how do I fix that?

• Is there a reason you're not just using \section{REVISION HISTORY}? Custom tables and section numbering aren't too hard to fix. May 13 '20 at 15:46
• you are missing the chapter entry. Why are you using the report class and then only sections? May 13 '20 at 15:56
• @UlrikeFischer I'm pretty new to LaTeX, but report had templating that matched closest with the MSWord template I'm imitating. I guess I can go back to article and try to reformat there. I'll also try swapping to chapters and see how that goes.
– Matt
May 13 '20 at 16:05
• @Teepeemm my actual document has a mix of numbered and unnumbered sections, so I would be using \section* and then still have to use \addcontentsline.
– Matt
May 13 '20 at 16:05
• Don't use \bf which was deprecated over 25 years ago. Use either {\bfseries text} or \textbf{<text>}. May 13 '20 at 16:43