Putting a vertical graphic to the left of chapter header

I want to set up chapter headers to look like this:

||
|| Chapter 1
|| The City Begins
|| to Decay


The two vertical bars represent a series of vertical bars drawn in xfig. I've tried this:

\titleformat{\chapter}
[display]
{\normalfont\Large\bfseries}{
\includegraphics{chapter-graphic}
\chaptertitlename\ \thechapter
}
{-10pt}
{\titlefont}


After applying Bernard's suggestion below and adjusting the first parameter, I get this:

Note how this causes "Chapter X" to be indented, but not the chapter name. Putting \indent into any parameter of \titleformat won't help. Now look how the bottom of the image is not anchored to the bottom of the text:

#FIG 3.2  Produced by xfig version 3.2.6a
Landscape
Center
Metric
A4
100.00
Single
-2
1200 2
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
0 0 45 0 45 1125 0 1125 0 0
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
90 1125 135 1125 135 -90 90 -90 90 1125
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
180 1125 225 1125 225 -180 180 -180 180 1125
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
270 1125 315 1125 315 -270 270 -270 270 1125
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
360 1125 405 1125 405 -360 360 -360 360 1125
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
450 1125 495 1125 495 -450 450 -450 450 1125
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
540 1125 585 1125 585 -540 540 -540 540 1125

• For the graphic inclusion, try something like \raisebox{-\height}[0pt][0pt]{\includegraphics{chapter-graphic}}. Sep 30 '18 at 11:02
• @Bernard I adjusted the first parameter in your suggestion to get the actual height right. However, the height is not aligned to anything. It needs to align to the bottom of the chapter name. Also, "Chapter X" is indented, but not the chapter name. No amount of \indent seems to help. See above for the malformed chapter headers. Oct 1 '18 at 21:27
• @JohnKormylo, can I get an example of how to use tikzpicture, tikspagenodes for doing this? I find no such examples. Oct 1 '18 at 21:28
• And with the block style? Oct 1 '18 at 21:52
• @Bernard What do you mean by block style? The text should all be left-justified, appear just to the right of the graphic, and the graphic should be anchored about 30pt or so below the text. Oct 1 '18 at 21:58

This solution puts a normal chapter into a \parbox and inserts the graphic in front (with a gap of \columnsep).

It uses a fixed width for the graphic, but adjusts the height to match the heading. It uses the definition for \chapter from book class (50pt above, 40pt below).

\documentclass{book}
%\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{showframe}% debugging tool
\usepackage{lipsum}% MWE only

\makeatletter
\vspace*{50\p@}%
{\parindent \z@ \parskip \z@
\sbox0{\parbox[b]{\dimexpr\textwidth-2cm-\columnsep}{% width is preset
\raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1}}%
\raisebox{-\dp0}[\ht0][\dp0]{% [\ht0][\dp0] redundant in this case
\includegraphics[height={\dimexpr\ht0+\dp0},width=2cm]{example-image-duck}}%
\hspace{\columnsep}\usebox0
\par\nobreak}%
\vskip 40\p@
}
\makeatother

\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter[pipes]{Someone finds the old pipes leading downward}

\lipsum[1-6]
\end{document}


This solution is for memoir class.

\documentclass{memoir}
%\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{showframe}% debugging tool
\usepackage{lipsum}% MWE only

\makeatletter
{\parskip \z@
\parindent \z@
\sbox0{\parbox[b]{\dimexpr\textwidth-2cm-\columnsep}{% graphic width 2cm
\memRTLraggedright \normalfont
\ifm@m@And
\afterchapternum % \par\nobreak \vskip 20\p@
\else
\printchapternonum
\fi
\interlinepenalty\@M
\printchaptertitle{#1}}}% \Huge \bfseries #1
\raisebox{-\dp0}[\ht0][\dp0]{% [\ht0][\dp0] redundant in this case
\includegraphics[height={\dimexpr\ht0+\dp0},width=2cm]{example-image-duck}}%
\hspace{\columnsep}\usebox0%
\afterchaptertitle%
}}
\makeatother

\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter[pipes]{Someone finds the old pipes leading downward}

\lipsum[1-6]
\end{document}

• If I adjust the line {\vskip-\topskip\vskip-50pt to {\vskip-\topskip\vskip-25pt, I seem to get the projection above the top of the text I need. However, this doesn't work on the memoir class. Oct 2 '18 at 10:07
• Memoir uses \beforechapskip and \afterchapskip, which default to 50pt and 40pt again. Anyway, I simplified the solution by only modifying \@makechapterhead. Oct 2 '18 at 13:27
• Note to myself and others: to get this to work for \chapter*{Foobar}, redefine \@makeschapterhead as well as \@makechapterhead. Oct 6 '18 at 1:00