This repository has been archived by the owner on Dec 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
beamerinnerthemeinmargin-with-block-body-bg.sty
159 lines (140 loc) · 5.24 KB
/
beamerinnerthemeinmargin-with-block-body-bg.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
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
148
149
150
151
152
153
154
155
156
157
158
159
\mode<presentation>
\setbeamercolor*{sidebar}{parent=block title}
\setbeamercolor{local structure}{parent=sidebar}
\setbeamercolor{section in toc}{parent=sidebar}
\setbeamercolor{button}{use=structure,bg=structure.fg!50!bg,fg=white}
\setbeamercolor{block title alerted}{use=sidebar,fg=sidebar.fg!25!red}
\setbeamercolor{block title example}{use=sidebar,fg=sidebar.fg!50!green}
\setbeamercolor*{title}{parent=structure}
\setbeamersize{text margin left=1.5ex}
\setbeamersize{text margin right=1.5ex}
\setbeamersize{sidebar width left=.25\paperwidth}
\setbeamersize{description width=0pt}
\setlength\leftmargini{0pt}
\setlength\leftmarginii{1.5ex}
\setlength\leftmarginiii{1.5ex}
\newenvironment{beamer@nomargin}{%
\hskip-.20\paperwidth%
\begin{beamercolorbox}[wd=0.9\paperwidth]{sidebar}%
\setlength{\linewidth}{0.88\paperwidth}%
}{%
\end{beamercolorbox}%
}
\newcommand\beamer@putleft[2]{%
\hbox to 0pt{\hss\vtop{%
\normalsize%
\@tempdima=.25\paperwidth%
\advance\@tempdima by-3ex%
\hsize=\@tempdima%
\leftskip=0pt plus 1fill%
\rightskip=0pt\relax%
\leavevmode#1}\kern#2}%
}
\newenvironment{beamer@putright}{\vtop\bgroup\leavevmode}{\egroup}
\defbeamertemplate*{section in toc}{inmargin}
{
\leavevmode%
\beamer@putleft{\usebeamercolor[fg]{section in sidebar}\inserttocsectionnumber\strut}{2.5ex}%
\beamer@putright%
\inserttocsection%
\endbeamer@putright
}
\defbeamertemplate*{subsection in toc}{inmargin}
{\leavevmode%
\inserttocsubsection\par\vskip.5ex}
\defbeamertemplate*{subsubsection in toc}{inmargin}
{\leavevmode%
\inserttocsubsubsection\par\vskip.5ex}
\def\inserttitleindicator{}
\def\insertauthorindicator{Who?}
\def\insertinstituteindicator{From?}
\def\insertdateindicator{When?}
\defbeamertemplate*{title page}{inmargin}
{
\begin{block}{\inserttitleindicator}
\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle\par
\usebeamercolor[fg]{subtitle}\usebeamerfont{subtitle}\insertsubtitle
\end{block}
\vfill
\ifx\insertauthor\@empty
\else
\begin{block}{\insertauthorindicator}
\usebeamercolor[fg]{author}\usebeamerfont{author}\insertauthor\par
\end{block}
\fi
\ifx\insertinstitute\@empty
\else
\begin{block}{\insertinstituteindicator}
\usebeamercolor[fg]{institute}\usebeamerfont{institute}\insertinstitute\par
\end{block}
\fi
\ifx\insertdate\@empty
\else
\begin{block}{\insertdateindicator}
\usebeamercolor[fg]{date}\usebeamerfont{date}\insertdate\par
\end{block}
\fi
}
\defbeamertemplate*{block begin}{inmargin}
{
\par\vskip\medskipamount%
\leavevmode%
\beamer@putleft{\normalfont{\usebeamercolor[fg]{block title}\usebeamerfont*{block title}\insertblocktitle}}{2.5ex}%
\beamer@putright\usebeamercolor[fg]{block body}%
\usebeamerfont{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-1.75ex}{\vskip-2ex}%
\begin{beamercolorbox}[colsep*=.70ex,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{}{\vskip-.25ex}%
}
\defbeamertemplate*{block end}{inmargin}
{
\ifbeamercolorempty[bg]{block body}{}{\vskip-.25ex}%
\end{beamercolorbox}%
\endbeamer@putright\vskip\smallskipamount%
}
\defbeamertemplate*{block alerted begin}{inmargin}
{
\par\vskip\medskipamount%
\leavevmode%
\beamer@putleft{\normalfont{\usebeamercolor[fg]{block title alerted}\usebeamerfont*{block title alerted}\insertblocktitle}}{2.5ex}%
\beamer@putright\usebeamercolor{block body alerted}%
\usebeamerfont{block body alerted}%
\ifbeamercolorempty[bg]{block body alerted}{\vskip-1.75ex}{\vskip-2ex}%
\begin{beamercolorbox}[colsep*=.70ex,vmode]{block body alerted}%
\ifbeamercolorempty[bg]{block body alerted}{}{\vskip-.25ex}%
}
\defbeamertemplate*{block alerted end}{inmargin}
{
\ifbeamercolorempty[bg]{block body}{}{\vskip-.25ex}%
\end{beamercolorbox}%
\endbeamer@putright\vskip\smallskipamount%
}
\defbeamertemplate*{block example begin}{inmargin}
{
\par\vskip\medskipamount%
\leavevmode%
\beamer@putleft{\normalfont{\usebeamercolor[fg]{block title example}\usebeamerfont*{block title example}\insertblocktitle}}{2.5ex}%
\beamer@putright\usebeamercolor{block body example}%
\usebeamerfont{block body example}%
\ifbeamercolorempty[bg]{block body example}{\vskip-1.75ex}{\vskip-2ex}%
\begin{beamercolorbox}[colsep*=.70ex,vmode]{block body example}%
\ifbeamercolorempty[bg]{block body example}{}{\vskip-.25ex}%
}
\defbeamertemplate*{block example end}{inmargin}
{
\ifbeamercolorempty[bg]{block body}{}{\vskip-.25ex}%
\end{beamercolorbox}%
\endbeamer@putright\vskip\smallskipamount%
}
\AtBeginDocument
{
\addtobeamertemplate{enumerate item}{\llap\bgroup}{\normalsize\kern1.5ex\egroup}
\addtobeamertemplate{enumerate subitem}{\llap\bgroup}{\normalsize\kern1.5ex\kern\leftmarginii\egroup}
\addtobeamertemplate{enumerate subsubitem}{\llap\bgroup}{\normalsize\kern1.5ex\kern\leftmarginii\kern\leftmarginiii\egroup}
\addtobeamertemplate{itemize item}{\llap\bgroup}{\normalsize\kern1.5ex\egroup}
\addtobeamertemplate{itemize subitem}{\llap\bgroup}{\normalsize\kern1.125ex\kern\leftmarginii\egroup}
\addtobeamertemplate{itemize subsubitem}{\llap\bgroup}{\small\kern0.75ex\kern\leftmarginii\kern\leftmarginiii\egroup}
\addtobeamertemplate{description item}{\llap\bgroup\usebeamercolor[fg]{section in sidebar}\small}{\kern1.125ex\egroup}
}
\mode
<all>