Newer
Older
% \iffalse
%<*color>
% \fi\file{theme/mu/beamercolorthemefibeamer-mu.sty}
% This is the base color theme for presentations written at the
% Masaryk University in Brno.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fibeamer/theme/mu/%
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
% \end{macrocode}
% \begin{macro}{\darkframes}
% The |darkframes| environment switches the color definitions to
% render the enclosed frames in dark colors. This is a dummy
% definition, which will be overridden by the subsequently loaded
% color theme in the presentation mode.
% \begin{macrocode}
\newenvironment{darkframes}{}{}
% \end{macrocode}
% \end{macro}
% The rest of the theme will be ignored outside the presentation
% mode.
% \begin{macrocode}
\mode<presentation>
% \end{macrocode}
% The theme loads the following packages, which will be used by the
% subsequently loaded color theme specific to a faculty:
% \begin{itemize}
% \item\textsf{listings} -- This package is used for code
% listings. The subsequently loaded color theme will specify
% source code coloring for the package.
% \item\textsf{ifthen} -- This package is used to construct
% compound conditionals.
% \item\textsf{tikz} -- This package is used to create gradient
% background for dark slides.
% \end{itemize}
% \begin{macrocode}
\RequirePackage{listings}
\RequirePackage{ifthen}
\RequirePackage{tikz}
% \end{macrocode}
% \begin{macro}{\iffibeamer@dark}
% The |\iffibeamer@dark| conditional will be switched on and off by
% the subsequently loaded color theme based on whether or not the
% given frame is being typeset in light or dark colors. This
% information will be used by outer themes to insert the correct
% logo into each frame.
% \begin{macrocode}
\newif\iffibeamer@dark\fibeamer@darkfalse
% \end{macrocode}
% \end{macro}
% A frame that is either title or dark, as specified by the value
% of the |\iffibeamer@dark| conditional, will have a gradient
% background. The |fibeamer@backgroundInner| and
% |fibeamer@backgroundOuter| colors will be defined by the
% subsequently loaded color theme.
\defbeamertemplate*{background canvas}{fibeamer}{%
\ifthenelse{%
\boolean{fibeamer@dark} \OR \c@framenumber=0
}{%
\begin{tikzpicture}
\clip (0,\fibeamer@lengths@clipbottom) rectangle
(\paperwidth,\fibeamer@lengths@cliptop);
\path [inner color = fibeamer@backgroundInner,
outer color = fibeamer@backgroundOuter]
(0,0) rectangle (\paperwidth,\paperwidth);
\end{tikzpicture}
}{}}
% \end{macrocode}
% The |\qed| symbol inserted at the end of proofs will have the
% same color as the rest of the proof.
% \changes{v1.1.1:2}{2016/01/14}{Added proper coloring of
% \cs{qed} to the themes of the Masaryk University in Brno. [VN]}
% \begin{macrocode}
\setbeamercolor{qed symbol}{%
use=block body,
fg=block body.fg,
bg=block body.bg}
\mode
<all>
% \end{macrocode}
% \iffalse
%</color>
%<*font>
% \fi\file{theme/mu/beamerfontthemefibeamer-mu.sty}
% This is the base font theme for presentations written at the
% Masaryk University in Brno. The theme has no effect outside the
% presentation mode.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fibeamer/theme/mu/%
\mode<presentation>
\setbeamerfont{normal text}{size=\normalsize}
\setbeamerfont{title}{size=\LARGE, series=\bfseries}
\setbeamerfont{subtitle}{parent=normal text, size=\Large}
\setbeamerfont{frametitle}{size=\Large}
\setbeamerfont{framesubtitle}{size=\large, shape=\itshape}
\setbeamerfont{description item}{series=\bfseries}
\setbeamerfont{author}{size=\large}
\mode
<all>
% \end{macrocode}
% \iffalse
%</font>
%<*inner>
% \fi\file{theme/mu/beamerinnerthemefibeamer-mu.sty}
% This is the base inner theme for presentations written at the
% Masaryk University in Brno. The theme has no effect outside the
% presentation mode.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fibeamer/theme/mu/%
% \end{macrocode}
% This part of the inner theme defines the design of lists.
% \begin{macrocode}
\defbeamertemplate*{itemize item}{fibeamer}{$\bullet$}
\defbeamertemplate*{itemize subitem}{fibeamer}{\---}
\defbeamertemplate*{itemize subsubitem}{fibeamer}{\guillemotright}
% \end{macrocode}
% This part of the inner theme defines the design of bibliography
% items and citations.^^A
% \changes{v1.1.0:8}{2016/01/12}{Added support for colored
% citations to the themes of the Masaryk University in Brno.
% [VN]}
\AtBeginDocument{%
\let\fibeamer@oldcite\cite
\def\cite#1{{%
\usebeamercolor[fg]{item}%
\fibeamer@oldcite{#1}}}}
% This part of the inner theme defines the design of the table of
% contents.
% \changes{v1.1.0:6}{2016/01/11}{Added support for the
% \cs{tableofcontents} to the themes of the Masaryk University in
% Brno. [VN]}
% \begin{macrocode}
\setbeamertemplate{section in toc}{%
\usebeamercolor[fg]{item}%
\inserttocsectionnumber.%
\usebeamercolor[fg]{structure}%
\kern1.25ex\inserttocsection\par}
\setbeamertemplate{subsection in toc}{%
\hspace\leftmargini
\usebeamercolor[fg]{item}%
\inserttocsectionnumber.\inserttocsubsectionnumber%
\usebeamercolor[fg]{structure}%
\kern1.25ex\inserttocsubsection\par}
\setbeamertemplate{subsubsection in toc}{%
\hspace\leftmargini
\hspace\leftmarginii
\inserttocsectionnumber.\inserttocsubsectionnumber.%
\inserttocsubsubsectionnumber%
\usebeamercolor[fg]{structure}%
\kern1.25ex\inserttocsubsubsection\par}
\mode
<all>
% \end{macrocode}
% \iffalse
%</inner>
%<*outer>
% \fi\file{theme/mu/beamerouterthemefibeamer-mu.sty}
% This is the base outer theme for presentations written at the
% Masaryk University in Brno. The theme has no effect outside the
% presentation mode.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fibeamer/theme/mu/%
\mode<presentation>
% \end{macrocode}
% The theme uses the following packages:
% \begin{itemize}
% \item\textsf{ifthen} -- This package is used to construct
% compound conditionals.
% \item\textsf{ifpdf} -- This package is used to check, whether
% the document is being typeset in DVI mode. If it is, then
% the |\pdfpagewidth| and |\pdfpageheight| dimensions are
% defined, so that positioning in TikZ works correctly.
% \changes{v1.0.1}{2015/10/03}{Added DVI output support. [VN]}
% ^^A <http://tex.stackexchange.com/a/246631/70941>
% \item\textsf{tikz} -- This package is used to position the
% logo and the frame number on a frame.
% \item\textsf{pgfcore} -- This package is used to draw the
% dashed line at the title frame.
% \end{itemize}
% \begin{macrocode}
\RequirePackage{ifthen}
\RequirePackage{ifpdf}
\ifpdf\else
\@ifundefined{pdfpagewidth}{\newdimen\pdfpagewidth}{}
\@ifundefined{pdfpageheight}{\newdimen\pdfpageheight}{}
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\fi
\RequirePackage{tikz}
\RequirePackage{pgfcore}
% \end{macrocode}
% This part of the outer theme defines the geometry of the frames
% along with other dimensions.
% \changes{v1.1.0:4}{2016/01/11}{Length definitions within the
% themes of the Masaryk University in Brno are no longer based on
% the dimensions of the (now unused) logo in the upper right
% corner. [VN]}
\newlength\fibeamer@lengths@baseunit
\fibeamer@lengths@baseunit=3.75mm
\newlength\fibeamer@lengths@footerpad
\setlength\fibeamer@lengths@footerpad{%
\fibeamer@lengths@baseunit}
\newlength\fibeamer@lengths@margin
\setlength\fibeamer@lengths@margin{%
3\fibeamer@lengths@baseunit}
text margin left=\fibeamer@lengths@margin,
text margin right=\fibeamer@lengths@margin}
\newlength\fibeamer@lengths@titleline
\setlength\fibeamer@lengths@titleline{%
3\fibeamer@lengths@baseunit}
\newlength\fibeamer@lengths@clipbottom
\setlength\fibeamer@lengths@clipbottom\paperwidth
\addtolength\fibeamer@lengths@clipbottom{-\paperheight}
\setlength\fibeamer@lengths@clipbottom{%
0.5\fibeamer@lengths@clipbottom}
\newlength\fibeamer@lengths@cliptop
\setlength\fibeamer@lengths@cliptop\paperwidth
\addtolength\fibeamer@lengths@cliptop{%
-\fibeamer@lengths@clipbottom}
% \end{macrocode}
% \changes{v1.1.0:6}{2016/01/11}{Added the logo dimension
% definitions to the themes of the Masaryk University in Brno.
% [VN]}
\newlength\fibeamer@lengths@logowidth
\setlength\fibeamer@lengths@logowidth{%
14\fibeamer@lengths@baseunit}
\newlength\fibeamer@lengths@logoheight
\setlength\fibeamer@lengths@logoheight{%
0.4\fibeamer@lengths@logowidth}
% \end{macrocode}
% The outer theme completely culls the bottom navigation.
% \begin{macrocode}
\defbeamertemplate*{navigation symbols}{fibeamer}{}
% \end{macrocode}
% The outer theme also culls the headline.
% \changes{v1.1.0:1}{2015/11/24}{The faculty logos are no longer
% displayed on regular slides, as per the new unified design of
% the Masaryk University in Brno. [VN]}
\defbeamertemplate*{headline}{fibeamer}{}
% The frame title.
% \begin{macrocode}
\defbeamertemplate*{frametitle}{fibeamer}{%
\vskip-1em % Align the text with the top border
\vskip\fibeamer@lengths@titleline
\usebeamercolor[fg]{frametitle}%
\usebeamerfont{frametitle}%
\insertframetitle\par%
\usebeamercolor[fg]{framesubtitle}%
\usebeamerfont{framesubtitle}%
\insertframesubtitle}
% \end{macrocode}
% The footline contains the frame number. It is flushed right.
% \begin{macrocode}
\defbeamertemplate*{footline}{fibeamer}{%
\ifnum\c@framenumber=0\else%
\begin{tikzpicture}[overlay]
\node[anchor=south east,
yshift=\fibeamer@lengths@footerpad,
xshift=-\fibeamer@lengths@footerpad] at
(current page.south east) {
\usebeamercolor[fg]{framenumber}%
\usebeamerfont{framenumber}%
\insertframenumber/\inserttotalframenumber};
% The title frame contains the main logo, the |\title|, the
% |\subtitle|, and the |\author|.
% \begin{macrocode}
\defbeamertemplate*{title page}{fibeamer}{%
% This is slide 0
\setcounter{framenumber}{0}
% Input the university logo
\begin{tikzpicture}[
remember picture,
overlay,
xshift=0.5\fibeamer@lengths@logowidth,
yshift=0.5\fibeamer@lengths@logoheight
]
\node at (0,0) {
\fibeamer@includeLogo[
width=\fibeamer@lengths@logowidth,
height=\fibeamer@lengths@logoheight
]};
\end{tikzpicture}
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
% Input the title
\usebeamerfont{title}%
\usebeamercolor[fg]{title}%
\begin{minipage}[b][2\baselineskip][b]{\textwidth}%
\raggedright%
\inserttitle%
\end{minipage}
\vskip-.5\baselineskip
% Input the dashed line
\begin{pgfpicture}
\pgfsetlinewidth{2pt}
\pgfsetroundcap
\pgfsetdash{{0pt}{4pt}}{0cm}
\pgfpathmoveto{\pgfpoint{0mm}{0mm}}
\pgfpathlineto{\pgfpoint{\textwidth}{0mm}}
\pgfusepath{stroke}
\end{pgfpicture}
\vfill
% Input the subtitle
\usebeamerfont{subtitle}%
\begin{minipage}{\textwidth}
\raggedright%
\insertsubtitle%
\end{minipage}\vskip.25\baselineskip
% Input the author's name
\usebeamerfont{author}%
\begin{minipage}{\textwidth}
\raggedright%
\insertauthor%
\end{minipage}}
\mode
<all>
% \end{macrocode}
% \iffalse
%</outer>
% \fi