MWE 的 main.tex:
\documentclass{report}
\usepackage{csquotes}
\usepackage{graphicx}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\usepackage[tableposition=top]{caption}
\usepackage{subcaption}
\usepackage{floatrow}
\usepackage{amsthm,amssymb}
\usepackage{enumitem}
\usetikzlibrary{arrows.meta,calc,positioning}
\tikzset{block/.style={draw,thick,text width=2cm,minimum height=1cm,align=center},
line/.style={-latex}
}
\usepackage{amsmath}
\usepackage{float}
\usepackage{longtable}
\usepackage{IEEEtrantools}
\usepackage{lineno,hyperref}
\usepackage{mathtools}
\newtheorem{proposition}{Proposition}
\modulolinenumbers[5]
\usepackage{makecell}
\usepackage{placeins}
\usepackage[english]{babel}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage[figuresright]{rotating}
\usepackage{xspace}
\usepackage{array}
\usepackage{parskip}
\usepackage{eucal}
\usepackage[boxruled,algochapter]{algorithm2e}
\usepackage{alphabeta}
\usepackage{subcaption}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{xcolor}
\definecolor{blue}{RGB}{243,102,25}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{calc}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
\input{structure}
\begin{document}
\begingroup
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\end{tikzpicture}
\vfill
\endgroup
\tableofcontents
\chapter{Chapter1}
\input{ch1}
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{blue}{Bibliography}}
\printbibliography[heading=none]
\end{document}
MWE 的 structure.tex:
\usepackage[
backend=biber,[![first page][1]][1]
style=numeric,
sorting=nyt,
sortcites=true,
autopunct=true,
autolang=hyphen,
abbreviate=false,
backref=true,
]{biblatex}
\defbibheading{bibempty}{}
\addbibresource{Reference.bib}
% REMARK ENVIRONMENT
\newenvironment{remark}{\par\vspace{10pt}\small
\begin{list}{}{
\leftmargin=35pt
\rightmargin=25pt}\item\ignorespaces
\makebox[-2.5pt]{\begin{tikzpicture}[overlay]
\node[draw=blue!60,line width=1pt,circle,fill=blue!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-15pt,0pt){\textcolor{blue}{R}};\end{tikzpicture}}
\advance\baselineskip -1pt}{\end{list}\vskip5pt}
% PART HEADINGS
\newcommand{\@mypartnumtocformat}[2]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{blue!20}{\strut\parbox[c][.7cm]{\ecart}{\color{blue!70}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{blue!40}{\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}}%
% unnumbered part in the table of contents
\newcommand{\@myparttocformat}[1]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{blue!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}}%
\newlength\esp
\setlength\esp{4pt}
\newlength\ecart
\setlength\ecart{1.2cm-\esp}
\newcommand{\thepartimage}{}%
\newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax%
\refstepcounter{part}%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ ---\ #1}}
\else%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
\fi%
\startcontents%
\markboth{}{}%
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[blue!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north] at (4cm,-3.25cm){\color{blue!40}\fontsize{220}{100}\sffamily\bfseries\@Roman\c@part};
\node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{
\printcontents{l}{0}{\setcounter{tocdepth}{1}}%
}};
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#2}};
\end{tikzpicture}};
\end{tikzpicture}}%
\@endpart}
\def\@spart#1{%
\startcontents%
\phantomsection
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[blue!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#1}};
\end{tikzpicture}};
\end{tikzpicture}}
\addcontentsline{toc}{part}{\texorpdfstring{%
\setlength\fboxsep{0pt}%
\noindent\protect\colorbox{blue!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}
% CHAPTER HEADINGS
\makeatletter
\tikzset{
chaptertitle/.style={
text = black,
node font = \huge\sffamily\bfseries ,
text width = \paperwidth-\Gm@lmargin-10pt ,
align = left
}
}
\newif\ifusechapterimage
\usechapterimagetrue
\newcommand{\thechapterimage}{}%
\newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
\newcommand{\autodot}{.}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\iftrue
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west,chaptertitle] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=blue,fill=white,fill opacity=0.7,inner sep=23pt]{\strut\makebox[44cm]{}};
\draw[anchor=west,chaptertitle] (\Gm@lmargin,-9cm) node {\iftrue\thechapter. \fi#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\else
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=south west] (\Gm@lmargin+.3cm,-9cm) node [line width=2pt,rounded corners=15pt,draw=blue,fill=white,fill opacity=0.7,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=south west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\fi\fi\par\vspace*{270\p@}}}
\def\@makeschapterhead#1{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=blue,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\par\vspace*{270\p@}}
\makeatother
MWE 的 ch1.tex:
这里使用的参考文献是\cite{1.1}。
MWE 的reference.bib:
@book{1.1,
title={Securing critical information infrastructure: Global perspectives and practices},
author={Sharma, Munish},
year={2017},
publisher={Institute for Defence Studies and Analyses}
}
虽然我在structure.tex 中的“CHAPTER HEADINGS”下添加了与 tikz 相关的代码,但 tikz 也在“REMARK ENVIRONMENT”和“PART HEADINGS”下使用。这些我还没有添加到 MWE structure.tex 文件中。