-
Notifications
You must be signed in to change notification settings - Fork 2
/
mh-summary-sheets.cls
147 lines (116 loc) · 4.79 KB
/
mh-summary-sheets.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mh-summary-sheets}[2012/10/04 Summary-sheets Class]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Class Options %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{kvoptions}
\SetupKeyvalOptions{prefix=option@}
\DeclareStringOption{slides}
\ProcessKeyvalOptions*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Class %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\LoadClassWithOptions{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{beamerarticle,pgf}
\RequirePackage{environ}
\RequirePackage{ifthen}
\RequirePackage{etoolbox}
\RequirePackage{sectsty}
\RequirePackage{url}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title Information at Beginning of Document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AfterEndPreamble{\maketitle}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Semisection (see mh-slides.cls) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\semisection}[1]{\section*{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Summary Environment (see mh-slides.cls) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newlength{\normalparindent}
\setlength{\normalparindent}{\parindent}
\def\IsNumber#1{%
TT\fi
\ifcat_\ifnum0<0#1 _\else A\fi
}
\newenvironment{summary}[1][1]{
\noindent\begin{minipage}[t]{0.39\linewidth}
\setlength\fboxsep{0pt}
\vspace{0pt}\fbox{\includeslide[width=\linewidth]{%
\if\IsNumber{#1}%
\SlideLabel<#1>%
\else%
#1%
\fi%
}}
\end{minipage}
\hfill
\begin{minipage}[t]{0.58\linewidth}\vspace{.5ex}
\setlength{\parindent}{\normalparindent}
\noindent\ignorespaces
}{ % BODY
\end{minipage}\vspace{2ex}
}
\newcommand{\@showSlide}[2]{
\noindent\begin{minipage}[t]{0.315\linewidth}
\setlength\fboxsep{0pt}
\vspace{0pt}\fbox{\includeslide[width=\linewidth]{%
\if\IsNumber{#1}%
#2<#1>%
\else%
#1%
\fi%
}}
\end{minipage}
}
\newcommand{\showPreviousPreviousSlide}[1][1]{
\@showSlide{#1}{\PreviousPreviousSlideLabel}
}
\newcommand{\showPreviousSlide}[1][1]{
\@showSlide{#1}{\PreviousSlideLabel}
}
\newcommand{\showThisSlide}[1][1]{
\@showSlide{#1}{\SlideLabel}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Slide Environment (see mh-slides.cls) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{SlideNumber}
\xdef\SlideLabel{NO SLIDES YET}
\xdef\PreviousSlideLabel{NO TWO SLIDES YET}
\xdef\PreviousPreviousSlideLabel{NO THREE SLIDES YET}
\NewEnviron{slide}[1][automaticLabelName]{
\xdef\PreviousPreviousSlideLabel{\PreviousSlideLabel}
\xdef\PreviousSlideLabel{\SlideLabel}
\ifthenelse{\equal{#1}{automaticLabelName}}{
\xdef\SlideLabel{slide\arabic{SlideNumber}}
}{
\xdef\SlideLabel{#1}
}
\stepcounter{SlideNumber}
}
\newcommand{\repeatslide}[2][1]{}
\newcommand{\repeatoverlay}[1]{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Point to Slides PDF File %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setjobnamebeamerversion{\option@slides}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Reduce Page Margins %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[margin=0.5in]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Underline Section Headers %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\sectionfont{\sectionrule{0pt}{0pt}{-1ex}{1pt}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Remove Page Numbers %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\let\ps@plain\ps@empty
\makeatother
\pagestyle{empty}