Newer
Older
Presentations / Zurich_group / 01_03_2016 / beamerouterthemeFlip.sty
@mchrzasz mchrzasz on 4 Mar 2016 5 KB added lots of presentations
  1. % Outer style file for the BEAMER FLIP THEME 212
  2. % Copyright 2012 by Flip Tanedo
  3. % This file may be distributed and/or modified
  4. % 1. under the LaTeX Project Public License and/or
  5. % 2. under the GNU Public License.
  6. %
  7. % Based on: beamerouterthemesplit by Till Tantau
  8.  
  9.  
  10. \mode<presentation>
  11.  
  12. % Watermark
  13. \DeclareOptionBeamer{watermark}{\def\beamer@Flip@watermark{#1}}
  14. \ExecuteOptionsBeamer{watermark=} % Default value is empty
  15.  
  16.  
  17. \newif\ifbeamer@Flip@bigpagenumber
  18. \beamer@Flip@bigpagenumberfalse
  19. \DeclareOptionBeamer{bigpagenumber}{\beamer@Flip@bigpagenumbertrue}
  20.  
  21.  
  22. \def\beamer@Flip@truetext{true} % Kludge for true/false so I can use ifx
  23.  
  24. \DeclareOptionBeamer{topline}[true]{\def\beamer@Flip@topline{#1}}
  25. \ExecuteOptionsBeamer{topline=false} % Default
  26.  
  27.  
  28.  
  29. % \ExecuteOptionsBeamer{topline=} % Default value is empty
  30.  
  31.  
  32. \ProcessOptionsBeamer
  33.  
  34.  
  35. \usepackage{tikz} % For fancy decorations
  36.  
  37.  
  38. % I should fix these up to be more robust against color changes
  39. \setbeamercolor{section in head/foot}{parent=footerlike}
  40. \setbeamercolor{subsection in head/foot}{parent=footerlike}
  41. \setbeamercolor{author in head/foot}{parent=footerlike}
  42. \setbeamercolor{title in head/foot}{parent=footerlike}
  43.  
  44.  
  45. % \setbeamercolor{author in head/foot}{parent=section in head/foot}
  46. % \setbeamercolor{title in head/foot}{parent=subsection in head/foot}
  47.  
  48. %\setbeamercolor{topbar}{parent=crimsontown}
  49. \setbeamercolor{topbar}{parent=bluetown}
  50.  
  51.  
  52.  
  53.  
  54. \usesectionheadtemplate
  55. {\hfill\insertsectionhead}
  56. {\hfill\color{fg!50!bg}\insertsectionhead}
  57.  
  58.  
  59. %%%%%%%%%%%%%%%%%%
  60. % The footer bar %
  61. %%%%%%%%%%%%%%%%%%
  62.  
  63. \defbeamertemplate*{footline}{Flip theme}
  64. {%
  65. \leavevmode%
  66. % OBSERVATION: the "%" symbols inside hbox are all very important here.
  67. % The \hbox enviroment will insert spaces whenever there's whitespace
  68. % Adding a % at the END of each line ensures that any hard returns aren't
  69. % interpreted as white space. This allows the color boxes to be flush against
  70. % one another. If a faint white line appears one could probably do something like
  71. % hspace{-1px} and add an additional pixel-or-two wide beamercolorbox.
  72.  
  73. \hbox{%
  74. \begin{beamercolorbox}[wd=.4\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm, rightskip=.3cm plus1fil]{author in head/foot}%
  75. \usebeamerfont{author in head/foot}\insertshortauthor \end{beamercolorbox}%
  76. %
  77. \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
  78. \usebeamerfont{title in head/foot}{\textit \insertshorttitle}%
  79. \hskip2ex plus1fill%
  80. % \insertpagenumber\,/\,\insertpresentationendpage %% Want FRAME, not SLIDE number
  81. \insertframenumber/\inserttotalframenumber
  82. \end{beamercolorbox}%
  83. }%
  84.  
  85. % This is a complete kludge for the faint white line which appears
  86. % between the beamer color boxes above. (It doesnt appear in presentation mode
  87. % but sometimes looks funny when the pdfs are viewed in a window)
  88. \begin{tikzpicture}[overlay]
  89. \usebeamercolor[bg]{author in head/foot}
  90. \draw[thick] (0,3.625ex) -- (\paperwidth,3.625ex);
  91. \draw (.4\paperwidth,0) -- (.4\paperwidth,3.625ex);
  92. \draw[thick] (0,0) -- (\paperwidth,0);
  93. \end{tikzpicture}
  94.  
  95.  
  96.  
  97. \ifbeamer@Flip@bigpagenumber
  98. \begin{tikzpicture}[overlay]
  99. \usebeamercolor[bg]{author in head/foot}
  100. \draw[fill] (\paperwidth-5ex,3.625ex) circle (6ex);
  101. \usebeamercolor[fg]{author in head/foot}
  102. \draw[fill] (\paperwidth-5ex,3.625ex) circle (5ex);
  103. \usebeamercolor[bg]{author in head/foot}
  104. \node at (\paperwidth-5ex,4ex) {\small$^\text{\insertframenumber}/_\text{\inserttotalframenumber}$};
  105. \end{tikzpicture}
  106. \fi
  107. }
  108.  
  109.  
  110.  
  111. \defbeamertemplate*{frametitle}{Flip theme}[1][left]
  112. {
  113. % \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
  114. \@tempdima=\textwidth%
  115. \advance\@tempdima by\beamer@leftmargin%
  116. \advance\@tempdima by\beamer@rightmargin%
  117.  
  118. \vbox{}\vskip-3.5ex%
  119. %
  120. \begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{titlelike}
  121. \usebeamerfont{frametitle}%
  122. \vbox{}\vskip-1ex%
  123. \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
  124. % \strut{\bf\insertframetitle}\strut\par% %% Include the \bf
  125. \strut{\insertframetitle}\strut\par%
  126. {%
  127. \ifx\insertframesubtitle\@empty%
  128. \else
  129. {\usebeamerfont{framesubtitle}
  130. \usebeamercolor[fg]{framesubtitle}
  131. \insertframesubtitle\strut\par}%
  132. \fi
  133. }%
  134. %
  135. \vskip-1ex%
  136. \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
  137. \end{beamercolorbox}%
  138. %%
  139.  
  140. % \def\beamer@fteright{\vskip0.35cm\advance\leftskip by 1.7cm\advance\rightskip by1.7cm}
  141. }
  142.  
  143.  
  144.  
  145.  
  146. % Sidebar right is important: anything placed here will be
  147. % visible *behind* the main text. This is where to put any
  148. % interesting watermarks.
  149. %
  150. %
  151. \defbeamertemplate*{sidebar right}{Flip theme}
  152. {
  153. % \llap{\includegraphics[width=50px]{footdecoration}}
  154. % \llap{\includegraphics[width=\paperwidth,height=\paperheight]{upperleft_watermark_transp}}
  155. %
  156. % THIS WOULD BE A NICE WAY TO PUT THE PARTICLE BUBBLE CHAMBER BG
  157. % ... make a png of the background with TRANSPARENT BG
  158. % ... then put the image here (use \hfill to get it on the left)
  159. % Now one can FURTHER apply a slight gradient in the BG
  160. %
  161. %
  162. % % Top Line
  163. \ifx\beamer@Flip@topline\beamer@Flip@truetext
  164. \begin{tikzpicture}[overlay]
  165. \usebeamercolor[fg]{titlelike} % alternately, topbarlike would be a good beamercolor
  166. % \usebeamercolor[fg]{topbarlike} % alternately, topbarlike would be a good beamercolor
  167. \draw[fill] (-\paperwidth,0) rectangle (0,-3pt);
  168. \end{tikzpicture}
  169. \fi
  170. %
  171. %
  172. \vskip.2\beamer@leftmargin%
  173. %\llap{\insertlogo\hskip.5\beamer@leftmargin}%
  174. \llap{\insertlogo\hskip.08\beamer@leftmargin}%
  175. \vfill%
  176. \if \beamer@Flip@watermark\@empty
  177. % This is kind of a kludge since if I put anything in here, I automatically get errors
  178. % Somehow LaTeX wants to read the \else part!
  179. \else%
  180. \llap{\includegraphics[width=\paperwidth,height=\paperheight]{\beamer@Flip@watermark}}
  181. \fi
  182. }
  183.  
  184.  
  185.  
  186. \mode<all>
  187. \endinput
  188.  
  189.