TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm happily using this solution I asked for few days ago: Two independent TOCs

Now a follow-up question appeared: My second TOC contains only \subsubsection and deeper nested elements till \subparagraph because of some structure I want to acchieve in my TOC and PDF-Bookmarks. I modified the appearance of those elements to match my desired layout with \renewcommand\thesubsection{\Alph{subsection}}.

So my question is how to tweak the layout of my second TOC. It looks like sections and subsections, but it doesn't behave this way in the second TOC. I want to get rid of those indentions, the second TOC should start on the left side (MWE below):

example of second TOC with heavy indentions

The first TOC should not be affected by those settings.

My last attempt was to use \renewcommand*\l@subsubsection{\bprot@dottedtocline{1}{1.5em}{2.3em}} after the \printcontents[sections]{ }{2}{} to set the subsubsection with the values of the section, but this had no effect at all.

Here is my (not so minimal) working example demonstrating the behaviour. I left some comments in it to show different approches I tried, but without success.

Thank you very much.


\usepackage[babel,german=quotes]{csquotes}  %% deutsche Anfuehrungsstriche

\usepackage[titles]{tocloft}  %% Einrückungen beim Appendix im Titel

\usepackage{titletoc}  %% zwei Inhaltsverzeichnisse

\titlespacing{\paragraph}{0mm}{15pt}{3pt}  %% 30pt

%%    {\titlerule*[0.3pc]{.}\contentspage}

%% http://www.latex-community.org/forum/viewtopic.php?f=5&t=1383
    {-3.25ex\@plus -1ex \@minus -.2ex}%
    {1.5ex \@plus .2ex}%

\renewcommand{\figurename}{\textbf{Abb.}}   %% ersetzt Abbildung durch Abb.

%%%%%%%%%%%% hyperref und pdf-Einstellungen Start %%%%%%%%%%%%
        %%pdfproducer=meinproducer,%   %% ersetzt pdfTeX-Versions-Info
        %%%pdfborder={0 0 0},%
        pdfborderstyle={/S/U/W 1},%   %% setzt Unterstrich mit Dicke 1pt
        colorlinks=true,%   %% false

%% farbige Links im PDF mit Unterstreichung
%% von http://tex.stackexchange.com/questions/26071/how-can-i-have-colored-and-underlined-links-with-hyperref
    \def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true
    \def\@pdfborderstyle{/S/U/W 1}% Overrides border style set with colorlinks=true
                                                                % Hyperlink border style will be underline of width 1pt

\usepackage[all]{hypcap}  %% fixt Link zum Start einer Grafik, nicht zur darunterliegenden Caption
%%%%%%%%%%%% hyperref und pdf-Einstellungen Ende %%%%%%%%%%%%

%% more space for roman numbers in TOC
%% http://www.komascript.de/node/608

%% for appendix 
%%  \pagenumbering{Roman}%
%%  \addtocontents{toc}{\protect\renewcommand*{\protect\@pnumwidth}{2em}}%


My document.

\pdfbookmark[1]{~~~~My TOC}{toc}

\printcontents{ }{1}{}


\section{first section}
foo bar
\subsection{first subsection}
foo bar
\section{last section before appendix}
foo bar
\subsection{some subsection}
foo bar
\subsection{some subsection}
voo bar


\subsection{and just another subsection}

\subsection{and another subsection}



Here is all the sourcecode.
\printcontents[sections]{ }{2}{}

%% see http://tex.stackexchange.com/questions/33841/how-to-modify-the-indentation-before-sectioning-titles-in-the-table-of-contents
\renewcommand*\l@subsubsection{\bprot@dottedtocline{1}{1.5em}{2.3em}}  %% values of section
\renewcommand*\l@paragraph{\bprot@dottedtocline{2}{1.5em}{2.3em}}      %% old values: 3.8em   3.2em     %% values of subsection
\renewcommand*\l@subparagraph{\bprot@dottedtocline{3}{7.0em}{4.1em}}   %% values of subsubsection

%% needs tocloft, there is no difference with these lines
%%\setlength{\cftparaindent}{1.3em}  %% 2.4 cm versetzt den gesamten TOC-Eintrag (Kapitelnummer und Titel) nach links oder rechts
%%\setlength{\cftparanumwidth}{0.5cm} %% Breite der Zahl vor dem Titel
%%\setlength{\cftbeforeparaskip}{-2cm}   %% zieht das TOC insgesamt nach oben



\paragraph{create some tables}
a lot of code



\subsection{some more}

    \renewcommand*\section{\subsection}  %% changing for the dynamic created 

\subsection{last subsection}

share|improve this question
up vote 5 down vote accepted

Moving the redefinition to before \printcontents[sections]{ }{2}{} works for me.

share|improve this answer
Thanks, you are right! – S.H. Mar 23 '12 at 14:57

Your Answer


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.