Graphics, Figures & TablesTOC Line Break Issue

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
1ars
Posts: 1
Joined: Tue Feb 25, 2025 3:31 pm

TOC Line Break Issue

Post by 1ars »

Screenshot 2025-02-25 135410.png
Screenshot 2025-02-25 135410.png (35.05 KiB) Viewed 12791 times
Hello everyone,

I'm using the Cleanthesis template along with the scrreprt package in LaTeX to create a legal outline, and I've encountered an indentation issue. All sectioning levels are indented too far to the right. As a result, items such as (a) do not have enough space, leading to unwanted line breaks in the Table of Contents. I want to shift all levels slightly to the left so that the layout is uniform and no line breaks occur in the TOC. Since LaTeX natively supports only up to the \subparagraph level, I had to define custom commands for deeper levels, which complicates the adjustments.

Image
Current LaTeX Code (excerpt):

Code: Select all

Code, edit and compile here:
% **************************************************
% Settings for Legal Outline in LaTeX (Cleanthesis, scrreprt)
% **************************************************
% ---------------------------
% > Chapter (\chapter)
% ---------------------------
\renewcommand*{\chapterformat}{\thechapter\quad}
\renewcommand{\thechapter}{\arabic{chapter}}
% ---------------------------
% > Section (\section)
% ---------------------------
\renewcommand*{\sectionformat}{%
\usekomafont{section}{\thesection\hspace*{10pt}}%
}
\renewcommand{\thesection}{\Alph{section}.}
% ---------------------------
% > Paragraph (\paragraph)
% ---------------------------
\renewcommand*{\paragraphformat}{%
\usekomafont{paragraph}{\theparagraph\hspace*{10pt}}%
}
\renewcommand{\theparagraph}{\alph{paragraph})}
% ---------------------------
% > Custom deeper level (e.g., (a))
% ---------------------------
\newcounter{customAlpha}[customOne]
\renewcommand{\thecustomAlpha}{(\alph{customAlpha})}
\newcommand{\customsubsubsubsubsection}[1]{%
\refstepcounter{customAlpha}
\noindent\hspace{5em}% Adjust indentation
\textbf{\thecustomAlpha\ #1} \\
\addcontentsline{toc}{subparagraph}{\makebox[10em][l]{\hspace{5em}\thecustomAlpha} #1}%
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I have tried adjusting the indentation using various \hspace{} values, but all levels remain too far to the right, causing line breaks in the TOC.

Does anyone have suggestions on how to uniformly shift all levels to the left?

Thanks for your help!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
Post Reply