I've been using the classicthesis package for a project. It provides parts, chapters and sections for structuring the document, and a chapter beginning is supposed to be formatted like this:
In the course of working on my document, this formatting has been lost. Now \chapter{Foo} is formatted exactly like \section{Foo}.
I've narrowed the source of the error down to mypreamble.tex which I include in the main document file. Something in this section of code is causing the error:
%----------------------------------------------------------------------------------------
% PACKAGES
%----------------------------------------------------------------------------------------
\usepackage{longtable}
\usepackage{minted}
%\usepackage[backend=bibtex]{biblatex}
\usepackage{lmodern} % standard latex math font
%\usepackage{cmbright}
%\renewcommand\rmdefault{hfoldsty}
\usepackage{todonotes}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ruled,vlined, linesnumbered]{algorithm2e} % algorithms
\usepackage{scrextend} % addmargin command comes from here
\usepackage{aurical}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{amssymb}
\usepackage{colortbl}
%\usepackage{subcaption} % TODO: doesn't cooperate with subfig
\usepackage{pgfplots}
% https://tex.stackexchange.com/questions/174186/todonotes-group-list-of-todos-by-section
\usepackage{tocloft,xpatch}
%----------------------------------------------------------------------------------------
% COMMANDS
%----------------------------------------------------------------------------------------
% formatting
\newcommand{\term}[1]{\textit{#1}}
\newcommand{\algo}[1]{\textsf{#1}}
\newcommand{\TODO}[1]{\todo[size=\small, inline]{#1}}
% math
\newcommand{\set}[1]{ \{ #1 \} }
% function definition
\newcommand{\funcdef}[2]
{
\left\{
\begin{array}{ll}
#1 \\
#2
\end{array}
\right.
}
\newcommand{\nwk}{\textsf{NetworKit}\xspace}
%----------------------------------------------------------------------------------------
% ENVIRONMENTS
%----------------------------------------------------------------------------------------
\newenvironment{koan}
{\color{darkgray} \begin{addmargin}[6cm]{0cm} \begin{footnotesize}}
{\end{footnotesize} \end{addmargin} \bigskip }
%----------------------------------------------------------------------------------------
% THEOREMS
%------------------------------------------ ----------------------------------------------
\theoremstyle{definition}
\newtheorem{definition}{Definition}
%----------------------------------------------------------------------------------------
% CONFIG
%----------------------------------------------------------------------------------------
\graphicspath{ {graphics/} }
%\graphicspath{{../Graphics}}
% include needed for pseudocode includes
\input{Pseudocode/Distributed/pseudocodes_setup}
% include needed for TeX-generated plots
\input{graphics/Distributed/plots/plots_setup}
%----------------------------------------------------------------------------------------
% Colors
%----------------------------------------------------------------------------------------
\definecolor{bg}{rgb}{0.985,0.985,0.985}
\newenvironment{code}[1]
{
\begin{minted}[mathescape,
linenos,
numbersep=5pt,
frame=lines,
framesep=2mm,
fontsize=\footnotesize,
bgcolor=codebg]{#1}
}
{\end{minted}}
%----------------------------------------------------------------------------------------
% List of ToDos
%----------------------------------------------------------------------------------------
% initial definitions for storing the section info (name and number)
\def\thissectiontitle{}
\def\thissectionnumber{}
\newtoggle{noTodos}
\makeatletter
% redefinition of \@sect so \section glbally stores its name and number
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
\let\@svsec\@empty
\else
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\fi
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@
\begingroup
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M #8\@@par}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7}%
\else
\@xsect
\def\@svsechd{%
#6{\hskip #3\relax
\@svsec #8}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7}}%
\fi
\@xsect{#5}%
\ifnum#2=1\relax
\global\def\thissectiontitle{#8}
\global\def\thissectionnumber{\thesection}
\fi%
}
\pretocmd{\section}{\global\toggletrue{noTodos}}{}{}
% the \todo command does the job: the first time it is used after a \section command,
% it writes the information of the section to the list of todos
\AtBeginDocument{%
\xpretocmd{\todo}{%
\iftoggle{noTodos}{
\addtocontents{tdo}{\protect\contentsline {section}%
{\protect\numberline{\thissectionnumber}{\thissectiontitle}}{}{} }
\global\togglefalse{noTodos}
}{}
}{}{}%
}
\makeatother

classicthesis: this sounds like you could have passed thenochaptersoption to the class, or some other class option that's doing this. – Arun Debray Dec 29 '15 at 17:07nochaptersoption, but I can't identify a place where this option is passed. I certainly did not pass it on purpose. Myclassicthesis-config.texcontains the following line:\PassOptionsToPackage{eulerchapternumbers,listings,drafting, pdfspacing, subfig,beramono,eulermath,parts}{classicthesis}– clstaudt Dec 29 '15 at 17:18nochapterstoo, so it's not that; sorry I led you astray. Here is a guide to producing an MWE; in short, if you have lots of files and chapters, leave some of them out and see if the problem persists. If it does, try leaving more things out, and so on, until you have something small. – Arun Debray Dec 29 '15 at 17:34nochaptersand am pretty sure that it is not passed to theclassicthesispackage. If I do pass it, I get the same behavior: Chapters are treated as sections. I get the impression that I am somehow triggering a "bug" in the classicthesis package. – clstaudt Dec 29 '15 at 17:41nochaptersis not the issue. Without some example code, though, it'll be very hard to solve the problem. – Arun Debray Dec 29 '15 at 17:43