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.

In Koma-Script I use \addsec{.} to add section without numbers. However, with respect to my ToC this gives undesirable results, as the unnumbered section-title is aligned with the beginning of the ToC line. How do I make unnumbered section aligned with numbered section in the ToC?

\documentclass{scrartcl}
\usepackage{tocstyle}
\usetocstyle{nopagecolumn}
\selecttocstyleoption{tocflat}

\begin{document}

\tableofcontents{}
\hrulefill
\section{First section}

\section{Second section}

\subsection{A subsection}

\addsec{A section which should not have a number}
\end{document}

output

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

Add the tocstyle package option toctextentriesindented.

\documentclass{scrartcl}
\usepackage[toctextentriesindented]{tocstyle}
\usetocstyle{nopagecolumn}
\selecttocstyleoption{tocflat}

\begin{document}

\tableofcontents{}
\hrulefill
\section{First section}

\section{Second section}

\subsection{A subsection}

\addsec{A section which should not have a number}
\end{document}

enter image description here

share|improve this answer
    
Thanks. Sorry about not reading the manual properly. –  Rasmus Mar 10 '12 at 14:15
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.