I'm trying to place a picture on the left side of a \part section, basically what has been done here Memoir: Picture opposite part page, but with a book document class. I'm also using the epigraph package to change my \part command, which works fine.
But there is a BIG problem. When I insert the picture on the left side (even page), the epigraph shows on the picture page and on the part page, it shows twice! I want it to appear only on the part page.
Here is the code I'm using:
\documentclass{book}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb, amsmath, amstext, array}
\usepackage{gensymb}
\usepackage{enumitem}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\graphicspath{ {Imagens/} }
\usepackage[section]{placeins}
\usepackage{addfont}
\usepackage[default,scale=0.75]{opensans}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{anyfontsize}
\usepackage{lipsum}
\newcommand*\cleartoleftpage{%
\clearpage
\ifodd\value{page}\hbox{}\newpage\fi
}
\usepackage{epigraph}
\titleformat{\part}[display]
{\filleft\fontsize{40}{40}\selectfont\scshape}
{\fontsize{90}{90}\selectfont\thepart}
{20pt}
{\thispagestyle{epigraph}}
\setlength\epigraphwidth{.6\textwidth}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\epigraphhead
{\let\@evenfoot}
{\let\@oddfoot\@empty\let\@evenfoot}
{}{}
\makeatother
\usepackage{afterpage}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
\begin{document}
\chapter{One}
\lipsum
\cleardoublepage
\cleartoleftpage
\includegraphics[scale=1]{example-image-a}
\epigraphhead[450]{BlablablaBlabaBlablablaBlablablaBlablablaBlablabla.\par\hfill\textsc{Blabmaister}}
\part{Part One}
\chapter{Two}
\lipsum
\end{document}
I've already tried afterpage and a lot of other solutions on the web, but none work. Could you please give me a hand?
Thanks!
example-image-a
, say, then other people will be able to compile your code (which they can't right now).book
whenmemoir
, which you mention, gives the same results asbook
but with extensions and more flexibility?memoir
existed until very late in my writing. I fear converting now could take some time (although I could be wrong).