-
Notifications
You must be signed in to change notification settings - Fork 24
/
beamerinnerthemeblockborder.sty
78 lines (74 loc) · 2.35 KB
/
beamerinnerthemeblockborder.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
% sets the block environment to have borders
% this modifies the default definition in beamerinnerthemedefault.sty
% the effect is achieved using nested beamercolorboxes
% it may be possible to do this in a simpler manner using the
% tcolorbox package
\defbeamertemplateparent{blocks}[bordered]{block begin,block end,%
block alerted begin,block alerted end,%
block example begin,block example end}{}
% Standard block
\defbeamertemplate*{block begin}{bordered}{%
\par\vskip\medskipamount%
% border box
\begin{beamercolorbox}[colsep*=1.25ex]{block title}%
% title box
\vskip-1ex
\begin{beamercolorbox}[colsep*=0.75ex,dp=0ex]{block title}%
\usebeamerfont*{block title}\insertblocktitle\par%
\end{beamercolorbox}%
{\parskip0pt\par}%
% body box
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=0.75ex]{block body}
{\parskip0pt\par}%
}
\defbeamertemplate*{block end}{bordered}{%
\end{beamercolorbox}%
\vskip-0.75ex%
\end{beamercolorbox}%
\vskip\smallskipamount%
}
% Alerted block
\defbeamertemplate*{block alerted begin}{bordered}{%
\par\vskip\medskipamount%
% border box
\begin{beamercolorbox}[colsep*=1.25ex]{block title alerted}%
% title box
\vskip-1ex
\begin{beamercolorbox}[colsep*=0.75ex,dp=0ex]{block title alerted}%
\usebeamerfont*{block title alerted}\insertblocktitle\par%
\end{beamercolorbox}%
{\parskip0pt\par}%
% body box
\usebeamerfont{block body alerted}%
\begin{beamercolorbox}[colsep*=0.75ex]{block body alerted}
{\parskip0pt\par}%
}
\defbeamertemplate*{block alerted end}{bordered}{%
\end{beamercolorbox}%
\vskip-0.75ex%
\end{beamercolorbox}%
\vskip\smallskipamount%
}
% Example block
\defbeamertemplate*{block example begin}{bordered}{%
\par\vskip\medskipamount%
% border box
\begin{beamercolorbox}[colsep*=1.25ex]{block title example}%
% title box
\vskip-1ex
\begin{beamercolorbox}[colsep*=0.75ex,dp=0ex]{block title example}%
\usebeamerfont*{block title example}\insertblocktitle\par%
\end{beamercolorbox}%
{\parskip0pt\par}%
% body box
\usebeamerfont{block body example}%
\begin{beamercolorbox}[colsep*=0.75ex]{block body example}
{\parskip0pt\par}%
}
\defbeamertemplate*{block example end}{bordered}{%
\end{beamercolorbox}%
\vskip-0.75ex%
\end{beamercolorbox}%
\vskip\smallskipamount%
}