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.
\chapter{C}
\section{S}
\subsection{SS1}
\subsection{SS2}
\addcontentsline{toc}{subsection}{AddedSS}

results in

1  C ................... 1
   1.1 S ............... 1
       1.1.1 SS1 ....... 1
       1.1.1 SS2 ....... 1
       AddedSS ......... 1

But I would like to get added manually subsection AddedSS to be indented to subsection names, like this :

1  C ................... 1
   1.1 S ............... 1
       1.1.1 SS1 ....... 1
       1.1.1 SS2 ....... 1
             AddedSS ... 1

How to achieve this to added manually subsection?

share|improve this question

1 Answer 1

up vote 5 down vote accepted
\documentclass{book}
\begin{document}
\tableofcontents
\chapter{C} \section{S} \subsection{SS1} \subsection{SS2}
\addcontentsline{toc}{subsection}{\protect\numberline{}AddedSS}
\end{document}
share|improve this answer
    
Great ! It works ! How did you know it ? I tried texdef -t latex -f \subsection, but the only thing I've found : \long macro:->\@startsection {subsection}{2}{\z@ }{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont \large \bfseries } what told me nothing. –  Grzegorz Wierzowiecki Feb 7 '12 at 11:50
1  
Well how I learned it is lost in the depth of time. But the obvious location to see how numbers are formatted is the toc-file. –  Ulrike Fischer Feb 7 '12 at 12:01
    
Thanks for help - learning never ends :). –  Grzegorz Wierzowiecki Feb 7 '12 at 20:33

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.