titlesec’s update 2.10.2 → 2.11 caused subparagraphs not working in scrbook+classicthesis

You could use \RedeclareSectionCommands{subparagraph} after \usepackage{classicthesis}:

\documentclass{scrbook}
\usepackage{classicthesis}
\RedeclareSectionCommands{subparagraph}

\usepackage{blindtext}
\begin{document}
\Blinddocument
\subparagraph{Test} Test.
\end{document}

enter image description here

Or you could use \titleformat and titlespacing provided by package titlesec:

\documentclass{scrbook}
\usepackage{classicthesis}
\titleformat{\subparagraph}[runin]
    {\usekomafont{disposition}}{\thesubparagraph}{1ex}{}
\makeatletter
\titlespacing{\subparagraph}{\scr@parindent}{3.25ex plus 1ex minus .2ex}{1em}
\makeatother

\usepackage{blindtext}
\begin{document}
\Blinddocument
\subparagraph{Test} Test.
\end{document}

Starting with KOMA-Script 3.27.3175 (prerelaese of version 3.27) you can load package scrhack with the new option standardsections. Prereleases are available from the KOMA-Script website.

\documentclass{scrbook}[2019/07/23]
\usepackage[standardsections]{scrhack}% needs at least version 3.27.3175
\usepackage{classicthesis}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\subparagraph{Test} Test. \KOMAScriptVersion
\end{document}

enter image description here


Additional remarks regarding the next KOMA-Script version (3.27):

Note that the titlesec workaround will be removed from the code of the KOMA-Script classes in their next version (version 3.27), see https://sourceforge.net/p/koma-script/code/3173/ and Geplante Änderungen in zukünftigen KOMA-Script-Versionen (German).

The suggestions above still work with prerelease 3.27.3175, but the usage of KOMA-Script classes together with titlesec can also result in error messages similar to the messages in your question.

Starting with prerelease version 3.27.3175 package scrhack provides option standardsections. With \usepackage[standardsections]{scrhack} the sectioning commands will be redefined using the same definitions as in the standard classes. Note that this also disables some KOMA-Script commands and features, eg. \RedeclareSectionCommand etc., \sectionformat etc. and option headings.

enter image description here


After Javier Bezos’s comment I managed to make a dirty hack, yet working as a quick fix to remove the error:

\documentclass{scrbook}

% From ‘scrkernel-miscellaneous.dtx’:
\makeatletter
\AfterPackage{titlesec}{%
% Hack getestet mit \textsf{titlesec} 2011/12/15 v2.10.0 bis 2017/07/16% Hack getestet mit \textsf{titlesec} 2011/12/15 v2.10.0 bis 2016/03/21
% v2.11. Daher bis zu diesem Datum freigeschaltet.% v2.10.2. Daher bis zu diesem Datum freigeschaltet.
%   \changes{v3.20}{2016/03/22}{\textsf{titlesec}-Hack auch für Version
%     2016/03/15}^^A
%   \changes{v3.20}{2016/03/24}{\textsf{titlesec}-Hack auch für Version
%     2016/03/21}^^A
%   \changes{v3.20}{2019/07/23}{\textsf{titlesec}-Hack auch für Version%%
%     2019/03/16}^^A%%
%    \begin{macrocode}
  \@ifpackagelater{titlesec}{2019/07/17}{%\@ifpackagelater{titlesec}{2016/03/22}{%
    \ClassInfo{\KOMAClassName}{%
      Manual hack for https://tex.stackexchange.com/q/500970 problem has failed:\MessageBreak%%
      Deactivating the `titlesec' workaround,\MessageBreak
      because package is newer than expected%
    }%
  }{%
    \ClassWarning{\KOMAClassName}{%
      Manual hack for https://tex.stackexchange.com/q/500970 problem:\MessageBreak%%
      Activating an ugly workaround for a missing\MessageBreak
      feature of package `titlesec`%
    }%
    \def\scr@ttl@@extract#1\scr@startsection#2#3#4#5#6#7#8{%
      \@tempskipa=#5
      \@tempskipb=#6
      \ifdim\@tempskipa<\z@
        \toks@{\titlespacing*#8{#4}}%
        \@tempskipa-\@tempskipa
      \else
        \toks@{\titlespacing#8{#4}}%
      \fi
      \@ifundefined{ttl@space}{}{%
        \ttl@assign\@tempskipa*\ttl@space\relax\beforetitleunit}%
      \ifdim\@tempskipb<\z@
        \if@tempswa
          \titleformat#8[runin]%
             {\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}%
             {\z@}\ttl@passexplicit
        \else
          \titleformat#8[runin]%
             {#7}{\@seccntformat{#2}}%
             {\z@}\ttl@passexplicit
        \fi
        \@tempskipb-\@tempskipb
      \else
        \if@tempswa
          \titleformat#8%
            {\ttl@fil\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}%
            {\z@}\ttl@passexplicit 
        \else
          \titleformat#8%
            {#7}{\@seccntformat{#2}}%
            {\z@}\ttl@passexplicit
        \fi
        \@ifundefined{ttl@space}{}{%
          \ttl@assign\@tempskipb*\ttl@space\relax\aftertitleunit}%
      \fi
      \edef\ttl@a{\the\toks@{\the\@tempskipa}{\the\@tempskipb}}
      \ttl@a}%
    \expandafter\scr@ttl@@extract\scr@ttl@saved@section\section
    \expandafter\scr@ttl@@extract\scr@ttl@saved@subsection\subsection
    \expandafter\scr@ttl@@extract\scr@ttl@saved@subsubsection\subsubsection
    \expandafter\scr@ttl@@extract\scr@ttl@saved@paragraph\paragraph
    \expandafter\scr@ttl@@extract\scr@ttl@saved@subparagraph\subparagraph
    \let\scr@ttl@saved@section\relax
    \let\scr@ttl@saved@subsection\relax
    \let\scr@ttl@saved@subsubsection\relax
    \let\scr@ttl@saved@paragraph\relax
    \let\scr@ttl@saved@subparagraph\relax
    \let\scr@ttl@@extract\relax
  }%
}
\makeatother

\usepackage{classicthesis}

\begin{document}
    \paragraph{Test} Test. % Works (together with \subsubsection, \subsection, …).
    \subparagraph{Test} Test. % Now also works.
\end{document}