Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to move sections in my TOC more to the right =) The picture will explain all:

enter image description here

Here is my code so far (This code will give me the upper part in the picture):

\newgeometry{hmargin={3cm,3cm},vmargin={3cm,4cm}}
% SISÄLLYSLUETTELO

\setlength{\cftsecindent}{2cm}
\dottedcontents{section}[1.5em]{}{1.3em}{.6em}
\renewcommand{\contentsname}{Sisällysluettelo}

\doublespacing
\large \tableofcontents
\singlespacing

\restoregeometry 

Now even if I try to modify the length in \setlength{\cftsecindent}{2cm} the section stays where it is...any ideas why? What am I doing wrong x) Thank you for your help! =)

UPDATE =) If I remove the \dottedcontents{section}[1.5em]{}{1.3em}{.6em} from the code above, I get this:

enter image description here

Now the subsections stay where they are and section goes to bold :/

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted
\documentclass{article}
\usepackage{titletoc,tocloft}
\setlength{\cftsubsecindent}{2cm}
\setlength{\cftsubsubsecindent}{4cm}
\dottedcontents{section}[1.5em]{}{1.3em}{.6em}

\begin{document}
\tableofcontents
\section{foo}
\subsection{bar}
\subsubsection{baz}
foobar
\end{document}

enter image description here

share|improve this answer
    
+1 Thank you for your answer =) Unfortunately it doesn't help me...the section stays where it is...I noticed that If I remove the \dottedcontents I can change the indentations, but then the section goes to bold and looses the dots... :S I think your code moves subsection and subsubsection? =) Or should I replace sections in my code with subsections? =) My document structure at the moment is : PART --> SECTION --> SUBSECTION. Should it be: SECTION --> SUBSECTION --> SUBSUBSECTION? =) –  jjepsuomi Apr 30 '13 at 7:07
1  
as long as you do not provide a complete example I do not know what you really mean. –  Herbert Apr 30 '13 at 7:13
    
+1 Don't worry about it =) I got it already using your answer =) I just changed all \parts to \sections etc. and your code started to work =) Thank you for your help! =) –  jjepsuomi Apr 30 '13 at 7:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.