I'm currently trying to adjust my document to the baseline grid and for that I want to change all margins of \chapter, \section, \subsection (and floats) etc. to multiples of the \baselineskip. I found that \titlespacing can do that, but it seems to generate errors.
\documentclass[paper=a5,pagesize]{scrreprt}
\usepackage{titlesec}
\titlespacing{\section}{0em}{2\baselineskip}{\baselineskip}
\begin{document}
\section{Test} % Missing number, treated as zero. \section{Test}
% Illegal unit of measure (pt inserted). \section{Test}
Test
\end{document}
I'm not sure what's happening here. I'm also getting Non standard sectioning command \section(titlesec) detected. Using default spacing and no format. warnings for all commands which suggests the packet might be incompatible with my class.
Is there any other way to do this?
scrreprthas its own mechanisms to redefine the section commands, so usingtitlesecwith it isn't quite advisable. BTW I get no error with this code, just the warnings. – campa Oct 23 '19 at 13:38