-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nostalgia.cls
executable file
·113 lines (97 loc) · 3.4 KB
/
Nostalgia.cls
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
% Author: Windabove
\ProvidesClass{Nostalgia}[Nostalgia Note v1.1]
\NeedsTeXFormat{LaTeX2e}
\LoadClass{article}
\RequirePackage[margin=1in, a4paper]{geometry}
\RequirePackage{unicode-math}
\RequirePackage{fontspec}
\setmathfont{STIX Two Math}
\RequirePackage{newtxtext}
\RequirePackage[dvipsnames]{xcolor}
\RequirePackage{tcolorbox}
\tcbuselibrary{many}
\pagecolor{GreenYellow!20!White!40}
\linespread{1.3}
\setlength{\parskip}{3mm}
\setlength{\parindent}{2em}
\RequirePackage{titlesec}
\newcommand{\ruleafter}{\rule[2ex]{100mm}{1pt}}
\titleformat{\section}{\normalfont\Large\bfseries\color{Cyan}}{\thesection}{1em}{}[\ruleafter]
\titleformat*{\subsection}{\normalfont\large\bfseries\color{Cyan}}
\titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\color{Cyan}}
\newtcbtheorem[number within=section]{tcbTheorem}{Theorem}{
enhanced,
breakable,
before skip=5mm, after skip=5mm,
arc=0.8mm, boxrule=1pt,
colframe=RoyalPurple!55!Aquamarine!100,
colback=SeaGreen!10!CornflowerBlue!10,
colbacktitle=RoyalPurple!55!Aquamarine!100,
fonttitle=\bfseries,
attach boxed title to top left={yshift=-1pt},
boxed title style={
skin=enhancedfirst jigsaw,
arc=1mm, bottom=0mm, boxrule=0mm
},
sharp corners=northwest
}{the}
\newtcbtheorem[number within=section]{tcbLemma}{Lemma}{
enhanced,
before skip=5mm, after skip=5mm,
arc=0.8mm, boxrule=1pt,
colframe=Purple!100!Peach!40,
colback=Violet!100!Yellow!10,
colbacktitle=Purple!100!Peach!40,
fonttitle=\bfseries,
attach boxed title to top left={yshift=-1pt},
boxed title style={
skin=enhancedfirst jigsaw,
arc=1mm, bottom=0mm, boxrule=0mm
},
sharp corners=northwest
}{lem}
\newtcbtheorem[number within=section]{tcbCorollary}{Corollary}{
enhanced,
before skip=5mm, after skip=5mm,
arc=0.8mm, boxrule=1pt,
colframe=Tan!50!Red!50,
colback=Red!70!Yellow!10,
colbacktitle=Tan!50!Red!50,
fonttitle=\bfseries,
attach boxed title to top left={yshift=-1pt},
boxed title style={
skin=enhancedfirst jigsaw,
arc=1mm, bottom=0mm, boxrule=0mm
},
sharp corners=northwest
}{lem}
\newtcbtheorem[number within=section]{tcbDefinition}{Definition}{
enhanced,
before skip=5mm, after skip=5mm,
colframe=Bittersweet!100!Yellow!20,
colback=Goldenrod!50!Dandelion!10,
coltitle=Sepia!100!YellowOrange!70,
fonttitle=\bfseries,
boxrule=1pt
}{def}
\newtcbtheorem[number within=section]{tcbRemark}{Remark}{
enhanced,
before skip=5mm, after skip=5mm,
boxrule=0.4pt,
colback=Yellow!20!Green!10,
colframe=Green!40!Black,
sharp corners,
drop fuzzy shadow
}{rem}
\RequirePackage{amsthm}
\renewcommand{\proofname}{\textbf{Proof}}
\renewcommand{\qedsymbol}{$\mdblksquare$}
\RequirePackage{xparse}
\NewDocumentEnvironment{theorem}{ O{} O{} }{\begin{tcbTheorem}{#1}{#2}}{\end{tcbTheorem}}
\NewDocumentEnvironment{lemma}{ O{} O{} }{\begin{tcbLemma}{#1}{#2}}{\end{tcbLemma}}
\NewDocumentEnvironment{corollary}{ O{} O{} }{\begin{tcbCorollary}{#1}{#2}}{\end{tcbCorollary}}
\NewDocumentEnvironment{definition}{ O{} O{} }{\begin{tcbDefinition}{#1}{#2}}{\end{tcbDefinition}}
\NewDocumentEnvironment{remark}{ O{} O{} }{\begin{tcbRemark}{#1}{#2}}{\end{tcbRemark}}
\RequirePackage[shortlabels, inline]{enumitem}
\setlist{nolistsep}
\NewDocumentEnvironment{steps}{ O{Step} }{\begin{enumerate}[label=\textbf{#1 \arabic*}]}{\end{enumerate}}