3

I'd like to figure out how to indent Chapters in my TOC past the Parts headings. I'd like to do this to improve legibility. This is how my document is laid out in main.tex

\documentclass[oneside,11pt,a4paper,bibtotoc,idxtotoc,headsepline,footsepline,footexclude,BCOR12mm,DIV13]{scrbook}

% include title and author information for the cover
\input{components/info}

% include settings
\input{components/settings}

% include commands
\input{components/commands}

\makeglossaries

\begin{document}

    \frontmatter

    \input{components/titlepage}

    \input{components/disclaimer}

    \input{components/acknowledgements}

    \input{components/abstract}

    \tableofcontents

    \mainmatter

        \part[Introduction and Requirements Gathering]{Introduction and Requirements Gathering}
        \label{part:introAndRequirementsGathering}

        \input{chapters/Introduction}
        \input{chapters/PartsTraceabilityProcess}
        \input{chapters/ProblemStatement}
        \input{chapters/ITInfrastructure}

        \part[Target Concept]{Target Concept}
        \label{part:targetConcept}
        \input{chapters/DataModelDesign}
        \input{chapters/PotentialSolutionsAndComparison}
        \input{chapters/RecommendedSolution}

        \part*{Appendix}
        \addcontentsline{toc}{part}{Appendix}

        \appendix %---------------------------------------

        \input{chapters/CodeAppendix}
        \input{chapters/HadoopPlatformAppendix}

  \clearemptydoublepage

\nocite{*}

\printglossaries

\bibliography{bibliography/literature}

\end{document}

My setting.tex file includes the following:

% Included by MAIN.TEX

\renewcommand{\sectfont}{\normalfont \bfseries}        % Schriftart der Kopfzeile

% manipulate footer
\usepackage{scrpage2}
\pagestyle{scrheadings}
\ifoot[\footertext]{\footertext} % \footertext set in INFO.TEX
%\setkomafont{pagehead}{\normalfont\rmfamily}
\setkomafont{pagenumber}{\normalfont\rmfamily}

%% allow sophisticated control structures
\usepackage{ifthen}

% use Palatino as default font
\usepackage{palatino}

% enable special PostScript fonts
\usepackage{pifont}

% make thumbnails
\usepackage{thumbpdf}

\usepackage{caption}
\usepackage{subcaption}

% make algorithms
\usepackage[ruled,vlined]{algorithm2e}

% insert code snippets
\usepackage{listings}

% create glossaries
\usepackage[nomain,acronym,xindy,toc]{glossaries}

\renewcommand{\lstlistingname}{Code Snippet}% Listing -> Code Snippet

\usepackage{colortbl}

%% use better tabular package
\usepackage{tabularx}

% for drawing trees
\usepackage{qtree}

% for making single pages landscape
\usepackage{lscape}

% Include the listings-package
\usepackage{listings}
\lstset{breaklines=true,basicstyle={\footnotesize},showstringspaces=false,captionpos=b,frame=single}

\usepackage{multirow}

%% use colors
\usepackage{color}

%% make fancy math
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{yhmath} % fr die adots 

%% create an index
\usepackage{makeidx}

% for the program environment
\usepackage{float}

%% load german babel package for german abstract
\usepackage[german,english]{babel}
\selectlanguage{english}

% use german characters as well
\usepackage[latin1]{inputenc}       % allow Latin1 characters

\usepackage{styles/shortoverview}

%----------------------------------------------------
%      Graphics and Hyperlinks
%----------------------------------------------------

%% check for pdfTeX
\ifx\pdftexversion\undefined
 %% use PostScript graphics
 \usepackage[demo]{graphicx}
 \usepackage[dvips]{graphicx}

 \DeclareGraphicsExtensions{.eps,.epsi}
 \graphicspath{{figures/}{figures/review}} 
 %% allow rotations
 \usepackage{rotating}
 %% use hypertex version of hyperref
 \usepackage[hypertex,hyperindex=false,colorlinks=false]{hyperref}
\else %% reduce output size \pdfcompresslevel=9

 \usepackage[pdftex]{graphicx}
 \DeclareGraphicsExtensions{.jpg,.JPG,.png,.pdf,.eps}
 \graphicspath{{figures/}} 

 %% Load float package, for enabling floating extensions
 \usepackage{float}

 %% allow rotations
 \usepackage{rotating}
 %% use pdftex version of hyperref
 \usepackage[pdftex,colorlinks=true,linkcolor=black,citecolor=black,%
 anchorcolor=black,urlcolor=black,bookmarks=true,%
 bookmarksopen=true,bookmarksopenlevel=0,plainpages=false%
 bookmarksnumbered=true,hyperindex=false,pdfstartview=%
 ]{hyperref}
\fi

\usepackage{setspace}
\doublespacing
%\onehalfspacing

% Use for building tree structures
\usepackage{tikz}
\usetikzlibrary{matrix,shapes,arrows}
\usepackage{tikz-dependency}
\usepackage[export]{adjustbox}

\tikzstyle{cloud} = [draw, ellipse,fill=blue!20, node distance=3cm,minimum height=2em]
\tikzstyle{line} = [draw, -latex']

%% Fancy chapters
\usepackage[Lenny]{fncychap}

% set the bibliography style
\bibliographystyle{plain}

I'm sorry for probably including too much information. I'm new to LaTeX and I'm working with a template from the department, so I'm not sure which information is relevant and which is not.

I read these StackExchange questions to find a solution to my problem but they don't seem to address my need:
Indent chapter titles in memoir
How to indent chapter headings in a TOC (memoir class)
Apply ToC part indenting to chapter

This should show the final result I'm looking for. whereToIndent

Your help is appreciated, please let me know if you need any other information.

1 Answer 1

2

With a KOMA-Script class you can redefine \addchaptertocentry to indent only the numbered chapters in TOC.

\documentclass[
  oneside,
  bibliography=totoc,% <- changed
  index=totoc,% <- changed
  headsepline,footsepline,
  footinclude=false,% <- changed
  BCOR=12mm,% <- changed
  DIV=13,% <- changed
]{scrbook}

\addtokomafont{disposition}{\rmfamily}

\RedeclareSectionCommand[tocnumwidth=3.5em]{chapter}
\renewcommand\addchaptertocentry[2]{%
  \ifstr{#1}{}{%
    \addtocentrydefault{chapter}{#1}{#2}%
  }{%
    \addtocentrydefault{chapter}{\hspace*{2em}#1}{#2}%
}}

\begin{document}
\frontmatter
\tableofcontents
\chapter{Acknowlodgements}
\chapter{Abstract}
\mainmatter
\part[Introduction and Requirements Gathering]{Introduction and Requirements Gathering}
\chapter{Chapter One}
\KOMAScriptVersion
\chapter{Chapter Two}
\end{document}

Result:

enter image description here

1
  • Exactly what I was looking for!
    – kfkhalili
    Mar 22, 2016 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .