# Chapter title page with a tikz mindmap image

This question is an extension of Visual table of contents using tikz mindmap or similar. Now, I would like to use the mindmap for a given chapter on that chapter page, to produce something like the following, where the image for that chapter appears in the upper right corner, and the chapter title has the same background color as the lighter color in that image.

The crop marks on this image show the final page trim size, 7 × 10 inches, so everything has to fit within these limits (my mockup was created manually). Ideally, I'd like the chapter image positioned with its upper right corner at the upper right corner of the page.

I made a start on this in the MWE below. It creates the main elements, but I don't know how to position them as in my mockup. It probably needs something like titlesec.

%\documentclass[10pt,krantz2]{krantz}
\documentclass[10pt]{book}
\usepackage{graphicx}         %% well, its about graphics
\usepackage{blindtext}

\usepackage{tikz}
\usetikzlibrary{mindmap,backgrounds}
\colorlet{col1}{teal}        %% Part I color
\colorlet{col2}{olive}       %% Part II
\colorlet{col3}{orange}      %% Part III

% local chapter commands
\newcommand{\chapterprelude}[1]{%
\textsf{#1}
\newline
\rule{\textwidth}{0.4pt}
}
\newcommand{\hard}{$^\star$\xspace}

\setcounter{chapter}{2} % one less than chapter number

\begin{document}

\chapter{Fitting and Graphing Discrete Distributions}\label{ch:discrete}

%\input{ch03/vtoc}   %% visual contents images
\begin{tikzpicture}[grow cyclic, text width=2cm, align=flush center,
every node/.style=concept, concept color=col1!50,
level 1/.style={level distance=4cm, sibling angle=60,         %% 360/# of sections
concept color=col1!20},
%       level 2/.style={level distance=4.5cm,sibling angle=45, concept color=col1!20}
]
\sffamily
\node {\textbf{3 Fitting \& Graphing Discrete Distributions}} [clockwise from=60]  % root node
child { node {3.1 \\ Introduction}}
child { node {3.2 \\ Characteristics}}
child { node {3.3 Fitting}}
child { node {3.4 \\ Ord plots}}
child { node {3.5 \\ Poissonness plots}}
child { node (sec36) {3.6 \\ Fitting by GLMs}}
;
\end{tikzpicture}

\chapterprelude{%
Discrete data often follow various theoretical probability models.
Graphic displays are used to visualize goodness of fit,
to diagnose an appropriate model, and determine the impact of
individual observations on estimated parameters.
}

\section{Introduction to discrete distributions}\label{sec:discrete-intro}
\blindtext
\section{Characteristics of  discrete distributions}\label{sec:discrete-distrib}
\section{Fitting discrete distributions}\label{sec:discrete-fit}
\section{Diagnosing discrete distributions: Ord plots}\label{sec:discrete-ord}
\section{Poissonness plots and generalized distribution plots}\label{sec:discrete-Poissonness}
\section{Fitting discrete distributions as generalized linear models\hard}\label{sec:fitglm}

\end{document}


This gives me the following:

%\documentclass[10pt,krantz2]{krantz}
\documentclass[10pt]{book}
\usepackage{graphicx}         %% well, its about graphics
\usepackage{blindtext}

\usepackage[paperwidth=7in,paperheight=10in]{geometry}

\usepackage{tikz}
\usetikzlibrary{mindmap,backgrounds}
\colorlet{col1}{teal}        %% Part I color
\colorlet{col2}{olive}       %% Part II
\colorlet{col3}{orange}      %% Part III

% local chapter commands
\newcommand{\chapterprelude}[1]{%
\textsf{#1}
\par\noindent
\rule{\textwidth}{0.4pt}
}
\newcommand{\hard}{$^\star$\xspace}

\setcounter{chapter}{2} % one less than chapter number

\usepackage{titlesec}

\newcommand{\chaptitle}[1]{%
\begin{tikzpicture}
\node[fill=col1!20,inner sep=6pt,text width=\dimexpr\linewidth-12pt\relax] {#1};
\end{tikzpicture}
}

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\sffamily}{\scalebox{3}{\thechapter}}{25pt}{\Huge\chaptitle}
\titlespacing*{\chapter} {0pt}{110pt}{20pt}

\newsavebox{\mybox}

\begin{document}

\chapter{Fitting and Graphing Discrete Distributions}\label{ch:discrete}

%\input{ch03/vtoc}   %% visual contents images

\savebox\mybox{%
\begin{tikzpicture}[grow cyclic, text width=2cm, align=flush center,
every node/.style=concept, concept color=col1!50,
level 1/.style={level distance=4cm, sibling angle=60,         %% 360/# of sections
concept color=col1!20,font=\sffamily},
%       level 2/.style={level distance=4.5cm,sibling angle=45, concept color=col1!20}
]
\node[font=\bfseries\sffamily]  {3 Fitting \& Graphing Discrete Distributions} [clockwise from=60]  % root node
child { node {3.1 \\ Introduction}}
child { node {3.2 \\ Characteristics}}
child { node {3.3 Fitting}}
child { node {3.4 \\ Ord plots}}
child { node {3.5 \\ Poissonness plots}}
child { node (sec36) {3.6 \\ Fitting by GLMs}}
;
\end{tikzpicture}
}

\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east] at (current page.north east) {\usebox{\mybox}};
\end{tikzpicture}

\chapterprelude{%
Discrete data often follow various theoretical probability models.
Graphic displays are used to visualize goodness of fit,
to diagnose an appropriate model, and determine the impact of
individual observations on estimated parameters.
}

\section{Introduction to discrete distributions}\label{sec:discrete-intro}
\blindtext
\section{Characteristics of  discrete distributions}\label{sec:discrete-distrib}
\section{Fitting discrete distributions}\label{sec:discrete-fit}
\section{Diagnosing discrete distributions: Ord plots}\label{sec:discrete-ord}
\section{Poissonness plots and generalized distribution plots}\label{sec:discrete-Poissonness}
\section{Fitting discrete distributions as generalized linear models\hard}\label{sec:fitglm}

\end{document}


You can fine tune the position by shift as in

at ([shift={(-3mm,-3mm)}]current page.north east)

• Thanks, Harish. This is a very good answer. I edited my question to be more specific about the page trim size and the positioning of the tikz graphic--- the graphic needs to be at the upper right corner of a 7" x 10" page. Can someone help improve this? – user101089 Mar 18 '15 at 19:27
• @user101089 Please see the update. You can fine tune the position using shifts in \node[anchor=north east] at (current page.north east) {\usebox{\mybox}}; – user11232 Mar 18 '15 at 22:35