Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have defined (using koma-script), that chapters only start on the right side. The same applies to part pages. So far this is ok.

But now I want to insert a contents list (using titletoc) on the back side (left) of the part page. It shall list only the chapters, thus it will never span more than one page.

However by default the next opened page after \part is on the right side.

There are some hacks to solve this problem (found here)

\makeatletter\@openrightfalse\makeatother
\part{Part Name}
This is the text I put on the back side of the part page
\makeatletter\@openrighttrue\makeatother

But I would like to have this configured in the preamble and have a clean code in the document. Is this possible somehow?

EDIT: From the previous comments I could find out that \renewcommand{\partheademptypage}{} works until I reformat the part page using titlesec.

\documentclass{scrbook}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{titletoc}   

\titleformat{\part}[frame]
  {\usekomafont{part}\Large\color{black}\centering}    % format
  % label: PART I
  {\enspace \LARGE\MakeUppercase{\partname}%           
     \centering \Huge~\thepart \enspace }%  
  % sep (from partnumber)
  {1.5\baselineskip}
  % (before chaptertitle and after)
  {\color{black}\filcenter}       

\begin{document}
\mainmatter

\newcommand{\PartialToc}{%
\startcontents[part]
\section*{Contents}
\printcontents[part]{}{0}{\setcounter{tocdepth}{0}}
}

\renewcommand{\partheademptypage}{}%

\part{Part Heading}
\PartialToc
\chapter{first}
\chapter{second}

\end{document}
share|improve this question
    
A clean solution is the usage of KOMAoptions instead of makeatletter makeatother. Please add a complete MWE. –  Marco Daniel Mar 10 '13 at 12:07
2  
The scrbook and scrreprt classes use the macro \partheademptypage for producing the blank page after the part page; so just redefining it to do nothing will do. –  egreg Mar 10 '13 at 12:21

2 Answers 2

up vote 4 down vote accepted

This should show once again the importance of a minimal example. If you reformat the part page using titlesec, you're overriding for \part the commands used normally by scrbook, so redefining \partheademptypage won't do any good.

With titlesec, the control about the \cleardoublepage issued by \part is delivered to \ttl@page@ii, which is used by all "part" class sectioning commands, so it shouldn't be a problem for the rest of the document. Patching it so that the relevant \if@openright test is nullified is easy; but since \if@openright appears twice, we search for \if@openright\null, changing it into \iffalse that will ignore all tokens up to the matching \fi.

\documentclass{scrbook}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{titletoc}   

\titleformat{\part}[frame]
  {\usekomafont{part}\Large\color{black}\centering}    % format
  % label: PART I
  {\enspace \LARGE\MakeUppercase{\partname}%           
     \centering \Huge~\thepart \enspace }%  
  % sep (from partnumber)
  {1.5\baselineskip}
  % (before chaptertitle and after)
  {\color{black}\filcenter}

\newcommand{\PartialToc}{%
  \startcontents[part]
  \section*{Contents}
  \printcontents[part]{}{0}{\setcounter{tocdepth}{0}}
}

\usepackage{etoolbox}
\makeatletter
\patchcmd\ttl@page@ii{\if@openright\null}{\iffalse}{}{}
\makeatother

\begin{document}
\mainmatter

\part{Part Heading}
\PartialToc
\chapter{first}
\chapter{second}

\end{document}
share|improve this answer

If I understand you correctly, you want to typeset something on the back side of a part that opens on the right side of a double page? Than \renewcommand{\partheademptypage}{} might help you:

\documentclass{scrbook}
\title{hello world}
\renewcommand{\partheademptypage}{}
\begin{document}
\maketitle
\part{eins}
This is the text I put on the back side of the part page
\chapter{un}
\chapter{deux}
\chapter{trois}
\part{zweit}
This is some other text I put on the back side of the part page
\chapter{uno}
\chapter{due}
\chapter{tre}
\end{document}
share|improve this answer
    
I can confirm that this work, however not with the MWE example that I added to the question. –  Matthias Pospiech Mar 10 '13 at 12:58
    
@MatthiasPospiech: You are loading titlesec. Do you really need it? –  Marco Daniel Mar 10 '13 at 13:22
    
I use it for redesigning the part and chapter headings. So yes I need it. –  Matthias Pospiech Mar 10 '13 at 13:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.