-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathchezb.sty
121 lines (102 loc) · 3.91 KB
/
chezb.sty
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
\ProvidesPackage{chezb}[2017/09/09]
\usepackage{amsmath, amssymb, amsthm}
% We include "chez" in all of these to make sure
% that they do not conflict with any other packages
\newif\ifchezsetup \chezsetuptrue
\newif\ifchezshorts \chezshortstrue
\newif\ifchezasy \chezasytrue
\DeclareOption{nosetup}{\chezasyfalse}
\DeclareOption{noshortcuts}{\chezshortsfalse}
\DeclareOption{noasy}{\chezasyfalse}
\DeclareOption{noauthor}{\chezauthorfalse}
\DeclareOption{nodate}{\chezdatefalse}
\newif\ifchezbeamernobutton \chezbeamernobuttontrue
\newif\ifchezbeamernice \chezbeamernicetrue
\newif\ifchezallsmallcaps \chezallsmallcapstrue
\newif\ifchezthm \chezthmtrue
\DeclareOption{buttons}{\chezbeamernobuttonfalse}
\DeclareOption{nobeamernice}{\chezbeamernicefalse}
\DeclareOption{noallsmallcaps}{\chezallsmallcapsfalse}
\DeclareOption{nothms}{\chezthmfalse}
\ProcessOptions\relax
\usepackage{chezbase}
\ifchezsetup
\ifchezbeamernobutton
\beamertemplatenavigationsymbolsempty
\fi
\ifchezthm
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{answer}[theorem]{Answer}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{idea}[theorem]{Idea}
\newtheorem{question}[theorem]{Question}
\definecolor{chezdarkred}{rgb}{0.523, 0.148, 0.148}
\definecolor{chezpalered}{rgb}{0.949, 0.910, 0.910}
\definecolor{chezdarkblue}{rgb}{0.148, 0.148, 0.523}
\definecolor{chezpaleblue}{rgb}{0.910, 0.910, 0.949}
\definecolor{chezdarkgreen}{rgb}{0.148, 0.523, 0.148}
\definecolor{chezpalegreen}{rgb}{0.910, 0.949, 0.910}
\AtBeginEnvironment{theorem}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{lemma}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{proposition}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{corollary}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{conjecture}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{definition}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{example}{
\setbeamercolor{block title example}{fg=white, bg=chezdarkgreen}
\setbeamercolor{block body example}{fg=black, bg=chezpalegreen}
}
\AtBeginEnvironment{proof}{
\setbeamercolor{block title}{fg=white, bg=chezdarkblue}
\setbeamercolor{block body}{fg=black, bg=chezpaleblue}
}
\AtBeginEnvironment{alert}{
\setbeamercolor{block title alert}{fg=white, bg=chezdarkred}
\setbeamercolor{block body alert}{fg=black, bg=chezpalered}
}
\fi
\ifchezbeamernice
\IfFileExists{beamerthememetropolis.sty}{
\usepackage[sfdefault, lf]{FiraSans}
\usetheme[block=fill, background=dark]{metropolis}
\ifchezallsmallcaps
\metroset{titleformat = allsmallcaps}
\setbeamerfont{title}{size=\Large, series=\mdseries}
\setbeamerfont{section title}{size=\Large, series=\mdseries}
\setbeamerfont{block title}{size=\normalsize, series=\mdseries}
\setbeamerfont{block title alerted}{size=\normalsize, series=\mdseries}
\setbeamerfont{frametitle}{size=\large, series=\mdseries}
\setbeamerfont{caption name}{series=\mdseries}
\setbeamerfont{description item}{series=\mdseries}
\setbeamerfont{standout}{size=\Large, series=\mdseries}
\fi
}{
\usetheme{Rochester}
\usecolortheme{whale}
}
\else
\usetheme{Rochester}
\usecolortheme{whale}
\fi
\fi