1

Currently I am writing a software documentation and was almost done. I was only adjusting some font settings for the sections and subsections when suddenly the compiling stopped working.

I was testing with this kind of stuff:

\titleformat*{\subsection}{\normalsize\bfseries\itshape\color{darkgray}}

Then suddenly I received these errors:

! Parameters must be numbered consecutively.

! File ended while scanning text of \errhelp.

! Missing } inserted.

The first one is referring to \usepackage[T1]{fontenc} and the last two directly to \tableofcontents

The compiling works without the table of contents perfectly. The whole document looks the way it should.

I also deleted all the "new" formatting stuff to change everything back the way it was when it lasted worked. Nothing changes.

This is a part of the current code:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{arev}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[onehalfspacing]{setspace}
\usepackage[left=3cm, right=3cm, top=3cm, bottom=3cm]{geometry}
%\usepackage{titlesec}
%\usepackage{xcolor}

%\titleformat*{\subsection}{\normalsize\bfseries\itshape\color{darkgray}}

\pagestyle{fancy}

% Kopf- und Fußzeile
\lhead{}
\chead{}
\rhead{\slshape \leftmark}
\lfoot{}
\cfoot{\thepage}
\rfoot{}

% Titel ohne Datum
\title{Software Dokumentation}
\date{}
\author{}

\begin{document}
% Titelblatt
\maketitle
\begin{figure}[h]
\begin{center}
\includegraphics[width = 4cm]{Bilder/FHWS.png}
\end{center}
\end{figure}
\begin{center}
\bfseries{Messeinrichtung zur Vermessung von Ventilfedern}
\end{center}
\begin{figure}[h]
\begin{center}
\includegraphics[width = 8cm]{Bilder/Messeinrichtung.png}
\end{center}
\end{figure}

%Inhaltsverzeichnis
\clearpage  
\tableofcontents

% Bibliothek
\newpage
\part{Bibliothek}
\section{module.py}
Die Datei „module.py“ enthält Funktionen[...]

\subsection{linearmove(vel, targ)}
Lässt die Linearachse [...]

As far as I understand it seems to have problems with the numbers in the table of contents. Though it does not make any sense to me why it worked earlier and stopped now. Especially since the rest of the document compiles (and counts the sections) perfectly.

Edit

So I just randomly deleted the .toc file I found with Texworks (usually working with TexMaker) and suddenly it started working again.

I have no idea why and if anyone could tell me I would really be interested in any explanation.

closed as unclear what you're asking by user31729, Zarko, Stefan Pinnow, Werner, Maarten Dhondt Feb 7 '17 at 6:21

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You should not use titlesec with scrartcl. You can change the font of \subsection using \setkomafont. You should also note the warning about fancyhdr usage with scrartcl. – Schweinebacke Jan 10 '17 at 14:03
  • Speculative: Adding or removing a package, that writes code to an auxiliary file, e.g. the aux-file, could result in an error message if you don't delete the auxiliary files. – Schweinebacke Jan 10 '17 at 14:06