-
Notifications
You must be signed in to change notification settings - Fork 64
/
beamerouterthemesjtubeamer.sty
145 lines (145 loc) · 4.97 KB
/
beamerouterthemesjtubeamer.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
%%
%% This is file `beamerouterthemesjtubeamer.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% beamerouterthemesjtubeamer.dtx (with options: `package')
%% ------------------------------------------------------------------------
%% Copyright (C) 2021-2024 SJTUG
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%% ------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerouterthemesjtubeamer}[2024/12/21 v3.1.1 sjtubeamer outer theme]
\RequirePackage{sjtuvi}
\DefineOption{outer}{nav}{miniframes}
\DefineOption{outer}{nav}{infolines}
\DefineOption{outer}{nav}{sidebar}
\DefineOption{outer}{nav}{default}
\DefineOption{outer}{nav}{smoothbars}
\DefineOption{outer}{nav}{split}
\DefineOption{outer}{nav}{shadow}
\DefineOption{outer}{nav}{tree}
\DefineOption{outer}{nav}{smoothtree}
\ExecuteOptionsBeamer{miniframes}
\DefineOption{outer}{logopos}{topright}
\DefineOption{outer}{logopos}{bottomright}
\ExecuteOptionsBeamer{bottomright}
\ProcessOptionsBeamer
\beamer@compresstrue
\if\EqualOption{outer}{logopos}{topright}
\AtBeginDocument{
\defbeamertemplate*{frametitle}{sjtubeamer}[1][]
{%
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[sep=0.15cm,leftskip=0.15cm,#1,wd=\the\@tempdima]{frametitle}
\begingroup
\usebeamerfont{frametitle}
\vbox{}
\ifx\insertframesubtitle\@empty\vskip-0.5ex%
\else\vskip-0.7ex\fi%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
\strut\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{
\usebeamerfont{framesubtitle}
\usebeamercolor[fg]{framesubtitle}
\strut\insertframesubtitle\strut\par
}%
\fi
}%
\vskip-1.07ex%
\endgroup%
\raggedleft%
\begingroup
\ifx\insertframesubtitle\@empty\vskip-2.2ex%
\else\vskip-3.05ex\fi%
\resizebox{!}{3ex}{\vphantom{-}\usebeamertemplate{logo}}\hspace*{10pt}%
\endgroup%
\ifx\insertframesubtitle\@empty%
\else\vskip0.75ex\fi%
\if@tempswa\else\vskip-.3cm\fi%
\end{beamercolorbox}%
}
}
\if\EqualOption{outer}{nav}{default}
\AtBeginDocument{
\setbeamertemplate{frametitle}[sjtubeamer][leftskip=0cm,sep=0.3cm]
}
\fi
\fi
\if\EqualOption{outer}{nav}{miniframes}
\useoutertheme[footline=institutetitle]{miniframes}
\else\if\EqualOption{outer}{nav}{sidebar}
\useoutertheme{sidebar}
\logo{\resizebox{!}{1cm}{\sjtubadge}}
\def\sjtubeamer@outer@logopos{topright}
\AtBeginDocument{
\setbeamertemplate{frametitle}[sidebar theme]
}
\else
\useoutertheme{\sjtubeamer@outer@nav}
\setbeamercolor{title in head/foot}{use=structure,bg=white,fg=structure.fg}
\fi\fi
\if\EqualOption{outer}{nav}{default}
\setbeamercolor{frametitle}{use=palette primary,
bg=palette primary.bg,fg=palette primary.fg}
\else\if\EqualOption{outer}{nav}{infolines}
\setbeamercolor{author in head/foot}{use=structure,fg=white,bg=structure}
\setbeamercolor{title in head/foot}{use=structure,fg=structure,bg=structure!10}
\setbeamercolor{date in head/foot}{use=structure,fg=structure,bg=structure!20}
\setbeamercolor{section in head/foot}{parent=author in head/foot}
\setbeamercolor{subsection in head/foot}{parent=date in head/foot}
\setbeamersize{text margin left=1cm,text margin right=1cm}
\else
\setbeamercolor{frametitle}{use=titlelike,bg=white,fg=titlelike.fg}
\setbeamercolor{frametitle right}{parent=subsection in head/foot}
\fi\fi
\setbeamertemplate{sidebar right}{}
\addtobeamertemplate{navigation symbols}{}{
\hbox{
\raisebox{1.2pt}[0pt][0pt]{
\usebeamerfont{footline}
\usebeamercolor{footline}
\color{footline.fg!50}
\insertframenumber/\inserttotalframenumber
\hspace*{0.2em}
}
}
}
\if\EqualOption{outer}{logopos}{bottomright}
\addtobeamertemplate{footline}{
\hfill%
\usebeamertemplate***{navigation symbols}%
\llap{\raisebox{1pc}[0pt][0pt]{\insertlogo}}
\hspace*{0.1cm}\par
\vskip 4pt
}{}
\else
\addtobeamertemplate{footline}{
\hfill%
\usebeamertemplate***{navigation symbols}%
\hspace*{0.1cm}\par
\vskip 4pt
}{}
\fi
\setbeamertemplate{page number in head/foot}{}
\endinput
%%
%% End of file `beamerouterthemesjtubeamer.sty'.