A talk about the Ticketfrei bot for sousveillance of public transport ticket controllers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

265 lines
12 KiB

  1. % This is the outer theme file of the Feather theme.
  2. % Copyright (c) 2014 by Lilyana Vaskova Vankova <lilqna.v@gmail.com>
  3. %
  4. % This program is free software: you can redistribute it and/or modify
  5. % it under the terms of the GNU General Public License as published by
  6. % the Free Software Foundation, either version 3 of the License, or
  7. % (at your option) any later version.
  8. %
  9. % This program is distributed in the hope that it will be useful,
  10. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. % GNU General Public License for more details.
  13. %
  14. % You can find the GNU General Public License at <http://www.gnu.org/licenses/>.
  15. %----------------------------------------------------------------------------------------------------------------------------------
  16. \NeedsTeXFormat{LaTeX2e}
  17. \ProvidesPackage{beamerouterthemeFeather}[2014/04/08 v1.0.0 The Feather Beamer Theme]
  18. %----------------------------------------------------------------------------------------------------------------------------------
  19. % load required packages
  20. \RequirePackage{tikz}
  21. \RequirePackage{calc}
  22. %----------------------------------------------------------------------------------------------------------------------------------
  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  24. % Theme options, definitions and templates.
  25. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  26. %----------------------------------------------------------------------------------------------------------------------------------
  27. % options for the progress bar/circle
  28. \def\beamer@progressmovingCircCnt{movingCircCnt} % moving circular counter
  29. \def\beamer@progressfixedCircCnt{fixedCircCnt} % fixed circular counter
  30. \def\beamer@progresscorner{corner} % a counter
  31. \def\beamer@progressstyle{movingCircCnt} % default
  32. \DeclareOptionBeamer{progressstyle}{\def\beamer@progressstyle{#1}}
  33. \DeclareOptionBeamer{rotationcw}{\def\beamer@rotationcw{true}}
  34. \DeclareOptionBeamer{shownavsym}{\def\beamer@shownavsym{true}}
  35. \ProcessOptionsBeamer
  36. %----------------------------------------------------------------------------------------------------------------------------------
  37. % the height of the header is 2.5 times the lineheight of the frame title
  38. \newlength{\beamer@height}
  39. \usebeamerfont{frametitle} %use the frame title font
  40. \setlength{\beamer@height}{2.5\baselineskip}
  41. %----------------------------------------------------------------------------------------------------------------------------------
  42. % reset fonts
  43. \reset@font
  44. %----------------------------------------------------------------------------------------------------------------------------------
  45. % radius of the logo
  46. \newlength{\beamer@logoradius}
  47. \setlength{\beamer@logoradius}{0.95\beamer@height/2}
  48. %----------------------------------------------------------------------------------------------------------------------------------
  49. % width of the border
  50. \newlength{\beamer@borderwidth}
  51. \setlength{\beamer@borderwidth}{1.05mm} % as small is the thickness of the border the whole circle goes up
  52. %----------------------------------------------------------------------------------------------------------------------------------
  53. % inner radius of border of the logo frame
  54. \newlength{\beamer@logoinnerradius}
  55. \setlength{\beamer@logoinnerradius}{0.85\beamer@logoradius}
  56. %----------------------------------------------------------------------------------------------------------------------------------
  57. % radius of the outer border of the logo frame
  58. \newlength{\beamer@logoouterradius}
  59. \setlength{\beamer@logoouterradius}{\beamer@logoinnerradius+\beamer@borderwidth}
  60. %----------------------------------------------------------------------------------------------------------------------------------
  61. % radius of the counters
  62. \newlength{\beamer@counterradius}
  63. \setlength{\beamer@counterradius}{\beamer@logoinnerradius/2+\beamer@logoouterradius/2}
  64. %----------------------------------------------------------------------------------------------------------------------------------
  65. % beamer specific options
  66. \mode<presentation> % refers to the first four modes (beamer,handout,second and trans). That is, to all modes except the article mode
  67. {
  68. \ifbeamercolorempty[fg]{Feather}
  69. {
  70. \setbeamercolor{Feather}{use={structure,palette sidebar primary},fg=palette sidebar primary.fg,bg=structure.fg}
  71. }
  72. %----------------------------------------------------------------------------------------------------------------------------------
  73. % headline
  74. \setbeamertemplate{headline}
  75. {
  76. \featherheaderbackground
  77. }
  78. %----------------------------------------------------------------------------------------------------------------------------------
  79. % footline
  80. \setbeamertemplate{footline}
  81. {
  82. \begin{beamercolorbox}[wd=1.0\paperwidth,ht=1.25ex,dp=1ex,left]{headfoot}
  83. {\usebeamercolor[fg]{frametitle}\usebeamerfont{section in head/foot}\hspace*{3.5ex}
  84. \insertshortauthor\ |\
  85. \insertshorttitle
  86. \insertshortsubtitle
  87. }
  88. \end{beamercolorbox}
  89. }
  90. %----------------------------------------------------------------------------------------------------------------------------------
  91. % frame title
  92. \setbeamertemplate{frametitle}
  93. {
  94. \begin{minipage}[c][0.9\beamer@height][c]{\textwidth}
  95. {\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}
  96. {\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}
  97. \end{minipage}
  98. }
  99. \ifx\beamer@shownavsym\undefined % insert navigation symbols
  100. \setbeamertemplate{navigation symbols}
  101. \fi
  102. }
  103. %----------------------------------------------------------------------------------------------------------------------------------
  104. % macros used in the theme
  105. %% coordinate the fancy header background
  106. \newcommand{\featherheaderbackground}[0]
  107. {
  108. \begin{tikzpicture}[overlay]
  109. \coordinate (UL) at (0,0); %upper left corner of the slide
  110. \coordinate (HLR) at (\paperwidth,-0.9\beamer@height); %lower right of the header
  111. \coordinate (ULL) at (0,-0.95\beamer@height); % upper left corner of the line
  112. \coordinate (LLR) at (\paperwidth,-1\beamer@height); % lower right corner of the line
  113. \coordinate (ULF) at (0,-5.90\beamer@height); % upper left corner of the footline
  114. \coordinate (LFR) at (\paperwidth,-6.08\beamer@height); % lower right corner of the footline
  115. \coordinate (logopos) at ([shift={(-\beamer@logoouterradius-2.05\beamer@borderwidth,\beamer@height-\beamer@logoouterradius-5.5\beamer@borderwidth)}] HLR); % coordinate of the logo and the circ position
  116. %----------------------------------------------------------------------------------------------------------------------------------
  117. %%draw the background of the header, the circle and the logo
  118. {
  119. \usebeamercolor{Feather}
  120. %----------------------------------------------------------------------------------------------------------------------------------
  121. %% draw the blue background rectangle of the header and the line below it
  122. \draw[draw=none,fill=Feather.bg] (UL) rectangle (HLR); % background rectabgle
  123. \draw[draw=none,fill=Feather.fg] (ULL) rectangle (LLR); % line below the background rectangle
  124. \draw[draw=none,fill=Feather.bg] (ULF) rectangle (LFR); % footline
  125. %----------------------------------------------------------------------------------------------------------------------------------
  126. %% draw the outer circle
  127. \fill[fill=Feather.fg] (logopos) circle (\beamer@logoouterradius);
  128. %----------------------------------------------------------------------------------------------------------------------------------
  129. %% draw the inner circle
  130. \fill[fill=normal text.bg] (logopos) circle (\beamer@logoinnerradius);
  131. %----------------------------------------------------------------------------------------------------------------------------------
  132. %% place the logo in the circle
  133. \node at (logopos) {\includegraphics[width=1.75\beamer@logoradius]{Feathergraphics/2}};
  134. %----------------------------------------------------------------------------------------------------------------------------------
  135. %% draw progress circle/bar
  136. \ifx\beamer@progressstyle\beamer@progressmovingCircCnt% the circular counter with a moving counter
  137. %----------------------------------------------------------------------------------------------------------------------------------
  138. %% calculate end position
  139. \ifx\beamer@rotationcw\undefined% counterclockwise rotation
  140. \pgfmathsetmacro{\progress}{220*\insertframestartpage/\inserttotalframenumber}; %%% 220 covers the entire circle, while 360 it goes twice
  141. \else% clockwise rotation
  142. \pgfmathsetmacro{\progress}{-220*\insertframestartpage/\inserttotalframenumber};
  143. \fi
  144. %----------------------------------------------------------------------------------------------------------------------------------
  145. %% draw the arc
  146. \draw[color=Feather.bg,line width=0.2*\beamer@borderwidth] ([xshift=\beamer@counterradius] logopos) arc[radius=\beamer@counterradius, start angle=0, end angle=\progress];
  147. \fill[fill=Feather.bg] ([shift={(\progress:\beamer@counterradius)}] logopos) circle (0.25\beamer@borderwidth);
  148. %----------------------------------------------------------------------------------------------------------------------------------
  149. %% place the current frame number
  150. \node[fill=normal text.bg,draw=Feather.fg,thick,circle,minimum width=2*\beamer@borderwidth] at ([xshift=\beamer@counterradius]logopos) {{\usebeamercolor[fg]{normal text}\insertframenumber}};
  151. \fi
  152. \ifx\beamer@progressstyle\beamer@progressfixedCircCnt % the circular counter with a fixed counter
  153. %----------------------------------------------------------------------------------------------------------------------------------
  154. %% draw the current frame number
  155. \ifx\beamer@rotationcw\undefined % counterclockwise rotation
  156. \pgfmathsetmacro{\progress}{360*\insertframestartpage};
  157. else% clockwise rotation
  158. \pgfmathsetmacro{\progress}{-360*\insertframestartpage};
  159. \fi
  160. %----------------------------------------------------------------------------------------------------------------------------------
  161. %% draw the arc
  162. \draw[color=Feather.bg,line width=0.5*\beamer@borderwidth] ([xshift=\beamer@counterradius] logopos) arc (0:\progress:\beamer@counterradius);
  163. %----------------------------------------------------------------------------------------------------------------------------------
  164. %% place the current frame number
  165. \node[fill=normal text.bg,draw=Feather.fg,circle,thick,minimum width=2*\beamer@borderwidth] at ([shift={(\progress:\beamer@counterradius)}] logopos) {{\usebeamercolor[fg]{normal text}\insertframenumber}};
  166. \fi
  167. }
  168. \end{tikzpicture}
  169. }
  170. %----------------------------------------------------------------------------------------------------------------------------------
  171. %%setting the blocks
  172. \setbeamertemplate{blocks}[rounded][shadow=true]
  173. \setbeamercolor{block title}{fg=frametitle.fg, bg=frametitle.bg}
  174. \setbeamercolor{block body}{parent=normal text, use=block title,bg=Feather.fg!30}
  175. \mode<all>