I would like to recreate the following behaviour using the scrartcl class:

\titleformat{\section}{}{Aufgabe \thesection}{1em}{}

Which then looks like this:

enter image description here

I did not for the life of it find a way to achieve the same using a KOMA-class (scrartcl, to be precise), so I resorted to doing this:

\section*{Aufgabe 1}

Which is feasible because we're only talking 3–5 pages long assignments and I don't need a TOC, but it's of course horribly un-LaTeX-ish and part of me is dying when I do it.



\renewcommand*\sectionformat{Aufgabe \thesection}

Update: An alternative approach would be enumerations:



    \needspace{3\baselineskip}\bfseries Aufgabe \stepcounter{aufgabecnt}\theaufgabecnt:\mdseries\nopagebreak

    \item Test
    \item Test

This approach uses the package needspace for preventing page breaks (as \nopagebreak is kind of tricky).

  • I do highlight them in the actual document. I removed all formatting from the mwe because it's not part of the issue. Point taken for the break though. I took care of that in the document but accidentally removed it from the mwe. I'll add it. – prestoaghitato May 14 '17 at 17:03
  • »Issuing empty sections and subsections does not make much sense.« – why not? – cgnieder May 14 '17 at 17:11
  • @clemens Well, because a simple new command with so much hassle of redefinitions would have been sufficient. But I have already removed those points as they were not that important. – TeXnician May 14 '17 at 17:12
  • @TeXnician I don't get it but I guess it's not so important… – cgnieder May 14 '17 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.