I came back to a .tex file I haven't used in a couple of years and it no longer compiles. I've narrowed down the problem to the titlesec package (I think); if I can find out why this MWE won't compile maybe I'll find my answer:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[paper=4.25in:6.75in,pagesize=auto,fontsize=9.5pt,headings=small,BCOR=.25mm,openany,DIV=16]{scrbook}
\usepackage{blindtext}
\usepackage[compact]{titlesec}
\titlespacing{\section}{0pt}{2ex}{1ex}
\titlespacing{\subsection}{0pt}{1ex}{0ex}
\titlespacing{\subsubsection}{0pt}{0.5ex}{0ex}
\vspace{-1mm}
\begin{document}
\chapter{red}
\blindtext
\section{blue}
\blindtext
\subsection{green}
\blindtext
\subsubsection{yellow}
\end{document}
This is the error thrown:
test+001.tex:17: Missing number, treated as zero.
<to be read again>
}
1.17 \section{blue}
?
If I add these lines the tex file compiles:
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\vspace{-1mm}supposed to do in the preamble? – egreg Aug 14 '17 at 09:57titlesecwith thekoma-scriptclasses isn't recommended. – Bernard Aug 14 '17 at 10:09\RedeclareSectionCommandinstead oftitlesecto change spacing of the headings. – Schweinebacke Aug 14 '17 at 17:29