-
Notifications
You must be signed in to change notification settings - Fork 18
/
beamerouterthemescu.sty
557 lines (524 loc) · 22.2 KB
/
beamerouterthemescu.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
% This is file `beamerouterthemescu.sty'.
% Copyright (C) 2021-2024 by Linrong Wu.
% Version: 2024/10/31 v1.3e (Original Version: 2024/04/16 v1.3c).
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
%
% 本文件为 SCU_Beamer_Slide-demo 外部主题宏包文件.
% !请勿轻易改动此文档中代码.
%%%% ----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{beamerouterthemescu}[2024/10/31 v1.3e, SCU Beamer Theme(Outer Theme)]
%%%% ----------------------------------------------------------------
% ----------------
% Declare of Options
% Confirmed in v1.3e(2024/10/31).
% Established in v1.3c(2024/04/16), v1.3e(2024/10/31).
% ----------------
% CMD:: \DeclareOptionBeamer - 声明参数.
% CMD:: \ExecuteOptionsBeamer - 预执行参数.
% CMD:: \ProcessOptionsBeamer - 处理参数.
% ----------------
% KEY:: Miniframes.
% VALUE:: follow | separate | negate.
\DeclareOptionBeamer{Miniframes}{\def\beamer@scu@Miniframes{#1}}
% KEY:: NavigationTool.
% VALUE:: negate | 1 | 2 | 3 | 1-2 | 1-3 | 2-3 | 1-2-3.
\DeclareOptionBeamer{NavigationTool}{\def\beamer@scu@NavigationTool{#1}}
\ExecuteOptionsBeamer{%
Miniframes=follow,%
NavigationTool=1-2-3%
}
\ProcessOptionsBeamer
% ----------------
% ----------------
% Declare of Packages
% Confirmed in v1.3d(2024/05/18).
% Established in v1.3c(2024/04/16).
% Updated in v1.3d(2024/05/18).
% ----------------
% CMD:: \usetikzlibrary - 调用 TikZ 库.
% ----------------
% \usetikzlibrary{positioning, calc}
\usetikzlibrary{calc}
% ----------------
\mode<presentation>
% ----------------
% Beamer Theme Headline Layout
% Confirmed in v1.3e(2024/10/31).
% Established in v1.0a(2021/12/03).
% Updated in v1.2a(2022/03/10), v1.3a(2022/03/16), v1.3b(2022/04/13), v1.3c(2024/04/16), v1.3d(2024/05/18), v1.3e(2024/10/31).
% ----------------
% 于 v1.3c(2024/04/16) 与 Headline TikZ 绘图部分合并, 强化代码关联度.
% 于 v1.3e(2024/10/31) 修改 beamerthemescu.sty 中 Miniframe Layout 并合并于此.
% ----------------
% CMD:: \newdimen - 创建长度寄存器.
% CMD:: \newsavebox - 创建盒子.
% ----------------
% FORMAT:: section [cn - ALL; en - CURRENT] | subsection (with mini-frames).
% ----------------
% DIMEN:: 节导航栏宽度 - secbar.
\newdimen\beamer@scu@len@secbar
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\beamer@scu@len@secbar=0.64\paperwidth%
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\beamer@scu@len@secbar=0.52\paperwidth%
\fi\fi
% DIMEN:: 小节与标题间分隔线 - sectotitleline.
\newdimen\beamer@scu@len@sectotitleline
\beamer@scu@len@sectotitleline=\dimexpr\the\paperwidth-\beamer@scu@len@secbar-20pt\relax
% savebox 存储 TikZ Headline 背景底图绘图.
\newsavebox{\beamer@scu@headlinebox}
\sbox{\beamer@scu@headlinebox}{%
\begin{tikzpicture}%
% 绘图辅助节点定义.
\coordinate (LineNorthWest) at (0, -11pt);% 小节-标题分隔线 西北节点
\coordinate (LineSouthWest) at (0, -13pt);% 小节-标题分隔线 西南节点
\coordinate (LineSouthEast) at (\beamer@scu@len@sectotitleline, -13pt);% 小节-标题分隔线 东北节点
\coordinate (SecbarNorthEast) at (\the\paperwidth, 0);% 章节栏 东北节点
\coordinate (SecbarSouthEast) at (\the\paperwidth, -13pt);% 章节栏 东南节点
\coordinate (SecbarSouthWest) at ([xshift=-\beamer@scu@len@secbar]SecbarSouthEast);% 章节栏 西南节点
\coordinate (SecbarNorthWest) at ([xshift=-6.5pt, yshift=13pt]SecbarSouthWest);% 章节栏 西南节点
\coordinate (AdornDarkNorthWest) at ([xshift=-4pt]SecbarNorthWest);% 深色装饰 西北节点
\coordinate (AdornDarkSouthEast) at ([xshift=3.5pt, yshift=-7pt]SecbarNorthWest);% 深色装饰 东南节点
\coordinate (AdornLightNorthWest) at ([xshift=-4pt]AdornDarkSouthEast);% 浅色装饰 西北节点
\coordinate (AdornLightSouthEast) at ([xshift=2pt, yshift=-4pt]AdornDarkSouthEast);% 浅色装饰 东南节点
% 颜色图形绘制.
\fill[PrimaryC] (SecbarNorthEast) -- (SecbarSouthEast)%
-- (SecbarSouthWest) -- (SecbarNorthWest) -- cycle;% 章节栏背景
\fill[IntersperseC] (AdornDarkNorthWest) -- (SecbarNorthWest)%
-- (AdornDarkSouthEast) -- ++ (-4pt, 0) -- cycle;% 深色装饰
\fill[AuxiliaryC] (AdornLightNorthWest) -- (AdornDarkSouthEast)%
-- (AdornLightSouthEast) -- ++ (-4pt, 0) -- cycle;% 浅色装饰
\fill[PrimaryC] (LineNorthWest) -- (LineSouthWest)%
-- (LineSouthEast) -- ++ (-1pt, 2pt) -- cycle;% 小节与标题间分隔线
\end{tikzpicture}%
}%
% 插入章节栏水平导航.
\def\insert@secbar#1{%
% #1:: en LanguageMode 下尾部距离.
\usebeamerfont{section in head/foot}%
\usebeamercolor[fg]{section in head/foot}%
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\insertsectionnavigationhorizontal{\beamer@scu@len@secbar}{}{}%
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\insertsectionhead\hspace*{#1}%
\fi\fi%
}
% 插入小节标题.
\def\insert@subsec{%
\usebeamerfont{subsection in head/foot}%
\usebeamercolor[fg]{subsection in head/foot}%
\insertsubsectionhead%
}
% 插入小节迷你帧 [采用 \slideentry 方式生成].
%% 参考::
%% Beamer Class beamerbasenavigation.sty - definition of \slideentry
%% https://tex.stackexchange.com/questions/170122/simple-mini-frames-under-frame-title-beamer
%% https://tex.stackexchange.com/questions/23151/beamer-infolines-outer-theme-with-miniframe-bullets-only-for-the-current-section
%% https://tex.stackexchange.com/questions/308343/how-to-create-mini-sections-mini-subsections-and-mini-frames-in-beamer-presenta
\def\insert@subsecminiframes#1#2{%
% #1:: baselineskip.
% #2:: mini-frames space.
\setlength{\baselineskip}{#1}% 调整 baselineskip 以减小行间距
% \usebeamerfont{subsection in head/foot}% 注释 与上行冲突
\usebeamercolor[fg]{subsection in head/foot}%
\def\sectionentry##1##2##3##4##5{}%
\def\slideentry##1##2##3##4##5##6{%
%section number, subsection number, slide number, first/last frame, last subsection, part number
\ifnum##6=\c@part\ifnum##1=\c@section\ifnum##2>0\ifnum##3>0%
\beamer@link(##4){%
\usebeamerfont{mini frames}%
\ifnum\c@subsection=##2%
\usebeamercolor{mini frame}%
\ifnum\c@subsectionslide<##3%
\usebeamertemplate{mini frame in current subsection}%
\hskip#2%\beamer@minisliderowhilight%
\else%
\usebeamertemplate{mini frame}%
\hskip#2%\beamer@minislidehilight%
\fi%
\fi}%
\hskip0pt% 避免换行导致超链接中断
\fi\fi\fi\else%
\fakeslideentry{##1}{##2}{##3}{##4}{##5}{##6}%
\fi%
\ignorespaces%
}%
\setbox\beamer@sectionbox=\hbox{}%
\hskip0pt\dohead%
\box\beamer@sectionbox%
}
% 插入小节帧进度 [已废除 v1.3e(2024/10/31), 此处做整合存档].
%% 参考::
%% https://tex.stackexchange.com/questions/314847/beamer-theme-antibes-plus-navigation-bar-with-circles-for-subsections
% % 计数器 - 小节起始页.
% \newcount\beamer@subsectionstartframe%
% \beamer@subsectionstartframe=2%
% % 使用 etoolbox 宏包修改 `beamerbasesection.sty' 中 \beamer@subsection 命令.
% \apptocmd{\beamer@subsection}{%
% \addtocontents{nav}{\protect\headcommand{%
% \protect\beamer@subsectionframes{%
% \the\beamer@subsectionstartframe%
% }{\the\c@framenumber}%
% }}%
% }{}{}%
% \apptocmd{\beamer@subsection}{%
% \beamer@subsectionstartframe=\c@framenumber\relax%
% }{}{}%
% document 结束时设置 \headcommand 写入项. (\noexpand 表示不展开命令)
% \AtEndDocument{%
% \immediate\write\@auxout{\string\@writefile{nav}{%
% \noexpand\headcommand{%
% \noexpand\beamer@subsectionframes{%
% \the\beamer@subsectionstartframe%
% }{\the\c@framenumber}}%
% }}%
% }{}{}%
% % 定义小节结束页命令. (实际此处设置为后续小节起始帧, document 结束时设置为结束帧)
% \def\beamer@subsectionendframe{2}
% \def\beamer@subsectionframes#1#2{%
% \ifnum\c@framenumber<#1%
% \else%
% \ifnum\c@framenumber>#2%
% \else%
% \gdef\beamer@subsectionendframe{#2}%
% \fi%
% \fi%
% }% ------
% % 按照 beamer 方式储存命令.
% \newcommand\insertsubsectionendframe{\beamer@subsectionendframe}%
% % 计数器 - 小节中当前幻灯帧数.
% \newcounter{subsectioncurrentframe}%
% % 计数器 - 小节中总幻灯帧数.
% \newcounter{subsectiontotalframes}%
% % 长度 - 迷你帧间距.
% \newlength{\beamer@scu@miniframesspace}% ------
% \def\insertsubsectionminiframes#1#2#3{%
% % #1:: 迷你帧间距 - 小节幻灯帧数不大于10.
% % #2:: 迷你帧间距 - 小节幻灯帧数大于10且不大于15.
% % #3:: 迷你帧间距 - 小节幻灯帧数大于15.
% % 小节当前幻灯帧数设置.
% \setcounter{subsectioncurrentframe}{\insertframenumber}%
% \addtocounter{subsectioncurrentframe}{1}%
% \addtocounter{subsectioncurrentframe}{-\beamer@subsectionstartpage}%
% % 小节总幻灯帧数设置.
% \setcounter{subsectiontotalframes}{\insertsubsectionendframe}%
% \addtocounter{subsectiontotalframes}{0}%
% \addtocounter{subsectiontotalframes}{-\beamer@subsectionstartpage}%
% % 迷你帧间距设置.
% \ifnum\c@subsectiontotalframes>15%
% \setlength{\beamer@scu@miniframesspace}{#3}%
% \else\ifnum\c@subsectiontotalframes>10%
% \setlength{\beamer@scu@miniframesspace}{#2}%
% \else%
% \setlength{\beamer@scu@miniframesspace}{#1}%
% \fi\fi%
% % foreach 循环控制 mini-frames 输出.
% \ifnum\c@subsectiontotalframes>1%
% \foreach \i in {1,...,\c@subsectiontotalframes}{%
% \usebeamercolor{mini frame}%
% % 帧数小于当前帧, 则输出实心圆, 否则输出空心圆.
% \ifnum\i<\numexpr\c@subsectioncurrentframe+1%
% \usebeamertemplate{mini frame}%
% \else%
% \usebeamertemplate{mini frame in current section}%
% \fi%
% \ifnum\i<\c@subsectiontotalframes%
% \hskip\beamer@scu@miniframesspace%
% \fi%
% % \ifnum\i=\the\numexpr(\c@subsectiontotalframes+1)/2\relax%
% % \\[-3pt]%
% % \fi%
% }%
% \fi%
% }% ------
% \def\insert@miniframes{%
% \setlength{\baselineskip}{3.8pt}%
% % \usebeamerfont{subsection in head/foot}%
% \usebeamercolor[fg]{subsection in head/foot}%
% \insertsubsecminiframes{1.8pt}{1.5pt}{1.2pt}%
% }
% 页眉样式定义.
\def\beamer@scu@headline{%
\begin{tikzpicture}[overlay, remember picture]%
% 绘图辅助节点定义.
\coordinate (NorthEast) at (current page.north east);% 东北节点
\coordinate (NorthWest) at (current page.north west);% 西北节点
% 图形文字绘制.
\node[anchor=north west, inner sep=0pt, outer sep=0pt] at (NorthWest) {%
\usebox{\beamer@scu@headlinebox}};% 绘制 headline 背景底图
\node[left, inner sep=0pt, outer sep=0pt,%
yshift=-7pt] at (NorthEast) {\insert@secbar{9pt}};% 绘制章节栏水平导航
\node[right, inner sep=0pt, outer sep=0pt,%
xshift=9pt, yshift=-5.75pt] at (NorthWest) (Subsec) {\insert@subsec};% 绘制小节标题
\if\EqualOptionsBeamer{Miniframes}{follow}%
\path let \p{subsec} = (Subsec.east)%
in node[right, inner sep=0pt, outer sep=0pt,%
xshift=6pt, yshift=-.5pt] at (\p{subsec}) {\parbox{%
\dimexpr\beamer@scu@len@sectotitleline-\x{subsec}+4pt\relax}{\raggedright\insert@subsecminiframes{3.8pt}{1.6pt}}};% 绘制小节迷你帧
% \node[right=6pt of Subsec, inner sep=0pt, outer sep=0pt] {\insert@miniframes};% 绘制小节帧进度
\else\if\EqualOptionsBeamer{Miniframes}{separate}%
\node[anchor=north east, inner sep=0pt, outer sep=0pt,%
xshift=-7.2pt, yshift=-15pt] at (NorthEast) {%
\insert@subsecminiframes{3.8pt}{1.6pt}};% 绘制小节迷你帧
\else\if\EqualOptionsBeamer{Miniframes}{negate}%
\relax%
\fi\fi\fi%
\end{tikzpicture}%
}
% 设置 Headline 主题模板.
\defbeamertemplate*{headline}{SCU headline theme}{%
\begin{beamercolorbox}[wd=\paperwidth,ht=11.5pt]{}%
\beamer@scu@headline%
\end{beamercolorbox}%
}
\setbeamertemplate{headline}[SCU headline theme]
% ----------------
% ----------------
% Beamer Theme Frametitle Layout
% Confirmed in v1.3c(2024/04/16).
% Established in v1.0a(2021/12/03).
% Updated in v1.2a(2022/03/10), v1.3b(2022/04/13), v1.3c(2024/04/16).
% ----------------
% FORMAT:: frametitle | framesubtitle.
% ----------------
% 设置 Frametitle 主题模板.
\defbeamertemplate*{frametitle}{SCU frametitle theme}{%
\ifx\insertframesubtitle\@empty%
\begin{beamercolorbox}[wd=\paperwidth,%
ht=2.5ex, dp=.5ex, leftskip=8.6pt]{}%{frametitle}
\usebeamerfont{frametitle}%
\usebeamercolor[fg]{frametitle}%
\insertframetitle%
\end{beamercolorbox}%
\else%
\begin{beamercolorbox}[wd=\paperwidth,%
ht=2.5ex, dp=.5ex, leftskip=8.6pt]{}%{frametitle}
\usebeamerfont{frametitle}%
\usebeamercolor[fg]{frametitle}%
\insertframetitle~%
\textcolor{SecondaryAuxiliaryC}{\rule[-.2ex]{.08em}{1.8ex}}~%
\usebeamerfont{framesubtitle}%
\usebeamercolor[fg]{framesubtitle}%
\insertframesubtitle%
\end{beamercolorbox}%
\fi%
}
\setbeamertemplate{frametitle}[SCU frametitle theme]
% ----------------
% ----------------
% Beamer Theme Footline Layout
% Confirmed in v1.3e(2024/10/31).
% Established in v1.0a(2021/12/03).
% Updated in v1.2a(2022/03/10), v1.3a(2022/03/16), v1.3b(2022/04/13), v1.3c(2024/04/16), v1.3e(2024/10/31).
% ----------------
% 于 v1.3c(2024/04/16) 与 Footline TikZ 绘图部分合并, 强化代码关联度
% ----------------
% CMD:: \newdimen - 创建长度寄存器.
% CMD:: \newcount - 创建计数器.
% CMD:: \newsavebox - 创建盒子.
% ----------------
% FORMAT:: NAME of SCU | author | short title | navigation tool | framenumber.
% ----------------
% DIMEN:: Acrobat 页面跳转按钮宽度 - GoToPage.
\newdimen\beamer@scu@len@GoToPage
% DIMEN:: ProgressBar Width - probarwd.
\newdimen\beamer@scu@len@probarwd
\beamer@scu@len@probarwd=\dimexpr\the\paperwidth-48pt\relax
% DIMEN:: ProgressBar auxiliary dimension - probartmpdim.
\newdimen\beamer@scu@len@probartmpdim
% COUNT:: 当前帧页码(正文/附录) - currentframe.
\newcount\beamer@scu@count@currentframe
% COUNT:: 当前总页码(正文/附录) - totalframe.
\newcount\beamer@scu@count@totalframe
% savebox 存储 TikZ Footline 背景底图绘图.
\newsavebox{\beamer@scu@footlinebox}
\sbox{\beamer@scu@footlinebox}{%
\begin{tikzpicture}%
% 绘图辅助节点定义.
\coordinate (LogoNorthWest) at (0, 12pt);% Logo 西北节点
\coordinate (LogoNorthEast) at (48pt, 12pt);% Logo 东北节点
\coordinate (LogoSouthEast) at (54pt, 0);% Logo 东南节点
\coordinate (AdornLightSouthEast) at (58pt, 0);% 浅色装饰 东南节点
\coordinate (AdornLightNorthEast) at (55.5pt, 5pt);% 浅色装饰 东北节点
\coordinate (AdornLightNorthWest) at (51.5pt, 5pt);% 浅色装饰 西北节点
\coordinate (AdornDarkNorthEast) at (53.5pt, 9pt);% 深色装饰 东北节点
\coordinate (AdornDarkNorthWest) at (49.5pt, 9pt);% 深色装饰 西北节点
% 颜色图形绘制.
\fill[PrimaryC] (0, 0) -- (LogoNorthWest)%
-- (LogoNorthEast) -- (LogoSouthEast) -- cycle;% Logo 背景
\node[inner sep=0pt, outer sep=0pt] at (25pt, 6pt) {\pgfuseimage{lg}};
\fill[AuxiliaryC] (LogoSouthEast) -- (AdornLightNorthWest)%
-- (AdornLightNorthEast) -- (AdornLightSouthEast) -- cycle;% 浅色装饰
\fill[IntersperseC] (AdornLightNorthWest) -- (AdornDarkNorthWest)%
-- (AdornDarkNorthEast) -- (AdornLightNorthEast) -- cycle;% 深色装饰
\end{tikzpicture}%
}%
% 设置帧页码计数器(正文/附录).
\def\beamer@scu@framenumber{%
\ifbeamer@inappendix% 附录帧取附录帧页码
\beamer@scu@count@currentframe=\insertframenumberinappendix%
\beamer@scu@count@totalframe=\insertappendixframenumber%
\else% 正文帧取除开附录帧页码
\beamer@scu@count@currentframe=\insertframenumber%
\beamer@scu@count@totalframe=\insertmainframenumber%
\fi%
}
% 插入帧页码.
\def\insert@framenumber{% 页码显示为"x / total"
\usebeamerfont{framenumber in head/foot}%
\usebeamercolor[fg]{framenumber in head/foot}%
\usebeamertemplate*{page number in head/foot}%
}
% 插入带有 Acrobat 页面跳转按钮的页码.
\def\insert@framenumberwithbutton{%
% \raisebox{0pt}[0pt][0pt]{\rlap{xx}xx}%
\Acrobatmenu{GoToPage}{%
\usebeamerfont{framenumber in head/foot}%
\usebeamercolor[fg]{framenumber in head/foot}%
\the\beamer@scu@count@currentframe}%
\usebeamerfont{framenumber in head/foot}%
\textcolor{SecondaryAuxiliaryC}{~\scalebox{1.33}[0.9]{\faCaretRight}\,\the\beamer@scu@count@totalframe}%
}
% Compute Navigation Tool num.
\if\EqualOptionsBeamer{NavigationTool}{negate}%
\relax%
\else%
\StrSubstitute{\beamer@scu@NavigationTool}{-}{, }[\NavigationTool@group]
\StrCount{\NavigationTool@group}{,}[\NavigationTool@len]
\fi%
% 插入 Navigation Tools.
\def\insert@footnavigationtool#1#2{%
% #1:: 组内工具间距.
% #2:: 组间工具间距.
\usebeamercolor[fg]{palette quaternary}%\tiny%
\foreach \group [count=\c] in \NavigationTool@group {%
\IfInteger{\group}{%
\ifnum\group=1%
% 上一小节 | 当前小节开始 | 下一小节.
\setfontscu{5}%
\hyperlinksubsectionendprev{\faCaretLeft}\hskip#1%
\hyperlinksubsectionstart{\faStream}\hskip#1%
\hyperlinksubsectionstartnext{\faCaretRight}%
\else\ifnum\group=2%
% 初始页 | 查找 | 结尾页.
\setfontscu{5}%
\hyperlinkpresentationstart{\faCaretLeft\hskip-.05em\faCaretLeft}\hskip#1%
\setfontscu{4.5}%
\Acrobatmenu{Find}{\faSearch}\hskip#1%
\setfontscu{5}%
\hyperlinkpresentationend{\faCaretRight\hskip-.05em\faCaretRight}%
\else\ifnum\group=3%
% 上一视图 | 全屏 | 下一视图.
\setfontscu{4.5}%
\Acrobatmenu{GoBack}{\faReply}\hskip#1%
\setfontscu{5}%
\Acrobatmenu{FullScreen}{\faExpand}\hskip#1%
\setfontscu{4.5}%
\Acrobatmenu{GoForward}{\reflectbox{\faReply}}%
\fi\fi\fi%
\ifnum\c<\numexpr\NavigationTool@len+1\relax%
\hskip#2%
\fi%
}{%
\PackageError{beamerthemescu}{%
Improper usage: `\protect\usetheme[...]{scu}' option [NavigationTool=xxx].\MessageBreak%
`NavigationTool' should be set to `nagate'\MessageBreak%
or an option composed of numbers 1 to 3 and the symbol `-', such as `2', `1-3', and `1-2-3'%
}{%
`NavigationTool' should be set to `nagate' or an option composed of numbers 1 to 3 and the symbol `-', such as `2', `1-3', and `1-2-3'%
}%
}%
}%
}
% 页脚样式定义.
\def\beamer@scu@footline{%
\begin{tikzpicture}[overlay]%
% 绘图辅助节点定义.
\coordinate (SouthWest) at (current page.south west);% 西南节点
\coordinate (SouthEast) at (current page.south east);% 东南节点
% \coordinate (SouthWest) at (0, 0);% 西南节点
% \coordinate (SouthEast) at (0, \paperwidth);% 东南节点
% 图形文字绘制.
\node[anchor=south west, inner sep=0pt, outer sep=0pt] at (SouthWest) {\usebox{\beamer@scu@footlinebox}};% 绘制 footline 背景底图
\node[right, inner sep=0pt, outer sep=0pt,%
xshift=64pt, yshift=4.5pt] at (SouthWest) {%
\usebeamerfont{author in head/foot}%
\usebeamercolor[fg]{author in head/foot}%
\insertshortauthor\,%
\usebeamerfont{title in head/foot}%
\textcolor{SecondaryAuxiliaryC}{·\,}%
\usebeamercolor[fg]{title in head/foot}%
\insertshorttitle%
};% 绘制 Beamer 标题
\node[left, inner sep=0pt, outer sep=0pt,%
xshift=-9pt, yshift=4.5pt] at (SouthEast) (FootlinePage) {%
\insert@framenumberwithbutton};% 绘制带有 Acrobat 页面跳转按钮的页码
\if\EqualOptionsBeamer{NavigationTool}{negate}%
\relax%
\else%
\node[left, inner sep=0pt, outer sep=0pt,%
xshift=-6pt] at (FootlinePage.west) {%
\insert@footnavigationtool{1.6pt}{4.2pt}};% 绘制 Navigation Tools
\fi%
\end{tikzpicture}%
}
% 进度条样式定义.
\def\beamer@scu@progressbar#1#2#3{%
% #1:: 未放映部分颜色.
% #2:: 已放映部分颜色.
% #3:: 辅助色.
\beamer@scu@len@probartmpdim=\beamer@scu@len@probarwd%
\divide\beamer@scu@len@probartmpdim by 1000%
\multiply\beamer@scu@len@probartmpdim by \beamer@scu@count@currentframe%
\divide\beamer@scu@len@probartmpdim by \beamer@scu@count@totalframe%
\multiply\beamer@scu@len@probartmpdim by 1000%
\begin{tikzpicture}[very thin, overlay, remember picture]%
% 绘图辅助节点定义.
\coordinate (SouthWest) at (current page.south west);% 西南节点
\coordinate (ProBar) at ([xshift=48pt, yshift=9pt]SouthWest);% 初始节点
% 图形绘制.
\fill[#1] (ProBar) rectangle ++ (\beamer@scu@len@probarwd, 3pt);% 未放映部分
\fill[#2] ([yshift=9pt]SouthWest) rectangle ++ (48pt, 3pt);
\fill[#2] (ProBar) rectangle ++ (\beamer@scu@len@probartmpdim, 3pt);% 已放映部分
\fill[#3, draw=#2, line width=.48pt] ([xshift=\beamer@scu@len@probartmpdim, yshift=1.5pt]ProBar) circle (1.26pt);
\end{tikzpicture}%
}
% 设置 Page Number 包含附录模式.
% \setbeamertemplate{page number in head/foot}[appendixframenumber]
% 设置 Footline 主题模板.
\defbeamertemplate*{footline}{SCU footline theme}{%
\begin{beamercolorbox}[wd=\paperwidth,ht=12pt]{}%
\beamer@scu@framenumber% 优先调用计数器设置
\beamer@scu@progressbar{AuxiliaryC}{PrimaryC}{BackgroundC}%
\beamer@scu@footline%
\end{beamercolorbox}%
}
\setbeamertemplate{footline}[SCU footline theme]
% ----------------
% ----------------
% Beamer Theme Navigation Symbols Layout
% ----------------
%\addtobeamertemplate{footline}{%
% \leavevmode%
% \hbox{%
% \begin{beamercolorbox}[wd=0.4\paperwidth,ht=3ex,dp=.75ex,right,rightskip=1.2em]{frametitle}%
% \usebeamercolor[fg]{navigation symbols}\insertslidenavigationsymbol%
% \insertframenavigationsymbol%
% \insertsubsectionnavigationsymbol%
% \insertsectionnavigationsymbol%
% \insertdocnavigationsymbol%
% \insertbackfindforwardnavigationsymbol%
% \end{beamercolorbox}%
% }}
% ----------------
%%%% ----------------------------------------------------------------
\endinput
%%%% ----------------------------------------------------------------
% End of file `beamerouterthemescu.sty'.