summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/hduthesis/beamerthemehdu.sty
blob: 2a6cbf032365708d28dc79edcbd2d858e78cc5e2 (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
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
\ProvidesExplPackage{beamerthemehdu}{\hduthesis@date}{\hduthesis@version}
  {hduThesiS~ \text_titlecase:n {beamer} ~Module}

\mode<presentation>

\RequirePackage{tikz}
\usetikzlibrary{fadings}
\graphicspath
  {
    {./figure/}{./figures/}{./image/}{./images/}
    {./graphics/}{./graphic/}{./pictures/}{./picture/}
  }

\keys_define:nn { beamerthemehdu / docinfo }
  {
    title     .tl_set:N = \@title,
    subtitle  .tl_set:N = \l__docinfo_subtitle_tl,
    author    .tl_set:N = \@author,
    date      .tl_set:N = \@date,
    supervisor.tl_set:N = \l__docinfo_supervisor_tl,
    bibsource .tl_set:N = \l__docinfo_reference_tl,
  }
\NewDocumentCommand \DocInfo { m }
  {
    \keys_set:nn { beamerthemehdu / docinfo } { #1 }
    \title { \large \@title }
    \tl_set:Nn \insertshorttitle { \textsc { \l__docinfo_subtitle_tl } }
    \author [ \@author ]
      {
        \@author
        \tl_if_empty:NF \l__docinfo_supervisor_tl
          { 
            \texorpdfstring
              { \\[2ex] \small Supervised~by~\l__docinfo_supervisor_tl }{}
          }
      }
    \date { \@date }
    \tl_if_empty:NTF \l__docinfo_bibsource_tl
      {
        \newcommand* \printbibliography
          {
            \begin{frame}[t]
              \frametitle{Bibliography}
            \end{frame}
          }
        \newcounter {citecount}
        \renewcommand*\cite[1]
          {
            \refstepcounter{citecount}
            \textsuperscript{[\thecitecount]}
          }
      }
      {
        \RequirePackage [ backend = bibtex, sorting = none ] { biblatex }
        \addbibresource { \l__docinfo_reference_tl }
        \let \@printbibliography \printbibliography
        \renewcommand* \printbibliography
          {
            \begin{frame}[t, allowframebreaks]{Bibliography}
              \small
              \@printbibliography
            \end{frame}
          }
      }
  }

\usebackgroundtemplate
  {
    \tikz [ remember~picture, overlay ]
      \node [ inner~sep = 0pt, outer~sep = auto, opacity = .1, xshift = -2em ]
       at (current~page.east)
       { \includegraphics [ height = .75\paperheight ] { hdulogo.pdf } };
  }
\titlegraphic
  {
    \tikz [ remember~picture, overlay ]
      \node [ below~right, yshift = -1em ] at (current~page.north~west) 
        { \includegraphics [ width = 2\textwidth/7 ]{ hdubadge.pdf } };
  }

% theme & colors
\useoutertheme{infolines}
\useinnertheme[shadow = false]{rounded}
\definecolor{hdu}{HTML}{214395}
\definecolor{hduRed}{HTML}{BF6236}
\usecolortheme[named = hdu]{structure}

\setbeamercolor*{palette~primary}{use=structure,fg=black,bg=structure.fg!30!white}
\setbeamercolor*{palette~secondary}{use=structure,fg=white,bg=structure.fg!60!white}
\setbeamercolor*{palette~tertiary}{use=structure,fg=white,bg=structure.fg!90!white}

\setbeamercolor{block~title}{use=structure,fg=structure.fg,bg=structure.fg!20!bg}
\setbeamercolor{block~body}{parent=normal~text,use=block~title,bg=block~title.bg!50!bg}
\addtobeamertemplate{block~begin}{\pgfsetfillopacity{0.8}}{\pgfsetfillopacity{1}}

\setbeamercolor{block~title~alerted}{use=alerted~text,fg=alerted~text.fg,bg=alerted~text.fg!20!bg}
\setbeamercolor{block~body~alerted}{parent=normal~text,use=block~title~alerted,bg=block~title~alerted.bg!50!bg}
\addtobeamertemplate{block~alerted~begin}{\pgfsetfillopacity{0.8}}{\pgfsetfillopacity{1}}

\setbeamercolor{block~title~example}{use=example~text,fg=example~text.fg,bg=example~text.fg!20!bg}
\setbeamercolor{block~body~example}{parent=normal~text,use=block~title~example,bg=block~title~example.bg!50!bg}
\addtobeamertemplate{block~example~begin}{\pgfsetfillopacity{0.8}}{\pgfsetfillopacity{1}}

\addtobeamertemplate{headline}{}
  {
    \tikz [ remember~picture, overlay ]
      {
        \filldraw [hduRed, ultra~thick, line~cap = butt]
          (0,0) --++
          (\paperwidth * \fp_eval:n
            {(\insertpagenumber-1)/(\insertdocumentendpage-1)},0);
        \draw [white, very~thick, yshift = -.6pt] (0,0) --++ (\paperwidth,0);
      }
  }

\AtBeginSection[]
  {
    \begin{frame}
      \tikz [ remember~picture, overlay ]
        \node [ below~right, yshift = -1em ] at (current~page.north~west) 
          { \includegraphics [ width = 2\textwidth/7 ]{ hdubadge.pdf } };
      \vfill
      \usebeamerfont{title} \insertsectionhead \par
      \tikz
        {
          \draw [line~cap = round, hdu!20, ultra~thick]
            (0,0) --++ (2\linewidth/3,0);
          \filldraw [line~cap = round, hdu!60, ultra~thick, path~fading=west]
            (0,0) --++
            (2\linewidth * \fp_eval:n
              {(\insertframenumber - 1)/(\inserttotalframenumber - 1)}/3,0);
        }
      \vfill
    \end{frame}
  }

\setbeamercolor{title}{parent=author~in~head/foot}
\setbeamertemplate{title~page}[default][colsep=-4bp,rounded=true]
\usesubitemizeitemtemplate
  {\tiny\raise1.5pt\hbox{\color{beamerstructure}$\blacktriangleright$}}
\usesubsubitemizeitemtemplate
  { \tiny\raise1.5pt\hbox{\color{beamerstructure}$\bigstar$} }
% \setbeamersize{text margin left = 1em, text margin right=1em}

% math settings
\numberwithin{equation}{section}
\RequirePackage{keytheorems,amssymb,mathtools,physics2,fixdif,derivative,cancel,siunitx,nicematrix}
\renewcommand* \qedsymbol {$\color{gray}\blacksquare$}
\usephysicsmodule{ ab, braket, op.legacy }
\RequirePackage[e]{esvect}
\let\vec\vv

% Figure settings
\RequirePackage
  [ labelsep = period, figurename = \textsc{Fig}, font = footnotesize ]{caption}
\RequirePackage{subcaption,booktabs}
\captionsetup{belowskip=0pt}
\captionsetup[sub]{font = scriptsize}
\RequirePackage{anyfontsize}
\renewcommand{\raggedright}{\leftskip=0pt \rightskip=0pt plus 0cm}
\RequirePackage{ragged2e}
\justifying
\AtBeginEnvironment{columns}{\vspace*{-.5ex}}

\mode<all>

\endinput