-
Notifications
You must be signed in to change notification settings - Fork 2
/
cls_chapter.tex
125 lines (112 loc) · 4.53 KB
/
cls_chapter.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
\newcommand{\pchap}[3]{\chapter{#1}}
\definecolor{nicered}{rgb}{.647,.129,.149}
\usepackage{wallpaper}
\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=2pt%
\colorbox{nicered}{\color{white}\thechapter}%
}\kern+.5cm%
\HUGE\quad\quad{\kern-1.75cm\lower-1cm\hbox{\quad\quad}}%
}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{redphage}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\so}
\renewcommand\chaptitlefont{\HUGE\bfseries\scshape\color{nicered}}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{\ThisULCornerWallPaper{1}{images/chapter-header.png}}
\renewcommand\printchapternum{\raggedleft\feline@chm[2cm]}%size of the box
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedright ##1\par}
}
\makeatother
\chapterstyle{redphage}
%\definecolor{caf0000}{RGB}{175,0,0}
%\definecolor{c840000}{RGB}{132,0,0}
%\definecolor{c8d0000}{RGB}{141,0,0}
%\definecolor{c5d0000}{RGB}{93,0,0}
%\definecolor{cb10000}{RGB}{177,0,0}
%\definecolor{ca90000}{RGB}{169,0,0}
%\definecolor{cc10000}{RGB}{193,0,0}
%\definecolor{c6e0000}{RGB}{110,0,0}
%\definecolor{cd50000}{RGB}{213,0,0}
%\definecolor{ce80000}{RGB}{232,0,0}
%\newcommand*\chapterlabel{}
%\titleformat{\chapter}
%{\gdef\chapterlabel{}
%\normalfont\sffamily\Huge\bfseries\scshape}
%{\gdef\chapterlabel{\thechapter\ }}{0pt}
%{\begin{tikzpicture}[remember picture,overlay]
%\node[yshift=-3cm] at (current page.north west)
%{ \begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
%\begin{scope}[]
%\begin{scope}[cm={{0.0,0.33718,-0.33718,0.0,(320.71429,664.92532)}}]
%\path[draw=black,fill=caf0000,line join=round,line width=1.600pt]
%(42.5325,-80.9017) -- (-42.5325,-80.9017) -- (42.5325,-50.0000) -- cycle;
%\path[draw=black,fill=c840000,line join=round,line width=1.600pt]
%(95.1057,0.0000) -- (42.5325,-80.9017) -- (42.5325,-50.0000) -- cycle;
%\path[draw=black,fill=c8d0000,line join=round,line width=1.600pt]
%(95.1057,0.0000) -- (42.5325,-50.0000) -- (42.5325,50.0000) -- cycle;
%\path[draw=black,fill=c5d0000,line join=round,line width=1.600pt]
%(95.1057,0.0000) -- (42.5325,50.0000) -- (42.5325,80.9017) -- cycle;
%\path[draw=black,fill=cb10000,line join=round,line width=1.600pt]
%(-42.5325,80.9017) -- (-42.5325,0.0000) -- (-95.1057,0.0000) -- cycle;
%\path[draw=black,fill=ca90000,line join=round,line width=1.600pt]
%(-42.5325,80.9017) -- (42.5325,50.0000) -- (-42.5325,0.0000) -- cycle;
%\path[draw=black,fill=cc10000,line join=round,line width=1.600pt]
%(42.5325,-50.0000) -- (-42.5325,0.0000) -- (42.5325,50.0000) -- cycle;
%\path[draw=black,fill=c6e0000,line join=round,line width=1.600pt]
%(42.5325,50.0000) -- (-42.5325,80.9017) -- (42.5325,80.9017) -- cycle;
%\path[draw=black,fill=cd50000,line join=round,line width=1.600pt]
%(-42.5325,0.0000) -- (-42.5325,-80.9017) -- (-95.1057,0.0000) -- cycle;
%\path[draw=black,fill=ce80000,line join=round,line width=1.600pt]
%(-42.5325,0.0000) -- (42.5325,-50.0000) -- (-42.5325,-80.9017) -- cycle;
%\end{scope}
%\path[fill=black,rounded corners=0.0000cm] (308.4312,691.4184) rectangle
%(335.8876,732.3622);
%\end{scope}
%\end{tikzpicture}
%\begin{tikzpicture}[remember picture, overlay]
%%\draw[fill=nicered] (0,0) rectangle
%% (\paperwidth,3cm);
%\node[anchor=west,xshift=.9\paperwidth,rectangle]
%{#1};
%\node[anchor=east,xshift=.9\paperwidth,rectangle]
%{\chapterlabel};
%\end{tikzpicture}
%};
%\end{tikzpicture}
%}
%\titlespacing*{\chapter}{0pt}{50pt}{0pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Background images
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{eso-pic}
%\newcommand\BackgroundPicA{
%\put(0,0){
%\parbox[b][\paperheight]{\paperwidth}{%
%\vfill
%\centering
%\includegraphics[width=\paperwidth,height=\paperheight,
%keepaspectratio]{background.png}%
%\vfill
%}}}
%\newcommand\BackgroundPicB{ %\put(0,0){
%\parbox[b][\paperheight]{\paperwidth}{%
%\vfill
%\centering
%\includegraphics[width=\paperwidth,height=\paperheight,
%keepaspectratio]{background2.png}%
%\vfill
%}}}