fhtw.sty 13.8 KB
 Alija Sabic committed Nov 22, 2018 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FHTW beamer % % Alija Sabic, 21.11.2018 % % based on Matthias Wenzl's template at https://es.technikum-wien.at/embedded-systems-intern/ci/tree/master/slides-latexbeamer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This style file is a combination of the four files required to create the complete theme % 1. Inner % 2. Outer % 3. Color % 4. Font %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mode \RequirePackage{xcolor} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Tikz %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{tikz} \usetikzlibrary{shapes.geometric}  Alija Sabic committed Nov 23, 2018 29 30 % \usetikzlibrary{fadings} % \usetikzlibrary{external}  Alija Sabic committed Nov 22, 2018 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 \usetikzlibrary{calc} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Colors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % define fhtw ci colors \definecolor{tw-blue}{RGB}{0, 101, 156} \definecolor{tw-green}{RGB}{140, 177, 16} \definecolor{tw-gray}{RGB}{113, 120, 125} % non-ci, but useful \definecolor{tw-black}{RGB}{0,0,0} \definecolor{ttw-blue}{RGB}{28,98,182} \definecolor{ttw-violett}{RGB}{197,10,140} \definecolor{ttw-green}{RGB}{128,204,39} \definecolor{ttw-red}{RGB}{238,49,32} \definecolor{ttw-gray}{RGB}{100,104,108} \definecolor{ttw-lightblue}{RGB}{0,173,239} \definecolor{ttw-lightorange}{RGB}{251,198,7} \definecolor{ttw-lightgreen}{RGB}{192,223,19} \definecolor{ttw-yellow}{RGB}{255,242,0} \definecolor{ttw-darkcyan}{RGB}{0,168,144} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Customization %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\sidebarwidth{2cm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Color theme %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This sets the colour of the title of the presentation and titles of all the slides in the presentation. \setbeamercolor{frametitle}{fg=\primarycolor} \setbeamercolor{Title}{fg=\primarycolor} % In case you choose to display the Table of Contents, or the Outline slide. \setbeamercolor{section in toc}{fg = \primarycolor} \setbeamercolor{section in toc shaded}{fg = \primarycolor} \setbeamercolor{subsection in toc}{fg = tw-green} \setbeamercolor{subsection in toc shaded}{fg = tw-green} % The colour of all the items, subitems and and subsubitems are set to black. \setbeamercolor{item}{fg = \primarycolor} \setbeamercolor{subitem}{fg = \primarycolor} \setbeamercolor{subsubitem}{fg = \primarycolor} % This sets the color for each item heading of the description environment. \setbeamercolor{description item}{fg = \primarycolor} % We also need to fix the colours for captions for figures and tables. \setbeamercolor{caption}{fg = tw-green} \setbeamercolor{caption name}{fg = \primarycolor} %Standard block \setbeamercolor{block title}{fg = tw-blue, bg = tw-blue!15!white} \setbeamercolor{block body}{bg = tw-blue!5!white} % Alert block \setbeamercolor{block title alerted}{fg = tw-orange, bg = tw-orange!50!white} \setbeamercolor{block body alerted}{bg = tw-orange!5!white} % Example block \setbeamercolor{block title example}{fg = tw-green, bg = tw-green!15!white} \setbeamercolor{block body example}{bg = tw-green!5!white} % Color of basic text \setbeamercolor{normal text}{fg=tw-black} % Sidebar \usecolortheme{sidebartab} \setbeamercolor{sidebar right}{fg=white, bg=\secondarycolor!30} \setbeamercolor{section in sidebar}{fg=white, bg=\primarycolor} \setbeamercolor{subsection in sidebar}{fg=white, bg=\primarycolor} \setbeamercolor{title in sidebar}{fg=\primarycolor} \setbeamercolor{subtitle in sidebar}{fg=\primarycolor} \setbeamercolor{author in sidebar}{fg=\primarycolor} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Font theme %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % use the default fonts \usefonttheme{professionalfonts} % Font for the presentation title \setbeamerfont{title}{size = \huge} % Font of the frame titles \setbeamerfont{frametitle}{size = \Large} \setbeamercolor{block body}{bg=\primarycolor!10} \setbeamercolor{block title}{bg=\primarycolor!20,fg=\primarycolor} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Inner theme %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \useinnertheme{rounded} \setbeamercovered{transparent = 0} % Navigation Symbols \setbeamertemplate{navigation symbols}{} % \defbeamertemplate{itemize subitem}{minus}{\textbf{-}} % \defbeamertemplate{itemize subsubitem}{bullet}{$\bullet$} % Instead of rounded circles, we will use triangles as the indicator for items. \setbeamertemplate{itemize item}[square] \setbeamertemplate{itemize subitem}[minus] \setbeamertemplate{itemize subsubitem}[bullet] % The default option for enumerate environment removes the circles around the numbers provided by the "rounded" inner theme. Just simple numbers remain. \setbeamertemplate{enumerate items}[square] % in case you want to have an 1.2.3 numbering style use the template below \setbeamertemplate{enumerate subitem}{\insertenumlabel.\insertsubenumlabel} \setbeamertemplate{enumerate subitem}{\insertenumlabel.\insertsubenumlabel} \setbeamertemplate{enumerate subsubitem}{\insertenumlabel.\insertsubenumlabel.\insertsubsubenumlabel} \setbeamertemplate{sections/subsections in toc}[square] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Outer theme %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \useoutertheme[right,width=\sidebarwidth,height=0em,itemsep=2em]{sidebar} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Title Page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{title page}{ \begin{tikzpicture}[ remember picture, overlay, base text style/.style = { draw=none, anchor=north west }, title text style/.style = { base text style, font=\fontsize{14}{24}\sffamily\bfseries\selectfont, text width=\textwidth }, norm text style/.style = { base text style, font=\fontsize{10}{10}\sffamily\selectfont, align=left } ] \coordinate (start) at ($(current page.south west)+(0.1,0.1)$); \coordinate (end) at ($(current page.north east)+(-0.1,-0.1)$); \def\identation{0.4} % Content  Alija Sabic committed Nov 23, 2018 187 188 189 190 191 192 193 194  \node[title text style, shift={(\identation,8)}] at (start) {\title}; \coordinate (textstart) at ($(current page.south west)+(0.1,-0.1)$); \node[norm text style, shift={(\identation,4.75)}] at (textstart) {\author}; \node[norm text style, shift={(\identation,4.25)}] at (textstart) {\studentid}; \node[norm text style, shift={(\identation,3.5)}] at (textstart) {\supervisortitle}; \node[norm text style, shift={(\identation+1.5,3.5)}] at (textstart) {\supervisor}; \node[norm text style, shift={(\identation+1.5,3)}] at (textstart) {\secondsupervisor}; \node[norm text style, shift={(10,3)}, anchor=south east] at (textstart) {\place, \currentdate};  Alija Sabic committed Nov 22, 2018 195 196 197 198 199 200 201 202 203 204 205 206  % Colored rectangles \def\fw{9.4/42} \foreach \color [count=\ci] in {ttw-blue,ttw-violett,ttw-green,ttw-red,ttw-gray,ttw-lightblue,ttw-lightorange,ttw-red,ttw-gray,ttw-lightblue, ttw-green,ttw-lightorange,ttw-red,ttw-gray,ttw-green,ttw-gray,ttw-yellow,ttw-lightorange,ttw-darkcyan,ttw-blue, ttw-darkcyan,ttw-red,ttw-green,ttw-lightblue,ttw-gray,ttw-lightblue,ttw-green,ttw-gray,ttw-red,ttw-lightorange, ttw-gray,ttw-green,ttw-gray,ttw-lightorange,ttw-darkcyan,ttw-violett,ttw-gray,ttw-blue,ttw-green,ttw-gray, ttw-red,ttw-gray} { \draw[draw=none,fill=\color] ($(end)+(0,-(\ci*\fw)$) rectangle ++(-2,\fw); } % Logo  Alija Sabic committed Nov 23, 2018 207 208 209 210  \def\logowidth{2.5cm} \node[anchor=center] at ($(current page.south west)+(3*\logowidth/4,3*\identation)$) {\includegraphics[width=\logowidth]{resources/images/fhtw-logo.pdf}}; \node[anchor=center] at ($(current page.south west)+(22*\identation+4*\logowidth/2,3*\identation)$) {\includegraphics[width=\logowidth]{resources/images/placeholder.pdf}}; \node[anchor=center] at ($(current page.south west)+(180*\identation+5*\logowidth/2,3*\identation)$) {\includegraphics[width=\logowidth]{resources/images/placeholder.pdf}};  Alija Sabic committed Nov 22, 2018 211 212 213 214 215 216 217 218 219 220  % Frame \draw[draw=black,line width=0.2mm,anchor=north west] (start) rectangle (end); \end{tikzpicture} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Sidebar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  Alija Sabic committed Nov 23, 2018 221 222 \def\centerarc[#1](#2)(#3:#4:#5)% Syntax: [draw options] (center) (initial angle:final angle:radius) { \draw[#1] ($(#2)+({#5*cos(#3)},{#5*sin(#3)})$) arc (#3:#4:#5); }  Alija Sabic committed Nov 22, 2018 223 224 225 226 % \setbeamertemplate{sidebar \beamer@sidebarside}{ \makeatletter \defbeamertemplate*{sidebar \beamer@sidebarside}{fhtw}{  Alija Sabic committed Nov 23, 2018 227 228  \begin{tikzpicture}[overlay] \def\ratio{\insertframenumber/\inserttotalframenumber}  Alija Sabic committed Nov 23, 2018 229   Alija Sabic committed Nov 23, 2018 230 231 232 233 234 235 236 237 238 239 240 241 242 243  \draw[draw=none,fill=\primarycolor!25] (1,-0.965) circle (0.8cm); \draw[draw=none,fill=\primarycolor] (1,-0.965) -- (1,-0.17) arc (90:90-360*\ratio:0.8cm) -- (1,-0.965); \draw[draw=none,fill=\secondarycolor!30] (1,-0.965) circle (0.6cm); \pgfmathparse{\inserttotalframenumber-1} \pgfmathsetmacro{\nums}{\pgfmathresult} \foreach \x in {0,...,\nums} { \pgfmathparse{360/\inserttotalframenumber*\x} \pgfmathsetmacro{\angl}{\pgfmathresult} \draw[draw=\secondarycolor!30,line width=0.4mm] (1,-0.9685) -- +(90-\angl:0.9cm); } \end{tikzpicture}  Alija Sabic committed Nov 22, 2018 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  \vskip 0.7cm \hskip 0.50cm \includegraphics[height=15pt]{resources/images/fhtw-logo.pdf} \vskip 0.25cm { \usebeamercolor[fg]{title in sidebar} \insertshorttitle[width=\sidebarwidth,center,respectlinebreaks] } \vskip 0.10cm { \usebeamercolor[fg]{author in sidebar} \insertshortauthor[width=\sidebarwidth,center,respectlinebreaks] } \vskip 1.00cm \insertverticalnavigation{\sidebarwidth} \vfill \hbox to \sidebarwidth{ \hfill {\small \textcolor{\secondarycolor}{\insertframenumber/\inserttotalframenumber}} \hskip 0.10mm } \vskip 0.10mm  Alija Sabic committed Nov 23, 2018 272  \begin{tikzpicture}[overlay]  Alija Sabic committed Nov 22, 2018 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  \draw[draw=\primarycolor,line width=0.4mm] (-0.04,9.6) -- ++(0,-9.6); \draw[draw=\primarycolor,line width=0.15mm] (0,0) -- (0,10); \end{tikzpicture} } \makeatother \setbeamertemplate{sidebar right,width=\sidebarwidth}{fhtw} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Frametitle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Now that we have changed the headline, we will need to orient the frame titles in a way that they come at the % right stop just above the horizontal line. \setbeamertemplate{frametitle}{\insertframetitle} \setbeamertemplate{frametitle}{ \ifx\insertframesubtitle\empty \vskip 2mm \hskip -2mm \color{tw-blue}{\insertframetitle} \else \vskip 2mm \hskip -2mm \color{tw-blue}{\insertframetitle} - \color{tw-green}{\insertframesubtitle} \fi } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Captions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{caption}[numbered] \mode