2

I want to remove the linebreak between part numeration and part name as found here. However the solution doesn't work for me.

MWE:

\documentclass[draft, onecolumn, oneside, paper=a4, 12pt]{scrartcl}
\usepackage{etoolbox}

\makeatletter
    \patchcmd{\@part}{\par}{\quad}{}{}
\makeatother

\begin{document}
    \part{A}
\end{document}

"Part I." and "A" are still displayed in seperate lines. The output doesn't containg error warnings.

I'm using overleaf and pdfLaTeX.

Thanks in advance.

  • With \patchcmd{\@part}{\par}{\quad}{}{\PatchFailed} you would get the error message that \PatchFailed is not defined. Then you would know that the false part of \patchcmd is excecuted because the patch fails. – esdd Oct 15 '18 at 10:42
5

Avoid patching internal KOMA-Script commands. Redefine the KOMA-Script command \partheadmidvskip to remove the linebreak between the part number and the part text:

\renewcommand*\partheadmidvskip{\enskip}

Example:

\documentclass[fontsize=12pt]{scrartcl}
\renewcommand*\partheadmidvskip{\enskip}
\begin{document}
\part{A}
\end{document}

enter image description here

|improve this answer|||||
  • 2
    If the answer helps, you can upvote it and if it solves the issue, you can accept it. – esdd Oct 15 '18 at 10:56
  • @Jonathan If you like this answer and it was helpful, please consider upvoting (by clicking on the arrows next to the score) and/or marking it as the accepted answer (by clicking on the checkmark ✓). See also tex.stackexchange.com/help/someone-answers. That is the preferred way to say thank you on this site. – moewe Feb 15 '19 at 10:40

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.