Commit b6a67a02 authored by Benoit Viguier's avatar Benoit Viguier
Browse files

working on slides

parent 8d5a864d
This diff is collapsed.
%%
%% This is file `beamercolorthemeru.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% beamercolorthemeru.dtx (with options: `package')
%% ---------------------------------------------------------------------------
%% Copyright 2016 Benoit Viguier
%%
%% https://gitlab.science.ru.nl/benoit/rutheme
%%
%% the original template was based on the mtheme
%% (https://github.com/matze/mtheme) by Matthias Vogelgesang
%%
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
%% ---------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthemeru}[2016/11/22 Ru color theme]
\RequirePackage{pgfopts}
\pgfkeys{
/ru/color/block/.cd,
.is choice,
transparent/.code=\ru@block@transparent,
fill/.code=\ru@block@fill,
}
\pgfkeys{
/ru/color/background/.cd,
.is choice,
dark/.code=\ru@colors@dark,
light/.code=\ru@colors@light,
}
\newcommand{\ru@color@setdefaults}{
\pgfkeys{/ru/color/.cd,
background=light,
block=transparent,
}
}
\definecolor{ruDarkText}{HTML}{222222}
\definecolor{ruDarkTeal}{HTML}{B82B22}
\definecolor{ruLightTeal}{HTML}{DDDDDD}
\definecolor{ruLightBrown}{HTML}{F45709}
\definecolor{ruLightGreen}{HTML}{14B03D}
\newcommand{\ru@colors@dark}{
\setbeamercolor{normal text}{%
fg=black!2,
bg=ruLightTeal
}
\usebeamercolor[fg]{normal text}
}
\newcommand{\ru@colors@light}{
\setbeamercolor{normal text}{%
fg=ruDarkText,
bg=black!2
}
}
\setbeamercolor{title text}{%
fg=ruDarkTeal
}
\setbeamercolor{alerted text}{%
fg=ruLightBrown
}
\setbeamercolor{example text}{%
fg=ruLightGreen
}
\setbeamercolor{titlelike}{use=title text, parent=title text}
\setbeamercolor{author}{use=normal text, parent=normal text}
\setbeamercolor{date}{use=normal text, parent=normal text}
\setbeamercolor{institute}{use=normal text, parent=normal text}
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
\setbeamercolor{palette primary}{%
use=normal text,
fg=normal text.bg,
bg=ruDarkTeal
}
\setbeamercolor{frametitle}{%
fg=ruLightTeal,
bg=ruDarkTeal
}
\setbeamercolor{progress bar}{%
fg=ruLightBrown,
bg=ruLightBrown!50!black!30
}
\setbeamercolor{title separator}{
use=progress bar,
parent=progress bar
}
\setbeamercolor{progress bar in head/foot}{%
use=progress bar,
parent=progress bar
}
\setbeamercolor{progress bar in section page}{
use=progress bar,
parent=progress bar
}
\newcommand{\ru@block@transparent}{
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
bg=
}
\setbeamercolor{block body}{
bg=
}
}
\newcommand{\ru@block@fill}{
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
bg=ruDarkTeal!50!normal text.bg!50
}
\setbeamercolor{block body}{
use={block title, normal text},
bg=block title.bg!20!normal text.bg
}
}
\setbeamercolor{block title alerted}{%
use={block title, alerted text},
bg=block title.bg,
fg=ruDarkTeal
}
\setbeamercolor{block title example}{%
use={block title, example text},
bg=block title.bg,
fg=example text.fg
}
\setbeamercolor{block body alerted}{use=block body, parent=block body}
\setbeamercolor{block body example}{use=block body, parent=block body}
\setbeamercolor{footnote}{fg=ruDarkTeal!90}
\setbeamercolor{footnote mark}{fg=.}
\ru@color@setdefaults
\ProcessPgfPackageOptions{/ru/color}
\mode<all>
\endinput
%%
%% End of file `beamercolorthemeru.sty'.
%%
%% This is file `beamerfontthemeru.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% beamerfontthemeru.dtx (with options: `package')
%% ---------------------------------------------------------------------------
%% Copyright 2016 Benoit Viguier
%%
%% https://gitlab.science.ru.nl/benoit/rutheme
%%
%% the original template was based on the mtheme
%% (https://github.com/matze/mtheme) by Matthias Vogelgesang
%%
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
%% ---------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerfontthemeru}[2017/01/23 Ru font theme]
\RequirePackage{etoolbox}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\RequirePackage{pgfopts}
\ifboolexpr{bool {xetex} or bool {luatex}}{
\@ifpackageloaded{fontspec}{
\PassOptionsToPackage{no-math}{fontspec}
}{
\RequirePackage[no-math]{fontspec}
}
\newcounter{fontsnotfound}
\newcommand{\checkfont}[1]{%
\suppressfontnotfounderror=1%
\font\x = "#1" at 10pt
\selectfont
\ifx\x\nullfont%
\stepcounter{fontsnotfound}%
\fi%
\suppressfontnotfounderror=0%
}
\newcommand{\iffontsavailable}[3]{%
\setcounter{fontsnotfound}{0}%
\expandafter\forcsvlist\expandafter%
\checkfont\expandafter{#1}%
\ifnum\value{fontsnotfound}=0%
#2%
\else%
#3%
\fi%
}
\iffontsavailable{Fira Sans Light,%
Fira Sans Light Italic,%
Fira Sans,%
Fira Sans Italic}%
{%
\setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}%
}{%
\iffontsavailable{Fira Sans Light OT,%
Fira Sans Light Italic OT,%
Fira Sans OT,%
Fira Sans Italic OT}%
{%
\setsansfont[ItalicFont={Fira Sans Light Italic OT},%
BoldFont={Fira Sans OT},%
BoldItalicFont={Fira Sans Italic OT}]%
{Fira Sans Light OT}%
}{%
\PackageWarning{beamerthemeru}{%
Could not find Fira Sans fonts%
}
}
}
\iffontsavailable{Fira Mono, Fira Mono Bold}{%
\setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}%
}{%
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{%
\setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}%
}{%
\PackageWarning{beamerthemeru}{%
Could not find Fira Mono fonts%
}
}
}
\AtBeginEnvironment{tabular}{%
\addfontfeature{Numbers={Monospaced}}%
}
}{%
\PackageWarning{beamerthemeru}{%
You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts%
}
}
\setbeamerfont{title}{size=\Large,%
series=\bfseries}
\setbeamerfont{author}{size=\small}
\setbeamerfont{date}{size=\small}
\setbeamerfont{section title}{size=\Large,%
series=\bfseries}
\setbeamerfont{block title}{size=\normalsize,%
series=\bfseries}
\setbeamerfont{block title alerted}{size=\normalsize,%
series=\bfseries}
\setbeamerfont*{subtitle}{size=\large}
\setbeamerfont{frametitle}{size=\large,%
series=\bfseries}
\setbeamerfont{caption}{size=\small}
\setbeamerfont{caption name}{series=\bfseries}
\setbeamerfont{description item}{series=\bfseries}
\setbeamerfont{page number in head/foot}{size=\scriptsize}
\setbeamerfont{bibliography entry author}{size=\normalsize,%
series=\normalfont}
\setbeamerfont{bibliography entry title}{size=\normalsize,%
series=\bfseries}
\setbeamerfont{bibliography entry location}{size=\normalsize,%
series=\normalfont}
\setbeamerfont{bibliography entry note}{size=\small,%
series=\normalfont}
\setbeamerfont{standout}{size=\Large,%
series=\bfseries}
\pgfkeys{
/ru/font/titleformat title/.cd,
.is choice,
regular/.code={%
\let\ru@titleformat\@empty%
\setbeamerfont{title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\ru@titleformat\@empty%
\setbeamerfont{title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\ru@titleformat\lowercase%
\setbeamerfont{title}{shape=\scshape}%
\PackageWarning{beamerthemeru}{%
Be aware that titleformat title=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\ru@titleformat\uppercase%
\setbeamerfont{title}{shape=\normalfont}
\PackageWarning{beamerthemeru}{%
Be aware that titleformat title=allcaps can lead to problems%
}
},
}
\pgfkeys{
/ru/font/titleformat subtitle/.cd,
.is choice,
regular/.code={%
\let\ru@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\ru@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\ru@subtitleformat\lowercase%
\setbeamerfont{subtitle}{shape=\scshape}%
\PackageWarning{beamerthemeru}{%
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\ru@subtitleformat\uppercase%
\setbeamerfont{subtitle}{shape=\normalfont}%
\PackageWarning{beamerthemeru}{%
Be aware that titleformat subtitle=allcaps can lead to problems%
}
},
}
\pgfkeys{
/ru/font/titleformat section/.cd,
.is choice,
regular/.code={%
\let\ru@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\ru@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\ru@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}%
\PackageWarning{beamerthemeru}{%
Be aware that titleformat section=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\ru@sectiontitleformat\MakeUppercase%
\setbeamerfont{section title}{shape=\normalfont}%
\PackageWarning{beamerthemeru}{%
Be aware that titleformat section=allcaps can lead to problems%
}
},
}
\pgfkeys{
/ru/font/titleformat frame/.cd,
.is choice,
regular/.code={%
\let\ru@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\ru@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\ru@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}%
\PackageWarning{beamerthemeru}{%
Be aware that titleformat frame=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\ru@frametitleformat\MakeUppercase%
\setbeamerfont{frametitle}{shape=\normalfont}
\PackageWarning{beamerthemeru}{%
Be aware that titleformat frame=allcaps can lead to problems%
}
},
}
\pgfkeys{
/ru/font/.cd,
titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
titleformatframe/.code=\pgfkeysalso{titleformat frame=#1},
}
\newcommand{\ru@font@setdefaults}{
\pgfkeys{/ru/font/.cd,
titleformat title=regular,
titleformat subtitle=regular,
titleformat section=regular,
titleformat frame=regular,
}
}
\def\ru@titleformat#1{#1}
\def\ru@subtitleformat#1{#1}
\def\ru@sectiontitleformat#1{#1}
\def\ru@frametitleformat#1{#1}
\patchcmd{\beamer@title}%
{\def\inserttitle{#2}}%
{\def\inserttitle{\ru@titleformat{#2}}}%
{}%
{\PackageError{beamerfontthemeru}{Patching title failed}\@ehc}
\patchcmd{\beamer@subtitle}%
{\def\insertsubtitle{#2}}%
{\def\insertsubtitle{\ru@subtitleformat{#2}}}%
{}%
{\PackageError{beamerfontthemeru}{Patching subtitle failed}\@ehc}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\ru@sectiontitleformat{#2}}}
{}
{\PackageError{beamerfontthemeru}{Patching section title failed}\@ehc}
\@tempswafalse
\patchcmd{\beamer@section}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
\ru@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@section}
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
\noexpand\ru@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\if@tempswa\else
\PackageError{beamerfontthemeru}{Patching section title failed}\@ehc
\fi
\@tempswafalse
\patchcmd{\beamer@subsection}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
\ru@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@subsection}
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
\noexpand\ru@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\if@tempswa\else
\PackageError{beamerfontthemeru}{Patching section title failed}\@ehc
\fi
\patchcmd{\beamer@@frametitle}
{{%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{{%
\gdef\insertframetitle{{\ru@frametitleformat{#2}\ifnum%
\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}
{\PackageError{beamerfontthemeru}{Patching frame title failed}\@ehc}
\ru@font@setdefaults
\ProcessPgfPackageOptions{/ru/font}
\endinput
%%
%% End of file `beamerfontthemeru.sty'.
%%
%% This is file `beamerinnerthemeru.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% beamerinnerthemeru.dtx (with options: `package')
%% ---------------------------------------------------------------------------
%% Copyright 2016 Benoit Viguier
%%
%% https://gitlab.science.ru.nl/benoit/rutheme
%%
%% the original template was based on the mtheme
%% (https://github.com/matze/mtheme) by Matthias Vogelgesang
%%
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
%% ---------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerinnerthemeru}[2016/11/22 Ru inner theme]
\RequirePackage{etoolbox}
\RequirePackage{keyval}
\RequirePackage{calc}
\RequirePackage{pgfopts}
\RequirePackage{tikz}
\pgfkeys{
/ru/inner/sectionpage/.cd,
.is choice,
none/.code=\ru@disablesectionpage,
simple/.code={\ru@enablesectionpage
\setbeamertemplate{section page}[simple]},
progressbar/.code={\ru@enablesectionpage
\setbeamertemplate{section page}[progressbar]},
}
\pgfkeys{
/ru/inner/subsectionpage/.cd,
.is choice,
none/.code=\ru@disablesubsectionpage,
simple/.code={\ru@enablesubsectionpage
\setbeamertemplate{section page}[simple]},
progressbar/.code={\ru@enablesubsectionpage
\setbeamertemplate{section page}[progressbar]},
}
\newcommand{\ru@inner@setdefaults}{
\pgfkeys{/ru/inner/.cd,
sectionpage=progressbar,
subsectionpage=none
}
}
\setbeamertemplate{title page}{
\begin{minipage}[b][\paperheight]{\textwidth}
\ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
\vfill%
\ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
\ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
\usebeamertemplate*{title separator}
\ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi
\ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
\ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
\vfill
\vspace*{1mm}
\end{minipage}
}
\def\maketitle{%
\ifbeamer@inframe
\titlepage
\else
\frame[plain,noframenumbering]{\titlepage}
\fi
}
\def\titlepage{%
\usebeamertemplate{title page}
}
\setbeamertemplate{title graphic}{
\vbox to 0pt {
\vspace*{2em}
\inserttitlegraphic%
}%
\nointerlineskip%
}
\setbeamertemplate{title}{
\raggedright%
\linespread{1.0}%
\inserttitle%
\par%
\vspace*{0.5em}
}
\setbeamertemplate{subtitle}{
\raggedright%
\insertsubtitle%
\par%
\vspace*{0.5em}
}
\newlength{\ru@titleseparator@linewidth}
\setlength{\ru@titleseparator@linewidth}{1pt}
\setbeamertemplate{title separator}{
\begin{tikzpicture}
\fill[fg] (0,0) rectangle (\textwidth, \ru@titleseparator@linewidth);
\end{tikzpicture}%
\par%
}
\setbeamertemplate{author}{
\vspace*{2em}
\insertauthor%
\par%
\vspace*{0.25em}
}
\setbeamertemplate{date}{
\insertdate%
\par%
}
\setbeamertemplate{institute}{
\vspace*{3mm}
\insertinstitute%
\par%
}
\defbeamertemplate{section page}{simple}{
\begin{center}
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\par
\ifx\insertsubsectionhead\@empty\else
\usebeamercolor[fg]{subsection title}
\usebeamerfont{subsection title}
\insertsubsectionhead
\fi
\end{center}
}
\defbeamertemplate{section page}{progressbar}{
\centering
\begin{minipage}{22em}
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\\[-1ex]
\usebeamertemplate*{progress bar in section page}
\par
\ifx\insertsubsectionhead\@empty\else%
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\insertsubsectionhead
\fi
\end{minipage}
\par
\vspace{\baselineskip}
}
\newcommand{\ru@disablesectionpage}{
\AtBeginSection{
% intentionally empty
}
}
\newcommand{\ru@enablesectionpage}{
\AtBeginSection{
\ifbeamer@inframe
\sectionpage
\else
\frame[plain,c,noframenumbering]{\sectionpage}
\fi
}
}
\setbeamertemplate{subsection page}{%
\usebeamertemplate*{section page}
}
\newcommand{\ru@disablesubsectionpage}{