I using KOMS-script, and I look at this question: Modifying \part style in KOMA, for changing the part style.
My question is: How do I prevent from the part name to be in a new line....
Thank you!
I using KOMS-script, and I look at this question: Modifying \part style in KOMA, for changing the part style.
My question is: How do I prevent from the part name to be in a new line....
Thank you!
You could use
\renewcommand\partformat{\partname~\thepart\autodot\enskip}% add space between number and title
\renewcommand\partheadmidvskip{}% remove the linebreak and vskip
\setkomafont{partprefix}{\usekomafont{part}}% same font(size) for prefix and title
Example:
\documentclass{scrbook}
\renewcommand\partformat{\partname~\thepart\autodot\enskip}
\renewcommand\partheadmidvskip{}
\setkomafont{partprefix}{\usekomafont{part}}
\usepackage{blindtext}
\begin{document}
\part{First Part}
\blinddocument
\end{document}
Result:
Or maybe you want:
\documentclass{scrbook}
\RedeclareSectionCommand[
beforeskip=\fill,
afterskip=0pt
]{part}
\renewcommand\raggedpart{\raggedleft}
\renewcommand\partformat{\thepart\autodot\enskip}
\renewcommand\partheadmidvskip{}
\setkomafont{partprefix}{\usekomafont{part}}
\usepackage{blindtext}
\begin{document}
\part{First Part}
\blinddocument
\end{document}
Of course you can also use (as asked in a comment below):
\documentclass{scrbook}
\RedeclareSectionCommand[
beforeskip=\fill,
afterskip=0pt
]{part}
\renewcommand\raggedpart{\raggedleft}
\renewcommand\partheadmidvskip{}
\renewcommand\partformat{part~\thepart\autodot\enskip}
\usepackage{xcolor}
\usepackage{lmodern}% scalable font
\setkomafont{partprefix}{\fontsize{26pt}{30pt}\selectfont\color{red}}
\setkomafont{part}{\usekomafont{partprefix}\color{blue}}
\usepackage{blindtext}
\begin{document}
\part{First Part}
\blinddocument
\end{document}
Result:
xcolor
and you need a scalable font. Note that font element name partnumber
is an alias of partprefix
.