The solution of LOF+LOT+BIB in TOC with numbered chapter does not work in my case.

Admittedly I used a template of some other person - when I produce a Pdf with his code all above mentioned sections are numbered. However, when I produce the Pdf of my code, these sections remain unnumbered - which is undesired. Can anybody help me on, please? I suspect to depends on some counterproductive usepackage

Here is the code:



\lstset{basicstyle=\footnotesize, captionpos=b, breaklines=true, showstringspaces=false, tabsize=2, frame=lines, numbers=left, numberstyle=\tiny, xleftmargin=3em, framexleftmargin=3.0em}
\def\l@lstlisting#1#2{\@dottedtocline{1}{0em}{1em}{\hspace{2,0em} Lst. #1}{#2}}

\geometry{a4paper, top=28mm, left=31mm, right=28mm, bottom=26mm, headsep=4mm, footskip=4mm}


\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\renewcommand{\contentsname}{II Contents}


\noindent\section{List of Acronyms}
\acro{CEO}{Chief Executive Officer}     

\renewcommand\refname{0. Introduction}
\section{{\Large Introduction}}
\addcontentsline{toc}{section}{0. Introduction}

Lorem ipsum...

\renewcommand\refname{Chapter 1}
\section*{{\Large Chapter 1}}
\markright{Chapter 1}
\addcontentsline{toc}{section}{Chapter 1}

Lorem Ipsum again

  • 1
    Hi and welcome, using templates or files by another file is discouraged (should be punished i think). You are loading several packages, that destroy KOMAs work. For example package tocloft. Package titlesec also whacks down KOMA internals. There are some more oddities. – Johannes_B Feb 16 '15 at 19:40
  • Rule of thumb, load as many packages as needed but as few as possible. I bet of all the packages loaded you are actually using 5, the rest is just junk messing about. – Johannes_B Feb 16 '15 at 19:41
  • Hi Johannes, thanks for replying. It truly happens that I need all of these packages. And the mixture of KOMA, tocloft and titlesec is being adapted from the template. As numbering works for the template it still does not explain, why it doesn't for my coding. If have any other advice, I'd be grateful. – Petra Feb 16 '15 at 21:36
  • 1
    You just deleted the working part!! – Johannes_B Feb 22 '15 at 18:44
  • 1
    @Petra You can now talk in the chat, it would be easier to discuss it there: chat.stackexchange.com/rooms/41/tex-latex-and-friends – yo' Feb 26 '15 at 22:08

The packages tocbibind, tocloft, titlesec and fancyhdr are not recommended with a KOMA class. They offer capabilities that the standard classes miss. KOMA-script provides the capabilities, but they are overrun by the aforementioned packages. Not using them is the solution.

It was stated, that the above code was found in a template. The code does so many many strange things, that i can't advice anybody to use it.
Be careful, many templates are bad.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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