章节标题页,带有 tikz 思维导图图像

章节标题页,带有 tikz 思维导图图像

这个问题是使用 tikz mindmap 或类似软件制作的可视化目录。现在,我想在该章节页面上使用给定章节的思维导图,以生成类似以下的内容,其中该章节的图像出现在右上角,并且章节标题具有与该图像中较浅颜色相同的背景颜色。

Ch03-tocmap2

此图像上的裁剪标记显示最终页面裁切尺寸,7 × 10 英寸,因此所有内容都必须符合这些限制(我的模型是手动创建的)。理想情况下,我希望将章节图像的右上角放置在页面的右上角。

我在下面的 MWE 中开始做这件事。它创建了主要元素,但我不知道如何像在我的模型中那样定位它们。它可能需要类似的东西titlesec

%\documentclass[10pt,krantz2]{krantz}
\documentclass[10pt]{book}
\usepackage{sfheaders}        %% Chap/Sec headers in Helvetica; 
\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}

这给了我以下信息:

图片

答案1

%\documentclass[10pt,krantz2]{krantz}
\documentclass[10pt]{book}
%\usepackage{sfheaders}        %% Chap/Sec headers in Helvetica;
\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}

在此处输入图片描述

shift您可以通过以下方式微调位置:

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

相关内容