每个标题章节有不同的图片吗?

每个标题章节有不同的图片吗?

我找到了一个免费模板,他们称之为“tstextbook”,我相信它是从 Legrand 橙皮书衍生而来的模板。它在每个章节页面上都有 minitoc,而 Legrand 模板没有。相反,Legrand 模板可以更改章节标题图片,而 tstextbook 不能。我喜欢有 minitoc 并能够同时更改章节标题图片。所以,我开始使用 MWE,希望我可以将它们放在一起。我将图片更改为 example-image-a,但它将适用于所有章节标题图片。请帮忙。

提前致谢。

% Chapter styling
%--------------------------------------------------------------------------
\makeatletter
% Numbered chapters (with minitoc)
\renewcommand{\@makechapterhead}[1]{
    \begin{tikzpicture}[remember picture,overlay]
    \node at (current page.north west)
    {
        \begin{tikzpicture}[remember picture,overlay]
        % Background image
        \node[anchor=north west,inner sep=0pt] at (0,0)
        {\includegraphics[width=\paperwidth]{example-image-a}};
        % Chapter heading
        \draw[anchor=west, inner sep=0pt] (-0.1cm,-1.5cm) node
        [black,
        ultra thick,
        fill=tsorange!10,
        fill opacity=.6,
        inner sep=10pt]
        (0,0)
        {\parbox[t][1.6cm][t]{\paperwidth}
            {\huge\bfseries\sffamily\flushleft\thechapter. #1}};
        % Chapter contents
        \draw[anchor=west,inner sep=0pt] (8.8cm,-7cm) node
        [tssteelblue,
        ultra thick,
        fill=white,
        fill opacity=.8,
        draw=tssteelblue,
        draw opacity=1,
        line width=1.5pt,
        rounded corners,
        inner sep=0pt]
        (0,0)
        {\hspace{1cm}\parbox[t][7.1cm][t]{11cm}
            {\vspace{-1cm}\huge\bfseries\sffamily\flushleft
                \textcolor{black}{\sffamily\minitoc}}};
        \end{tikzpicture}
    };
\end{tikzpicture}
\vspace{7.5cm}
}

% Unnumbered chapters (without minitoc)
\renewcommand{\@makeschapterhead}[1]{
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{
    \begin{tikzpicture}[remember picture,overlay]
    % Background image
    \node[anchor=north west,inner sep=0pt] at (0,0)
    {\includegraphics[width=\paperwidth]{example-image-b}};
    % Chapter heading
    \draw[anchor=west,inner sep=0pt] (-0.1cm,-1.5cm) node
    [black,
    ultra thick,
    fill=tsorange!10,
    fill opacity=.6,
    inner sep=10pt]
    (0,0)
    {\parbox[t][1.6cm][t]{\paperwidth}
        {\huge\bfseries\sffamily\flushleft #1}};
    \end{tikzpicture}
};
\end{tikzpicture}
\vspace{8cm}
}

相关内容