代码如下:
\documentclass[11pt,a4paper,twoside,openright]{book}
%nummering
\usepackage{tikz}
\usetikzlibrary{matrix}
\usepackage{fancyhdr}
\pagestyle{fancy}
\pagestyle{plain}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\usepackage[dutch]{babel}
\usepackage[babel=true]{csquotes}
\usepackage[T1]{fontenc}
\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage{charter}
\definecolor{mybluei}{RGB}{5, 0, 100}
\definecolor{myblueii}{RGB}{0, 0, 100}
\usepackage{rotating, graphicx}
\usepackage{titlesec}
\usepackage{tcolorbox}
\newcommand\ChapterFont{\rmfamily\selectfont\huge}
\newcommand\SectionFont{\bfseries\rmfamily\selectfont\Large}
\titleformat{\chapter}[block]
{\normalfont\ChapterFont\huge\color{myblueii}}%\raisebox{-0.6\height}
{\tcbset{colframe=mybluei, boxrule=0.8pt, left=0pt, right=0pt, top=0pt, bottom=0pt}\raisebox{-0.48\height}{\rotatebox{90}{\tcbox[boxsep=4pt, colback= white ]{\color{mybluei}\Large\chaptertitlename}}}\hskip 0.25em\mbox{\tcbox[ boxsep=12pt, colback=mybluei, tcbox raise = -35pt]{\color{white}\bfseries\fontsize{70}{70}\selectfont\thechapter}}}
{0.5em}
{#1\vskip0.6ex\endgraf\titlerule[1ex]}[]
\titleformat{name=\chapter,numberless}[block]
{\normalfont\selectfont\huge\color{myblueii}}
{}
{0pt}
{\parbox[b]{70pt}{\mbox{}}%
\hspace{15pt}%
\parbox[b]{\dimexpr\textwidth-15pt}{%
\raggedright\bfseries#1\vskip6pt%
}%
}
\titleformat{\section}
{\normalfont\small\sffamily\SectionFont\color{myblueii}}
{\colorbox{mybluei}{%
\parbox[c][16pt][c]{40pt}{%
\centering\textcolor{white}{\SectionFont\Large\rmfamily\thesection}%
}%
}%
}
{1em}
{#1}
[\vspace{-0.755\baselineskip}%
\color{myblueii}\hspace*{\dimexpr40pt+2\fboxsep\relax}%
\rule{\dimexpr\textwidth-40pt-2\fboxsep\relax}{1pt}%
]
\usepackage{amsmath, amsthm, amssymb, amsfonts, enumerate}%, dlfltxbcodetips
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage{lipsum}
\begin{document}
\chapter{Vectorruimtem}
\lipsum[1]
\end{document}选自:http://tex.stackexchange.com/questions/215715/chapter-template


发表评论 取消回复