-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathbeamerthemeNTNU.sty
110 lines (103 loc) · 3.08 KB
/
beamerthemeNTNU.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
\ProvidesPackage{beamerthemeNTNU}[2021/2021/08/26 v1.2 A LaTeX beamer theme in the corporate design of NTNU]
%
% necessary packages
\PassOptionsToPackage{default, scale=1}{opensans}
\RequirePackage{opensans}
\RequirePackage{ifthen,pdftexcmds}
\RequirePackage{calc,tikz}
\makeatletter
\mode<presentation>
%
% define colors
\definecolor{NTNUBlue}{HTML}{00509e}
% support colors
\definecolor{NTNUgreen}{HTML}{bcd025}
\definecolor{NTNULightblue}{HTML}{6096d0}
\definecolor{NTNUOrange}{HTML}{ef8114}
\definecolor{NTNUPink}{HTML}{b01b81}
\definecolor{NTNUYellow}{HTML}{f7d019}
\definecolor{NTNUViolet}{HTML}{482776}
\definecolor{NTNUCyan}{HTML}{3cbfbe}
\definecolor{NTNUOcher}{HTML}{cfb887}
\definecolor{LightGrey}{HTML}{bebebe}
\setbeamerfont{title}{shape=\bfseries, size=\huge}
\setbeamerfont{subtitle}{series=\mdseries, size=\Large}
\defbeamertemplate{footline}{NTNUempty}{}
\setbeamercolor{alerted text}{fg=NTNUBlue}
%
% Commands
%
\newcommand{\ntnu@titlelogo}{}
\newcommand{\titlelogo}[1]{\renewcommand{\ntnu@titlelogo}{#1}}
\newcommand{\ntnu@name}{}
\newcommand{\ntnu@sidelogo}{}
\newlength{\footlineheight}
%
% Options
%
% (1) display total frame number
%
% Option: Display Total Frame Number in Footline (only inf visible) on_/off
%
\newcommand{\ntnu@logofile}{}
\DeclareOptionBeamer{slogan}[english]{
\ifnum\pdf@strcmp{#1}{english}=\z@%
\renewcommand{\ntnu@logofile}{ntnu_bredde_eng.png}%
\titlelogo{ntnu_bredde_eng_neg.png}%
\renewcommand{\ntnu@name}{Norwegian University of Science and Technology}
\renewcommand{\ntnu@sidelogo}{ntnu_alt_versjon_uten_slagord_neg.png}
\fi
\ifnum\pdf@strcmp{#1}{norsk}=\z@%
\renewcommand{\ntnu@logofile}{ntnu_med_slagord_bredde_bokmaal.png}%
\titlelogo{ntnu_med_slagord_bredde_bokmaal_neg.png}%
\renewcommand{\ntnu@name}{Norges teknisk-naturvitenskapelige universitet}
\renewcommand{\ntnu@sidelogo}{ntnu_alt_versjon_uten_slagord_neg.png}
\fi
}
\ExecuteOptionsBeamer{slogan}
\DeclareOptionBeamer{style}[plain]{
\ifnum\pdf@strcmp{#1}{plain}=\z@%
\useinnertheme{NTNUplain}%
\useoutertheme{NTNUplain}%
\fi
\ifnum\pdf@strcmp{#1}{vertical}=\z@%
\useinnertheme{NTNUvertical}%
\useoutertheme{NTNUvertical}%
\fi
\ifnum\pdf@strcmp{#1}{horizontal}=\z@%
\useinnertheme{NTNUhorizontal}%
\useoutertheme{NTNUhorizontal}%
\fi
}
\ExecuteOptionsBeamer{style}
%
% Option: Display Total Frame Number in Footline (only inf visible) on_/off
%
\newif\ifntnu@displayTotalFrameNumber%
%
\DeclareOptionBeamer{frametotal}[false]{\csname ntnu@displayTotalFrameNumber#1\endcsname}
\ExecuteOptionsBeamer{frametotal}
% alternate variants
\DeclareOptionBeamer{displayframetotal}{%
\ntnu@displayTotalFrameNumbertrue%
}
\DeclareOptionBeamer{hideframetotal}{%
\ntnu@displayTotalFrameNumberfalse%
}
\DeclareOptionBeamer{mathfont}[sans]{
\ifnum\pdf@strcmp{#1}{serif}=\z@%
\renewcommand\mathfamilydefault{\rmdefault}
\fi
}
\ExecuteOptionsBeamer{mathfont}
%
% All options defined - process
%
\ProcessOptionsBeamer
%
% Set subtheme details
\usefonttheme{structurebold}%
\usecolortheme{NTNU}%
\hypersetup{colorlinks,linkcolor=NTNUBlue,urlcolor=NTNUBlue,citecolor=NTNUBlue}
\mode<all>
\makeatother