2

I would like to redefine part style with LuaLatex: (I have checked other answers here like this but it doesn't seem to fit my questions quite well: add parts to toc

  • can I optimize by redefining the "part" style globally so it will always be on a separate page preferably with 1/3 space above and 2/3 space below? (Also probably having it a bit more indented to the right would be prettier for the eye, but my attempts to use \hspace{...cm} failed)
  • it would be really ideal if the size of "Teil I" would match the one in the part title itself

Thank you very much!

MWE result

That's my MWE

\documentclass[
  12pt,
  a4paper,
  parskip,
  headings=standardclasses,
  listof=totoc,
  numbers=noenddot
]{scrartcl}
\usepackage{epigraph}

\usepackage[hmargin=2.5cm, top=2.5cm, bottom=2cm, footskip=1cm]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage[main=ngerman, english]{babel} \usepackage[babel, german=quotes]{csquotes} \usepackage[ngerman]{isodate} \usepackage[ngerman]{datetime} \usepackage{hyphenat}% create hypen without overfull box

\KOMAoptions{toc=sectionentrydotfill} \KOMAoption{captions}{tableheading}% correct TOC count for tableshttps://www.overleaf.com/project/6306f7ae98db98de7e4c0e98 \renewcaptionname{ngerman}{\contentsname}{Inhaltsverzeichnis} %\BeforeTOCHead[toc]{{\pdfbookmark[1]{\contentsname}{toc}}}% TOC in bookmarks

\begin{document} \tableofcontents \clearpage \vspace{\stretch{1}} \part{Theory} \vspace{\stretch{2}} \clearpage \section{Theory I} \section{Theory II} blabla \end{document}

1 Answers1

1

You can use the hook mechanism of scrartcl.

\documentclass[
  12pt,
  a4paper,
  parskip,
  headings=standardclasses,
  listof=totoc,
  numbers=noenddot
]{scrartcl}

\usepackage{epigraph}

\usepackage[ hmargin=2.5cm, top=2.5cm, bottom=2cm, footskip=1cm, showframe,% remove in production version ]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage[main=ngerman, english]{babel} \usepackage[babel, german=quotes]{csquotes} \usepackage[ngerman]{isodate} \usepackage[ngerman]{datetime} %\usepackage{hyphenat}% create hypen without overfull box

\KOMAoptions{toc=sectionentrydotfill} \KOMAoption{captions}{tableheading} \renewcaptionname{ngerman}{\contentsname}{Inhaltsverzeichnis} %\BeforeTOCHead[toc]{{\pdfbookmark[1]{\contentsname}{toc}}}% TOC in bookmarks

\AddtoDoHook{heading/preinit/part}{\clearpage\vspace{\stretch{1}}} \AddtoDoHook{heading/endgroup/part}{\vspace{\stretch{2}}\clearpage}

\begin{document}

\tableofcontents

\part{Theory}

\section{Theory I} \section{Theory II}

blabla

\end{document}

enter image description here

Adjust the \stretch factors to suit your taste.

egreg
  • 1,121,712