# Background image under Chapter Title

I am looking to put an image on the first page of each chapter, only, behind the chapter title. I assume that I should be using the package background, since the image will be behind text, but I cannot get it to play nicely in the chapterstyle code - it is currently placing the image on the first page of the file, no connection to the chapter page.

(Preamble) Code I am using:

\documentclass{memoir}
\usepackage{pgfornament}
\usepackage{graphicx}
\usepackagepages=some]{background}
\backgroundsetup{
scale=0.75,
position={6,-6},
angle=0,
contents={%
\includegraphics{image}
}%
}

\makechapterstyle{custom}
{\BgThispage
\renewcommand\printchaptername{}
\renewcommand\chaptitlefont{\fontsize{18}{18}\scshape\centering}
}
\chapterstyle{custom}


Is it possible to use background at all in \makechapterstyle?

• Thanks. You are correct, this is '\documentclass{memoir}' – Kitty Mar 1 '18 at 23:09

I could have chosen any of the component macros. None of them have arguments, but I figured \afterchapternum was probably the simplest.

I'll let you tweak the positioning.

\documentclass{memoir}
\usepackage[pages=some]{background}
\backgroundsetup{
scale=0.75,
position={6,-6},
angle=0,
contents={%
\includegraphics{example-image}
}%
}

\makechapterstyle{custom}
{\let\temp=\afterchapternum
\renewcommand\afterchapternum{\temp\BgThispage}}
\chapterstyle{custom}

\usepackage{lipsum}

\begin{document}
\chapter{First}
\lipsum[1-8]

\end{document}