summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thubeamer/beamerouterthemethubeamer.sty
blob: 8eede606fd4668ddfd8614fe323f2d1d4d177930 (plain)
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
%%
%% This is file `beamerouterthemethubeamer.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% thubeamer.dtx  (with options: `thuouterstyle')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2019--2021 by Jingxuan Yang <yanglatex2e@gmail.com>
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in:
%% 
%% http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008/05/04 or later.
%% 
%% To produce the documentation run the original source files ending with `.dtx'
%% through LaTeX.
%% 

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerouterthemethubeamer}
[2021/11/15 v1.1.0 A Beamer Theme for Tsinghua University (THU)]
\DeclareOptionBeamer{smoothbars}{\def\beamer@thubar{smoothbars}}
\DeclareOptionBeamer{sidebar}{\def\beamer@thubar{sidebar}}
\ProcessOptionsBeamer
\def\beamer@thusidebar{sidebar}

\mode<presentation>

\setbeamertemplate{navigation symbols}{}

\ifx\beamer@thubar\beamer@thusidebar
  \useoutertheme[width=0.17\linewidth]{sidebar}
  \logo{\includegraphics[width=0.08\linewidth]{thulogo.pdf}}
\else
  \useoutertheme[footline=authorinstitutetitle,subsection=false]{smoothbars}
\fi

\makeatletter
\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{
  \renewcommand{\frameofframes}{#1}
}
\setbeamertemplate{footline}{%
  \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
  \end{beamercolorbox}
  \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
    leftskip=.3cm,rightskip=.3cm plus1fil]{firstbottomline}%
    \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
    \hfill%
    {\usebeamerfont{institute in head/foot}%
    \usebeamercolor[fg]{frame number}%
      \insertshortinstitute
    }%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
    leftskip=.3cm,rightskip=.3cm plus1fil]{secondbottomline}%
    {\usebeamerfont{title in head/foot}\insertshorttitle}%
    \hfill%
    {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
  \end{beamercolorbox}
}
\makeatother

\mode<all>
%% 
%% This package consists of the file  thubeamer.dtx,
%%              and the derived files thubeamer.pdf,
%%                                    beamerthemethubeamer.sty,
%%                                    beamercolorthemethubeamer.sty,
%%                                    beamerinnerthemethubeamer.sty,
%%                                    beamerouterthemethubeamer.sty.
%% 
%%
%% End of file `beamerouterthemethubeamer.sty'.