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 like a dot before my section-entry in the table of contents. When I apply the \setcounter{secnumdepth}{-1} line in the code below the dot also disappears.

\documentclass[11pt,landscape]{article}
\usepackage[dutch]{babel}
\usepackage{lipsum}
\usepackage{tocloft}
% \setcounter{secnumdepth}{-1}  % this line causes the trouble. removes the
                                % sectionnumber (which is good) but also removes
                                % the dot (which is not)..
\cftpagenumbersoff{section}
\renewcommand{\cftsecindent}{15mm}
\renewcommand{\cftsecaftersnumb}{$\cdot$ }
\begin{document}
\tableofcontents
\section[Welkom]{Welkom en tot ziens}
\lipsum[1]
\end{document}
share|improve this question

1 Answer 1

Redefine \cftsecfont instead of \cftsecaftersnumb.

\documentclass[11pt,landscape]{article}
\usepackage[dutch]{babel}
\usepackage{lipsum}
\usepackage{tocloft}
\setcounter{secnumdepth}{-1}
\cftpagenumbersoff{section}
\renewcommand{\cftsecindent}{15mm}
\renewcommand{\cftsecfont}{\bfseries$\cdot$~~}
\begin{document}
\tableofcontents
\section[Welkom]{Welkom en tot ziens}
\lipsum[1]
\end{document}
share|improve this answer
    
This solved my problem.. Thanx.. –  Gerco-Kees Oct 16 '12 at 7:31
    
@Gerco-Kees You're welcome -- and don't forget to upvote and accept my answer. ;-) –  lockstep Oct 16 '12 at 7:45

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.