2

I am using a two-sided book class, with titlesec package and a redefinition of my part title style.

I want my parts' titles to be one the right page and to write a small intro text on the left page just behind. This text is no chapter nor anything referenced in the toc.

I tried :

\documentclass[twoside,12pt,openright]{book}
\usepackage{titlesec}
\titleformat{\part}[frame]
  {\bfseries\Huge}
  {\filright\large\enspace{\partname}\enspace}
  {40pt}
  {\Large\filcenter\MakeUppercase}
\begin{document}   
\makeatletter
\@openrightfalse
\part{part I}
bla bla bla
\@openrighttrue
\makeatother
\end{document}

but my part title goes on the left side.

If I do :

\documentclass[twoside,12pt,openright]{book}
\usepackage{titlesec}
\titleformat{\part}[frame]
  {\bfseries\Huge}
  {\filright\large\enspace{\partname}\enspace}
  {40pt}
  {\Large\filcenter\MakeUppercase}
\begin{document}
\part{part I}
\makeatletter
\@openrightfalse
bla bla bla
\@openrighttrue
\makeatother
\end{document}

there is a blank page after the part title one.

Any idea ?

2 Answers 2

4

\part forces a blank page but you can redefine it to add some text eg:

enter image description here

\documentclass[twoside,12pt,openright]{book}
\makeatletter
\def\@endpart{\vfil\newpage
              \if@twoside
               \if@openright
                \null
                \thispagestyle{empty}%
%<<<<<<<<<<<<<<<<<<<<
\vspace*{\fill}%
\begin{quote}%
\partnote
\end{quote}%
\vspace*{\fill}%
%<<<<<<<<<<<<<<<<<<<<
                \newpage
               \fi
              \fi
              \if@tempswa
                \twocolumn
              \fi}
\newcommand\partnote{}
\makeatother
\begin{document}

\renewcommand\partnote{This part is about something}
\part{pone title}

bla bla bla

\end{document}

with titlesec the definition needs to be moved and adjusted a bit:

\documentclass[twoside,12pt,openright]{book}
\usepackage{titlesec}
\titleformat{\part}[frame]
  {\bfseries\Huge}
  {\filright\large\enspace{\partname}\enspace}
  {40pt}
  {\Large\filcenter\MakeUppercase}



\def\@endpart{\vfil\newpage
              \if@twoside
               \if@openright
                \null
                \thispagestyle{empty}%
%<<<<<<<<<<<<<<<<<<<<
\vspace*{\fill}%
\begin{quote}%
\partnote
\end{quote}%
\vspace*{\fill}%
%<<<<<<<<<<<<<<<<<<<<
                \newpage
               \fi
              \fi
              \if@tempswa
                \twocolumn
              \fi}






\newcommand\partnote{}

\begin{document}
\makeatletter

\def\ttl@page@ii#1#2#3#4#5#6#7{%
  \ttl@assign\@tempskipa#3\relax\beforetitleunit
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \@ifundefined{ttl@ps@#6}%
    {\thispagestyle{plain}}%
    {\thispagestyle{\@nameuse{ttl@ps@#6}}}%
  \if@twocolumn
    \onecolumn
    \@tempswatrue
  \else
    \@tempswafalse
  \fi
  \vspace*{\@tempskipa}%
  \@afterindenttrue
  \ifcase#5 \@afterindentfalse\fi
  \ttl@assign\@tempskipb#4\relax\aftertitleunit
  \ttl@select{#6}{#1}{#2}{#7}%
  \ttl@finmarks
  \@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
  \vspace{\@tempskipb}%
  \newpage
  \if@twoside
    \if@openright
      \null
      \@ifundefined{ttl@ps@#6}%
        {\thispagestyle{empty}}%
        {\thispagestyle{\@nameuse{ttl@ps@#6}}}%
%<<<<<<<<<<<<<<<<<<<<
\vspace*{\fill}%
\begin{quote}%
\partnote
\end{quote}%
\vspace*{\fill}%
%<<<<<<<<<<<<<<<<<<<<
      \newpage
    \fi
  \fi
  \if@tempswa
    \twocolumn
  \fi
  \ignorespaces}%

\makeatother




\renewcommand\partnote{This part is about something}
\part{pone title}

bla bla bla

\end{document}
7
  • This example does work. But if I try to paste it in my big document, it doesn't. I have no idea why...
    – Basil1402
    Commented Apr 17, 2015 at 12:55
  • @Basil1402 presumably you have a different definition of \part I assumed the one from book as that's what your example had but if you have a different class, or a package has redefined it.... Commented Apr 17, 2015 at 13:00
  • As a matter of fact, I tried removing these lines in my preamble : \titleformat{\part}[frame] {\bfseries\Huge} {\filright\large\enspace{\partname}\enspace} {40pt} {\Large\filcenter\MakeUppercase} and it works. (I don't know how to make it appear like code in comments...)
    – Basil1402
    Commented Apr 17, 2015 at 13:01
  • @Basil1402 If you edit your example above to add whatever package \titleformat comes from, and that setting, I might:-) have a look and adjust the answer to match... Commented Apr 17, 2015 at 13:04
  • @Basil1402: You forgot to mention that your are apparently using titlesec
    – user31729
    Commented Apr 17, 2015 at 13:07
1

I found a way, not sure it is the best, but it works.

\documentclass[twoside,12pt,openright]{book}
\usepackage{titlesec}
\titleformat{\part}[frame]
  {\bfseries\Huge}
  {\filright\large\enspace{\partname}\enspace}
  {40pt}
  {\Large\filcenter\MakeUppercase}
\titleformat{\part}{top}
\begin{document}   
\part{part I}
\clearpage
bla bla bla
\end{document}

The \titleformat{\part}{top} starts a page and places the heading at the top. With the format I had defined, it is at the height I want it to be. Then \clearpage creates a new page where I can write my intro.

Not very clean, but efficient.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .