Advertisement
Guest User

Untitled

a guest
May 6th, 2012
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.84 KB | None | 0 0
  1. \documentclass[openany,]{scrbook}
  2. \usepackage[english]{babel}
  3. \usepackage{blindtext}
  4.  
  5. \usepackage{etoolbox}
  6.  
  7. \makeatletter
  8. % First, modify the \@endpart macro.
  9. \def\@endpart{}
  10.  
  11. % Next, copy the \chapter macro to \nonewpagechapter, and ...
  12. % ... suppress page-breaking instructions in the modified macro
  13. \let\nonewpagechapter\chapter
  14. \patchcmd\nonewpagechapter{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
  15.  
  16. % Third, suppress vertical whitespace before "Part xx" material
  17. \patchcmd{\part}{\null\vfil}{}{}{}
  18.  
  19. \makeatother
  20.  
  21. \begin{document}
  22. \part{foo}
  23. \nonewpagechapter{Uno} % starts on same page as "Part I ... foo" header
  24. \blindtext
  25. \chapter{Dos}          % starts on a new page
  26. \part{bar}             % starts on a new page
  27. \nonewpagechapter{Tres}% starts on same page as "Part II ... bar" header
  28. \blindtext
  29. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement