0

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?

sollniss
  • 155
  • The KOMA class scrreprt has its own mechanisms to redefine the section commands, so using titlesec with it isn't quite advisable. BTW I get no error with this code, just the warnings. – campa Oct 23 '19 at 13:38
  • Yea sorry, I found my answer: https://tex.stackexchange.com/questions/398652/adding-space-around-section-title-for-in-register-in-koma-script-context/484928 – sollniss Oct 23 '19 at 13:40
  • @sollniss So this question is a duplicate of the linked one and can be closed? – esdd Oct 23 '19 at 16:57
  • @esdd Yes [comment too short] – sollniss Oct 23 '19 at 17:07

0 Answers0