# Set a picture/tikz in the chapter background book \titleformat

i want to use different tikz pictures or *.img-files in the chapterpages background. Documentclass is the twoside book.

So far i did the newcommand to get different \titleformats like:

\newcommand{\intro}{%
\titleformat{\chapter}[display]
{\Huge\bfseries}
{}
{0pt}
{\thechapter ##1}
}

\newcommand{\implementation}{%
\titleformat{\chapter}[display]
{\Huge\bfseries}
{}
{0pt}
{\thechapter ##1}
}


now i want to set an image or tikz-picture in the background, that didnt affect the position of the pagenumber and name or the following text. But i can't find the position where to add it. Tried to set it to the different titleformat parameters. but they all affect the positioning of the pagenumber and name.

MWE:

\documentclass[12pt,a4paper,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\usepackage{blindtext}
\usepackage{xcolor}

\newcommand{\intro}{%
\titleformat{\chapter}[display]
{\Huge\bfseries\itshape }
{}
{0pt}
{\colorbox{gray!30}{\rlap{\raisebox{20pt}[0pt][0pt]{\textcolor{gray}{\thechapter}}}\parbox[c][40pt][c]{\linewidth}{\Large\scshape\centering##1}}}
%here an example tikz arrow that i want in the background
[{\begin{tikzpicture} \draw [->,ultra thick] (0,-5) -- (10,5); \end{tikzpicture}}]
}

\begin{document}

\intro
\chapter{Introduction}
\blindtext[8]

\end{document}

• You could have a look at the background package. – Piet van Oostrum Nov 14 '16 at 17:30
• try to change \begin{tikzpicture} by \begin{tikzpicture}[remember picture, overlay] – flav Nov 15 '16 at 7:54