-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathTemplate.tex
76 lines (62 loc) · 1.55 KB
/
Template.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
\usepackage{xcolor}
\definecolor{Sumire}{RGB}{102,50,124}
\definecolor{Shion}{RGB}{143,119,181}
\usepackage{titlesec}
\usepackage{titleps}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand{\chapnumfont}{%
\fontsize{100}{100}\usefont{T1}{ptm}{b}{n}%
}
\colorlet{chapbgcolor}{gray!75}
\colorlet{chapnumcolor}{black!60}
\newcommand{\chaptitlenumbered}[1]{%
\begin{tikzpicture}
\fill[chapbgcolor!70,rounded corners=0pt] (0,2.3) rectangle (\linewidth,0);
\node[
align=right,
anchor=south east,
inner sep=8pt,
font=\huge\normalfont\bfseries
] at (0.987\linewidth,0) {\strut#1};
\node[
align=right,
font=\fontsize{60}{62}\usefont{OT1}{ptm}{b}{it},
text=chapnumcolor
] at (0.975\linewidth,2.3) {\thechapter};
\end{tikzpicture}%
}
\newcommand{\chaptitleunnumbered}[1]{%
\begin{tikzpicture}
\fill[chapbgcolor!70,rounded corners=0pt] (0,2.3) rectangle (\linewidth,0);
\node[
align=right,
anchor=south east,
inner sep=8pt,
font=\huge\normalfont\bfseries
] at (0.987\linewidth,0) {\strut#1};
\end{tikzpicture}%
}
\usepackage{titlesec}
\titleformat{name=\chapter}[display]
{\normalfont\huge\bfseries\sffamily}
{}
{40pt}
{\chaptitlenumbered}
\titleformat{name=\chapter,numberless}[display]
{\normalfont\huge\bfseries\sffamily}
{}
{25pt}
{\chaptitleunnumbered}
\titlespacing*{\chapter}
{0pt}
{-126pt}
{33pt}
\titleformat{\section}
{\normalfont\centering\zihao{4}\bfseries}
{{\mdseries\S}\ \thesection}{.5em}{}
\setlength\headheight{15pt}
\usepackage{dsfont}
\renewcommand{\baselinestretch}{1.5}
\renewcommand\sectionmark[1]{%
\markright{\thesection\quad #1}}