0

I would like to introduce a new heading in a KOMA-Script class on the subsection level that has a prefix and a separate counter, eg. GP1, GP2, etc. Otherwise, the style should be the same as \subsection. \subsection itself should not be affected so it can be used in parallel.

As seen in this answer, it is possible to define a heading with prefix based on section (or subsection), but it does not create a new counter and the prefix does not appear in ToC.

It seems that \DeclareSectionCommand (see answer) is the proper way to define a new heading, however, I cannot manage to add a prefix.

1 Answer 1

1

Ok, so I was not too far away from the solution:

\DeclareSectionCommand[
    afterskip=1.5ex plus .2ex,
    beforeskip=-3.25ex plus -1ex minus -.2ex,
    font=\usekomafont{subsection},
    indent=0pt,
    level=2,
    tocindent=3.8em,
    toclevel=2,
    tocnumwidth=3.2em,
    tocstyle=section,
    counterwithin=section,
    style=section
]{gp}

All I needed for the prefix:

\renewcommand*{\thegp}{GP\arabic{gp}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .