Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: Latex  |  size: 0.84 KB  |  hits: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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}