-
Notifications
You must be signed in to change notification settings - Fork 5
/
beamerthemeNord.sty
91 lines (76 loc) · 2.91 KB
/
beamerthemeNord.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
% Copyright 2020 by Junwei Wang <i.junwei.wang@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
\ProvidesPackage{beamerthemeNord}[2020/08/24 v0.2.0 A simple beamer theme using Nord color scheme]
\mode<presentation>
\DeclareOptionBeamer{style}{
\PassOptionsToPackage{style=#1}{beamercolorthemeNord}
}
\ProcessOptionsBeamer
\RequirePackage{ifthen}
\usecolortheme{Nord}
\usefonttheme{Nord}
\setbeamertemplate{navigation symbols}{}
\setbeamersize{text margin left=8mm,text margin right=8mm}
\setbeamertemplate{caption}{\insertcaption}
\setbeamertemplate{itemize item}{$\ast$}
\setbeamertemplate{itemize subitem}{$\ast$}
\setbeamertemplate{itemize subsubitem}{$\ast$}
\setbeamertemplate{frametitle}{
{\usebeamercolor[fg]{normal text} \mdseries >> }~\boldmath\insertframetitle%
\hfill\ifx\insertframesubtitle\@empty\else{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\fi
}
\setbeamertemplate{frametitle continuation}[from second][\insertcontinuationtext]
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip5pt
\end{beamercolorbox}%
}
\setbeamertemplate{footline}{
\newbox\nord@tmpbox
\setbox\nord@tmpbox\hbox{
\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)} $\cdot$
\insertshorttitle $\cdot$
[\insertframenumber/\inserttotalframenumber]}
\vspace{5.2mm}
\hspace{2mm}\noindent\hfill\box\nord@tmpbox\hspace{2mm}
\vspace{1.3mm}
}
\setbeamertemplate{title page}{
\renewcommand\thefootnote{\fnsymbol{footnote}}
\setcounter{footnote}{1} % \dagger
{\usebeamerfont{title}\usebeamercolor[fg]{title}\bfseries\boldmath\inserttitle}
\ifx\insertsubtitle\@empty\else\\[1em] {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle}\fi~\\[3em]
{\usebeamerfont{author}\usebeamercolor{author}\insertauthor}
\ifx\insertinstitute\@empty\else\\[.5em]{\usebeamerfont{institute}\usebeamercolor{institute}\insertinstitute}\fi
\\[1.5em]
{\usebeamerfont{date}\usebeamercolor{date}\insertdate}
\\
\renewcommand\thefootnote{\arabic{footnote}}
\setcounter{footnote}{0}
}
% table of contents
\setbeamertemplate{section in toc}{
\inserttocsection\\\smallskip
}
\setbeamertemplate{subsection in toc}{~$\ast$~~\inserttocsubsection\\\smallskip}
\setbeamertemplate{subsection in toc shaded}[default][100]
% block
\setbeamertemplate{blocks}[rounded][shadow=false]
\addtobeamertemplate{block begin}{%
\setlength{\textwidth}{0.85\textwidth}%
}{}
\addtobeamertemplate{block alerted begin}{%
\setlength{\textwidth}{0.85\textwidth}%
}{}
\addtobeamertemplate{block example begin}{%
\setlength{\textwidth}{0.85\textwidth}%
}{}
\mode
<all>
\endinput