Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[openany,]{scrbook}
- \usepackage[english]{babel}
- \usepackage{blindtext}
- \usepackage{etoolbox}
- \makeatletter
- % First, modify the \@endpart macro.
- \def\@endpart{}
- % Next, copy the \chapter macro to \nonewpagechapter, and ...
- % ... suppress page-breaking instructions in the modified macro
- \let\nonewpagechapter\chapter
- \patchcmd\nonewpagechapter{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
- % Third, suppress vertical whitespace before "Part xx" material
- \patchcmd{\part}{\null\vfil}{}{}{}
- \makeatother
- \begin{document}
- \part{foo}
- \nonewpagechapter{Uno} % starts on same page as "Part I ... foo" header
- \blindtext
- \chapter{Dos} % starts on a new page
- \part{bar} % starts on a new page
- \nonewpagechapter{Tres}% starts on same page as "Part II ... bar" header
- \blindtext
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement