Selaa lähdekoodia
Add first slides
Add first slides
Signed-off-by: Florent Jacquet <florent.jacquet@free-electrons.com>master
10 muutettua tiedostoa jossa 1315 lisäystä ja 0 poistoa
Jaettu näkymä
Diff Options
-
18Makefile
-
133beamercolorthememetropolis.sty
-
283beamerfontthememetropolis.sty
-
281beamerinnerthememetropolis.sty
-
129beamerouterthememetropolis.sty
-
105beamerthememetropolis.sty
-
183drawstack.sty
-
BINslides.pdf
-
163slides.tex
-
20slides.vrb
@ -0,0 +1,18 @@ |
|||
LATEX:=pdflatex |
|||
TARGET:=slides.pdf |
|||
|
|||
.PHONY: all clean distclean |
|||
|
|||
all: $(TARGET) clean |
|||
|
|||
%.pdf: %.tex |
|||
echo "Building pdf" |
|||
$(LATEX) --shell-escape $< |
|||
rm -f $@ |
|||
$(LATEX) --shell-escape $< |
|||
|
|||
clean: |
|||
rm -f *.log *.nav *.snm *.aux *.out *.toc *.pyg |
|||
|
|||
distclean: clean |
|||
rm -f $(TARGET) |
@ -0,0 +1,133 @@ |
|||
%% |
|||
%% This is file `beamercolorthememetropolis.sty', |
|||
%% generated with the docstrip utility. |
|||
%% |
|||
%% The original source files were: |
|||
%% |
|||
%% beamercolorthememetropolis.dtx (with options: `package') |
|||
%% --------------------------------------------------------------------------- |
|||
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
|||
%% contributors can be found at |
|||
%% |
|||
%% https://github.com/matze/mtheme/graphs/contributors |
|||
%% |
|||
%% and the original template was based on the HSRM theme by Benjamin Weiss. |
|||
%% |
|||
%% 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{beamercolorthememetropolis}[2016/03/14 Metropolis color theme] |
|||
\RequirePackage{pgfopts} |
|||
\pgfkeys{ |
|||
/metropolis/color/block/.cd, |
|||
.is choice, |
|||
transparent/.code=\metropolis@block@transparent, |
|||
fill/.code=\metropolis@block@fill, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/color/background/.cd, |
|||
.is choice, |
|||
dark/.code=\metropolis@colors@dark, |
|||
light/.code=\metropolis@colors@light, |
|||
} |
|||
\newcommand{\metropolis@color@setdefaults}{ |
|||
\pgfkeys{/metropolis/color/.cd, |
|||
background=light, |
|||
block=transparent, |
|||
} |
|||
} |
|||
\definecolor{mDarkBrown}{HTML}{604c38} |
|||
\definecolor{mDarkTeal}{HTML}{23373b} |
|||
\definecolor{mLightBrown}{HTML}{EB811B} |
|||
\definecolor{mLightGreen}{HTML}{14B03D} |
|||
\newcommand{\metropolis@colors@dark}{ |
|||
\setbeamercolor{normal text}{% |
|||
fg=black!2, |
|||
bg=mDarkTeal |
|||
} |
|||
} |
|||
\newcommand{\metropolis@colors@light}{ |
|||
\setbeamercolor{normal text}{% |
|||
fg=mDarkTeal, |
|||
bg=black!2 |
|||
} |
|||
} |
|||
\setbeamercolor{alerted text}{% |
|||
fg=mLightBrown |
|||
} |
|||
\setbeamercolor{example text}{% |
|||
fg=mLightGreen |
|||
} |
|||
\setbeamercolor{titlelike}{use=normal text, parent=normal 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=normal text.fg |
|||
} |
|||
\setbeamercolor{frametitle}{% |
|||
use=palette primary, |
|||
parent=palette primary |
|||
} |
|||
\setbeamercolor{progress bar}{% |
|||
use=alerted text, |
|||
fg=alerted text.fg, |
|||
bg=alerted text.fg!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{\metropolis@block@transparent}{ |
|||
\setbeamercolor{block title}{% |
|||
use=normal text, |
|||
fg=normal text.fg, |
|||
bg= |
|||
} |
|||
\setbeamercolor{block body}{ |
|||
bg= |
|||
} |
|||
} |
|||
\newcommand{\metropolis@block@fill}{ |
|||
\setbeamercolor{block title}{% |
|||
use=normal text, |
|||
fg=normal text.fg, |
|||
bg=normal text.bg!80!fg |
|||
} |
|||
\setbeamercolor{block body}{ |
|||
use={block title, normal text}, |
|||
bg=block title.bg!50!normal text.bg |
|||
} |
|||
} |
|||
\setbeamercolor{block title alerted}{% |
|||
use={block title, alerted text}, |
|||
bg=block title.bg, |
|||
fg=alerted text.fg |
|||
} |
|||
\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=normal text.fg!90} |
|||
\setbeamercolor{footnote mark}{fg=.} |
|||
\metropolis@color@setdefaults |
|||
\ProcessPgfPackageOptions{/metropolis/color} |
|||
\mode<all> |
|||
\endinput |
|||
%% |
|||
%% End of file `beamercolorthememetropolis.sty'. |
@ -0,0 +1,283 @@ |
|||
%% |
|||
%% This is file `beamerfontthememetropolis.sty', |
|||
%% generated with the docstrip utility. |
|||
%% |
|||
%% The original source files were: |
|||
%% |
|||
%% beamerfontthememetropolis.dtx (with options: `package') |
|||
%% --------------------------------------------------------------------------- |
|||
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
|||
%% contributors can be found at |
|||
%% |
|||
%% https://github.com/matze/mtheme/graphs/contributors |
|||
%% |
|||
%% and the original template was based on the HSRM theme by Benjamin Weiss. |
|||
%% |
|||
%% 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{beamerfontthememetropolis}[2016/03/14 Metropolis font theme] |
|||
\RequirePackage{etoolbox} |
|||
\RequirePackage{ifxetex} |
|||
\RequirePackage{ifluatex} |
|||
\RequirePackage{pgfopts} |
|||
\ifboolexpr{bool {xetex} or bool {luatex}}{ |
|||
\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{beamerthememetropolis}{% |
|||
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{beamerthememetropolis}{% |
|||
Could not find Fira Mono fonts% |
|||
} |
|||
} |
|||
} |
|||
\AtBeginEnvironment{tabular}{% |
|||
\addfontfeature{Numbers={Monospaced}}% |
|||
} |
|||
}{% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
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{ |
|||
/metropolis/font/titleformat title/.cd, |
|||
.is choice, |
|||
regular/.code={% |
|||
\let\metropolis@titleformat\@empty% |
|||
\setbeamerfont{title}{shape=\normalfont}% |
|||
}, |
|||
smallcaps/.code={% |
|||
\let\metropolis@titleformat\@empty% |
|||
\setbeamerfont{title}{shape=\scshape}% |
|||
}, |
|||
allsmallcaps/.code={% |
|||
\let\metropolis@titleformat\lowercase% |
|||
\setbeamerfont{title}{shape=\scshape}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat title=allsmallcaps can lead to problems% |
|||
} |
|||
}, |
|||
allcaps/.code={% |
|||
\let\metropolis@titleformat\uppercase% |
|||
\setbeamerfont{title}{shape=\normalfont} |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat title=allcaps can lead to problems% |
|||
} |
|||
}, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/font/titleformat subtitle/.cd, |
|||
.is choice, |
|||
regular/.code={% |
|||
\let\metropolis@subtitleformat\@empty% |
|||
\setbeamerfont{subtitle}{shape=\normalfont}% |
|||
}, |
|||
smallcaps/.code={% |
|||
\let\metropolis@subtitleformat\@empty% |
|||
\setbeamerfont{subtitle}{shape=\scshape}% |
|||
}, |
|||
allsmallcaps/.code={% |
|||
\let\metropolis@subtitleformat\lowercase% |
|||
\setbeamerfont{subtitle}{shape=\scshape}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat subtitle=allsmallcaps can lead to problems% |
|||
} |
|||
}, |
|||
allcaps/.code={% |
|||
\let\metropolis@subtitleformat\uppercase% |
|||
\setbeamerfont{subtitle}{shape=\normalfont}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat subtitle=allcaps can lead to problems% |
|||
} |
|||
}, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/font/titleformat section/.cd, |
|||
.is choice, |
|||
regular/.code={% |
|||
\let\metropolis@sectiontitleformat\@empty% |
|||
\setbeamerfont{section title}{shape=\normalfont}% |
|||
}, |
|||
smallcaps/.code={% |
|||
\let\metropolis@sectiontitleformat\@empty% |
|||
\setbeamerfont{section title}{shape=\scshape}% |
|||
}, |
|||
allsmallcaps/.code={% |
|||
\let\metropolis@sectiontitleformat\MakeLowercase% |
|||
\setbeamerfont{section title}{shape=\scshape}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat section=allsmallcaps can lead to problems% |
|||
} |
|||
}, |
|||
allcaps/.code={% |
|||
\let\metropolis@sectiontitleformat\MakeUppercase% |
|||
\setbeamerfont{section title}{shape=\normalfont}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat section=allcaps can lead to problems% |
|||
} |
|||
}, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/font/titleformat frame/.cd, |
|||
.is choice, |
|||
regular/.code={% |
|||
\let\metropolis@frametitleformat\@empty% |
|||
\setbeamerfont{frametitle}{shape=\normalfont}% |
|||
}, |
|||
smallcaps/.code={% |
|||
\let\metropolis@frametitleformat\@empty% |
|||
\setbeamerfont{frametitle}{shape=\scshape}% |
|||
}, |
|||
allsmallcaps/.code={% |
|||
\let\metropolis@frametitleformat\MakeLowercase% |
|||
\setbeamerfont{frametitle}{shape=\scshape}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat frame=allsmallcaps can lead to problems% |
|||
} |
|||
}, |
|||
allcaps/.code={% |
|||
\let\metropolis@frametitleformat\MakeUppercase% |
|||
\setbeamerfont{frametitle}{shape=\normalfont} |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat frame=allcaps can lead to problems% |
|||
} |
|||
}, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/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{\metropolis@font@setdefaults}{ |
|||
\pgfkeys{/metropolis/font/.cd, |
|||
titleformat title=regular, |
|||
titleformat subtitle=regular, |
|||
titleformat section=regular, |
|||
titleformat frame=regular, |
|||
} |
|||
} |
|||
\def\metropolis@titleformat#1{#1} |
|||
\def\metropolis@subtitleformat#1{#1} |
|||
\def\metropolis@sectiontitleformat#1{#1} |
|||
\def\metropolis@frametitleformat#1{#1} |
|||
\patchcmd{\beamer@title}% |
|||
{\def\inserttitle{#2}}% |
|||
{\def\inserttitle{\metropolis@titleformat{#2}}}% |
|||
{}% |
|||
{\PackageError{beamerfontthememetropolis}{Patching title failed}} |
|||
\patchcmd{\beamer@subtitle}% |
|||
{\def\insertsubtitle{#2}}% |
|||
{\def\insertsubtitle{\metropolis@subtitleformat{#2}}}% |
|||
{}% |
|||
{\PackageError{beamerfontthememetropolis}{Patching subtitle failed}} |
|||
\patchcmd{\sectionentry} |
|||
{\def\insertsectionhead{#2}} |
|||
{\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}} |
|||
{} |
|||
{\PackageError{beamerfontthememetropolis}{Patching section title failed}} |
|||
\patchcmd{\beamer@section} |
|||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} |
|||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% |
|||
\metropolis@sectiontitleformat{#1}}}} |
|||
{} |
|||
{\PackageError{beamerfontthememetropolis}{Patching section title failed}} |
|||
\patchcmd{\beamer@@frametitle} |
|||
{\beamer@ifempty{#2}{}{% |
|||
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% |
|||
\usebeamertemplate*{frametitle continuation}\fi}}% |
|||
\gdef\beamer@frametitle{#2}% |
|||
\gdef\beamer@shortframetitle{#1}% |
|||
}} |
|||
{\beamer@ifempty{#2}{}{% |
|||
\gdef\insertframetitle{{\metropolis@frametitleformat{#2}\ifnum% |
|||
\beamer@autobreakcount>0\relax{}\space% |
|||
\usebeamertemplate*{frametitle continuation}\fi}}% |
|||
\gdef\beamer@frametitle{#2}% |
|||
\gdef\beamer@shortframetitle{#1}% |
|||
}} |
|||
{} |
|||
{\PackageError{beamerfontthememetropolis}{Patching frame title failed}} |
|||
\metropolis@font@setdefaults |
|||
\ProcessPgfPackageOptions{/metropolis/font} |
|||
\endinput |
|||
%% |
|||
%% End of file `beamerfontthememetropolis.sty'. |
@ -0,0 +1,281 @@ |
|||
%% |
|||
%% This is file `beamerinnerthememetropolis.sty', |
|||
%% generated with the docstrip utility. |
|||
%% |
|||
%% The original source files were: |
|||
%% |
|||
%% beamerinnerthememetropolis.dtx (with options: `package') |
|||
%% --------------------------------------------------------------------------- |
|||
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
|||
%% contributors can be found at |
|||
%% |
|||
%% https://github.com/matze/mtheme/graphs/contributors |
|||
%% |
|||
%% and the original template was based on the HSRM theme by Benjamin Weiss. |
|||
%% |
|||
%% 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{beamerinnerthememetropolis}[2016/03/14 Metropolis inner theme] |
|||
\RequirePackage{etoolbox} |
|||
\RequirePackage{keyval} |
|||
\RequirePackage{calc} |
|||
\RequirePackage{pgfopts} |
|||
\RequirePackage{tikz} |
|||
\pgfkeys{ |
|||
/metropolis/inner/sectionpage/.cd, |
|||
.is choice, |
|||
none/.code=\metropolis@disablesectionpage, |
|||
simple/.code={\metropolis@enablesectionpage |
|||
\setbeamertemplate{section page}[simple]}, |
|||
progressbar/.code={\metropolis@enablesectionpage |
|||
\setbeamertemplate{section page}[progressbar]}, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/inner/subsectionpage/.cd, |
|||
.is choice, |
|||
none/.code=\metropolis@disablesubsectionpage, |
|||
simple/.code={\metropolis@enablesubsectionpage |
|||
\setbeamertemplate{section page}[simple]}, |
|||
progressbar/.code={\metropolis@enablesubsectionpage |
|||
\setbeamertemplate{section page}[progressbar]}, |
|||
} |
|||
\newcommand{\metropolis@inner@setdefaults}{ |
|||
\pgfkeys{/metropolis/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}{ |
|||
\insertsubtitle% |
|||
\par% |
|||
\vspace*{0.5em} |
|||
} |
|||
\setbeamertemplate{title separator}{ |
|||
\begin{tikzpicture} |
|||
\fill[fg] (0,0) rectangle (\textwidth, 0.4pt); |
|||
\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\insertsubsection\@empty\else |
|||
\usebeamercolor[fg]{subsection title} |
|||
\usebeamerfont{subsection title} |
|||
\insertsubsection |
|||
\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\insertsubsection\@empty\else% |
|||
\usebeamercolor[fg]{subsection title}% |
|||
\usebeamerfont{subsection title}% |
|||
\insertsubsection |
|||
\fi |
|||
\end{minipage} |
|||
\par |
|||
\vspace{\baselineskip} |
|||
} |
|||
\newcommand{\metropolis@disablesectionpage}{ |
|||
\AtBeginSection{ |
|||
% intentionally empty |
|||
} |
|||
} |
|||
\newcommand{\metropolis@enablesectionpage}{ |
|||
\AtBeginSection{ |
|||
\ifbeamer@inframe |
|||
\sectionpage |
|||
\else |
|||
\frame[plain,c,noframenumbering]{\sectionpage} |
|||
\fi |
|||
} |
|||
} |
|||
\setbeamertemplate{subsection page}{% |
|||
\usebeamertemplate*{section page} |
|||
} |
|||
\newcommand{\metropolis@disablesubsectionpage}{ |
|||
\AtBeginSubsection{ |
|||
% intentionally empty |
|||
} |
|||
} |
|||
\newcommand{\metropolis@enablesubsectionpage}{ |
|||
\AtBeginSubsection{ |
|||
\ifbeamer@inframe |
|||
\subsectionpage |
|||
\else |
|||
\frame[plain,c,noframenumbering]{\subsectionpage} |
|||
\fi |
|||
} |
|||
} |
|||
\newlength{\metropolis@progressonsectionpage} |
|||
\setbeamertemplate{progress bar in section page}{ |
|||
\setlength{\metropolis@progressonsectionpage}{% |
|||
\textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}% |
|||
}% |
|||
\begin{tikzpicture} |
|||
\fill[bg] (0,0) rectangle (\textwidth, 0.4pt); |
|||
\fill[fg] (0,0) rectangle (\metropolis@progressonsectionpage, 0.4pt); |
|||
\end{tikzpicture}% |
|||
} |
|||
\def\inserttotalframenumber{100} |
|||
\newlength{\metropolis@blocksep} |
|||
\newlength{\metropolis@blockadjust} |
|||
\setlength{\metropolis@blocksep}{0.75ex} |
|||
\setlength{\metropolis@blockadjust}{0.25ex} |
|||
\providecommand{\metropolis@strut}{% |
|||
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}% |
|||
} |
|||
\newcommand{\metropolis@block}[1]{ |
|||
\par\vskip\medskipamount% |
|||
\setlength{\parskip}{0pt} |
|||
\ifbeamercolorempty[bg]{block title#1}{% |
|||
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{% |
|||
\ifbeamercolorempty[bg]{block title}{% |
|||
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}% |
|||
}% |
|||
{% |
|||
\begin{beamercolorbox}[ |
|||
sep=\dimexpr\metropolis@blocksep-\metropolis@blockadjust\relax, |
|||
leftskip=\metropolis@blockadjust, |
|||
rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax |
|||
]{block title#1}% |
|||
}}% |
|||
\usebeamerfont*{block title#1}% |
|||
\metropolis@strut% |
|||
\insertblocktitle% |
|||
\metropolis@strut% |
|||
\end{beamercolorbox}% |
|||
\nointerlineskip% |
|||
\ifbeamercolorempty[bg]{block body#1}{% |
|||
\begin{beamercolorbox}[vmode]{block body#1}}{ |
|||
\ifbeamercolorempty[bg]{block body}{% |
|||
\begin{beamercolorbox}[vmode]{block body#1}% |
|||
}{% |
|||
\begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}% |
|||
\vspace{-\metropolis@parskip} |
|||
}}% |
|||
\usebeamerfont{block body#1}% |
|||
\setlength{\parskip}{\metropolis@parskip}% |
|||
} |
|||
\setbeamertemplate{block begin}{\metropolis@block{}} |
|||
\setbeamertemplate{block alerted begin}{\metropolis@block{ alerted}} |
|||
\setbeamertemplate{block example begin}{\metropolis@block{ example}} |
|||
\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}} |
|||
\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}} |
|||
\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}} |
|||
\setbeamertemplate{itemize items}{\textbullet} |
|||
\setbeamertemplate{caption label separator}{: } |
|||
\setbeamertemplate{caption}[numbered] |
|||
\setbeamertemplate{footnote}{% |
|||
\parindent 0em\noindent% |
|||
\raggedright |
|||
\usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par% |
|||
} |
|||
\newlength{\metropolis@parskip} |
|||
\setlength{\metropolis@parskip}{0.5em} |
|||
\setlength{\parskip}{\metropolis@parskip} |
|||
\linespread{1.15} |
|||
\define@key{beamerframe}{c}[true]{% centered |
|||
\beamer@frametopskip=0pt plus 1fill\relax% |
|||
\beamer@framebottomskip=0pt plus 1fill\relax% |
|||
\beamer@frametopskipautobreak=0pt plus .4\paperheight\relax% |
|||
\beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax% |
|||
\def\beamer@initfirstlineunskip{}% |
|||
} |
|||
\providebool{metropolis@standout} |
|||
\define@key{beamerframe}{standout}[true]{% |
|||
\booltrue{metropolis@standout} |
|||
\begingroup |
|||
\setkeys{beamerframe}{c} |
|||
\setkeys{beamerframe}{noframenumbering} |
|||
\ifbeamercolorempty[bg]{palette primary}{ |
|||
\setbeamercolor{background canvas}{ |
|||
use=palette primary, |
|||
bg=-palette primary.fg |
|||
} |
|||
}{ |
|||
\setbeamercolor{background canvas}{ |
|||
use=palette primary, |
|||
bg=palette primary.bg |
|||
} |
|||
} |
|||
\centering |
|||
\usebeamercolor[fg]{palette primary} |
|||
\usebeamerfont{standout} |
|||
} |
|||
\apptocmd{\beamer@reseteecodes}{% |
|||
\ifbool{metropolis@standout}{ |
|||
\endgroup |
|||
\boolfalse{metropolis@standout} |
|||
}{} |
|||
}{}{} |
|||
\metropolis@inner@setdefaults |
|||
\ProcessPgfPackageOptions{/metropolis/inner} |
|||
\endinput |
|||
%% |
|||
%% End of file `beamerinnerthememetropolis.sty'. |
@ -0,0 +1,129 @@ |
|||
%% |
|||
%% This is file `beamerouterthememetropolis.sty', |
|||
%% generated with the docstrip utility. |
|||
%% |
|||
%% The original source files were: |
|||
%% |
|||
%% beamerouterthememetropolis.dtx (with options: `package') |
|||
%% --------------------------------------------------------------------------- |
|||
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
|||
%% contributors can be found at |
|||
%% |
|||
%% https://github.com/matze/mtheme/graphs/contributors |
|||
%% |
|||
%% and the original template was based on the HSRM theme by Benjamin Weiss. |
|||
%% |
|||
%% 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{beamerouterthememetropolis}[2016/03/14 Metropolis outer theme] |
|||
\RequirePackage{etoolbox} |
|||
\RequirePackage{calc} |
|||
\RequirePackage{pgfopts} |
|||
\pgfkeys{ |
|||
/metropolis/outer/numbering/.cd, |
|||
.is choice, |
|||
none/.code=\setbeamertemplate{frame numbering}[none], |
|||
counter/.code=\setbeamertemplate{frame numbering}[counter], |
|||
fraction/.code=\setbeamertemplate{frame numbering}[fraction], |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/outer/progressbar/.cd, |
|||
.is choice, |
|||
none/.code={% |
|||
\setbeamertemplate{headline}[plain] |
|||
\setbeamertemplate{frametitle}[plain] |
|||
\setbeamertemplate{footline}[plain] |
|||
}, |
|||
head/.code={\pgfkeys{/metropolis/outer/progressbar=none} |
|||
\addtobeamertemplate{headline}{}{% |
|||
\usebeamertemplate*{progress bar in head/foot} |
|||
} |
|||
}, |
|||
frametitle/.code={\pgfkeys{/metropolis/outer/progressbar=none} |
|||
\addtobeamertemplate{frametitle}{}{% |
|||
\usebeamertemplate*{progress bar in head/foot} |
|||
} |
|||
}, |
|||
foot/.code={\pgfkeys{/metropolis/outer/progressbar=none} |
|||
\addtobeamertemplate{footline}{}{% |
|||
\usebeamertemplate*{progress bar in head/foot}% |
|||
} |
|||
}, |
|||
} |
|||
\newcommand{\metropolis@outer@setdefaults}{ |
|||
\pgfkeys{/metropolis/outer/.cd, |
|||
numbering=counter, |
|||
progressbar=none, |
|||
} |
|||
} |
|||
\setbeamertemplate{navigation symbols}{} |
|||
\defbeamertemplate{frame footer}{none}{} |
|||
\defbeamertemplate{frame footer}{custom}[1]{ #1 } |
|||
\defbeamertemplate{frame numbering}{none}{} |
|||
\defbeamertemplate{frame numbering}{counter}{\insertframenumber} |
|||
\defbeamertemplate{frame numbering}{fraction}{ |
|||
\insertframenumber/\inserttotalframenumber |
|||
} |
|||
\defbeamertemplate{headline}{plain}{} |
|||
\defbeamertemplate{footline}{plain}{% |
|||
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}% |
|||
\usebeamerfont{page number in head/foot}% |
|||
\usebeamertemplate*{frame footer} |
|||
\hfill% |
|||
\usebeamertemplate*{frame numbering} |
|||
\end{beamercolorbox}% |
|||
} |
|||
\newlength{\metropolis@frametitle@padding} |
|||
\setlength{\metropolis@frametitle@padding}{2.2ex} |
|||
\newcommand{\metropolis@frametitlestrut@start}{ |
|||
\rule{0pt}{\metropolis@frametitle@padding +% |
|||
\totalheightof{% |
|||
\ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X}% |
|||
}% |
|||
}% |
|||
} |
|||
\newcommand{\metropolis@frametitlestrut@end}{ |
|||
\rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding} |
|||
} |
|||
\defbeamertemplate{frametitle}{plain}{% |
|||
\nointerlineskip% |
|||
\begin{beamercolorbox}[% |
|||
wd=\paperwidth,% |
|||
sep=0pt,% |
|||
leftskip=\metropolis@frametitle@padding,% |
|||
rightskip=\metropolis@frametitle@padding,% |
|||
]{frametitle}% |
|||
\metropolis@frametitlestrut@start% |
|||
\insertframetitle% |
|||
\nolinebreak% |
|||
\metropolis@frametitlestrut@end% |
|||
\end{beamercolorbox}% |
|||
} |
|||
\newlength{\metropolis@progressinheadfoot} |
|||
\setbeamertemplate{progress bar in head/foot}{ |
|||
\nointerlineskip |
|||
\setlength{\metropolis@progressinheadfoot}{% |
|||
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}% |
|||
}% |
|||
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot} |
|||
\begin{tikzpicture} |
|||
\fill[bg] (0,0) rectangle (\paperwidth, 0.4pt); |
|||
\fill[fg] (0,0) rectangle (\metropolis@progressinheadfoot, 0.4pt); |
|||
\end{tikzpicture}% |
|||
\end{beamercolorbox} |
|||
} |
|||
\AtBeginDocument{% |
|||
\apptocmd{\appendix}{% |
|||
\pgfkeys{% |
|||
/metropolis/outer/.cd, |
|||
numbering=none, |
|||
progressbar=none} |
|||
}{}{} |
|||
} |
|||
\metropolis@outer@setdefaults |
|||
\ProcessPgfPackageOptions{/metropolis/outer} |
|||
\endinput |
|||
%% |
|||
%% End of file `beamerouterthememetropolis.sty'. |
@ -0,0 +1,105 @@ |
|||
%% |
|||
%% This is file `beamerthememetropolis.sty', |
|||
%% generated with the docstrip utility. |
|||
%% |
|||
%% The original source files were: |
|||
%% |
|||
%% beamerthememetropolis.dtx (with options: `package') |
|||
%% --------------------------------------------------------------------------- |
|||
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
|||
%% contributors can be found at |
|||
%% |
|||
%% https://github.com/matze/mtheme/graphs/contributors |
|||
%% |
|||
%% and the original template was based on the HSRM theme by Benjamin Weiss. |
|||
%% |
|||
%% 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{beamerthememetropolis} |
|||
[2016/03/14 v1.1 Metropolis Beamer theme] |
|||
\RequirePackage{etoolbox} |
|||
\RequirePackage{pgfopts} |
|||
\pgfkeys{/metropolis/.cd, |
|||
.search also={ |
|||
/metropolis/inner, |
|||
/metropolis/outer, |
|||
/metropolis/color, |
|||
/metropolis/font, |
|||
} |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/titleformat plain/.cd, |
|||
.is choice, |
|||
regular/.code={% |
|||
\let\metropolis@plaintitleformat\@empty% |
|||
\setbeamerfont{standout}{shape=\normalfont}% |
|||
}, |
|||
smallcaps/.code={% |
|||
\let\metropolis@plaintitleformat\@empty% |
|||
\setbeamerfont{standout}{shape=\scshape}% |
|||
}, |
|||
allsmallcaps/.code={% |
|||
\let\metropolis@plaintitleformat\MakeLowercase% |
|||
\setbeamerfont{standout}{shape=\scshape}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat plain=allsmallcaps can lead to problems% |
|||
} |
|||
}, |
|||
allcaps/.code={% |
|||
\let\metropolis@plaintitleformat\MakeUppercase% |
|||
\setbeamerfont{standout}{shape=\normalfont}% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
Be aware that titleformat plain=allcaps can lead to problems% |
|||
} |
|||
}, |
|||
} |
|||
\pgfkeys{ |
|||
/metropolis/titleformat/.code=\pgfkeysalso{ |
|||
font/titleformat title=#1, |
|||
font/titleformat subtitle=#1, |
|||
font/titleformat section=#1, |
|||
font/titleformat frame=#1, |
|||
titleformat plain=#1, |
|||
} |
|||
} |
|||
\pgfkeys{/metropolis/.cd, |
|||
usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle}, |
|||
noslidenumbers/.code=\pgfkeysalso{outer/numbering=none}, |
|||
usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction}, |
|||
nosectionslide/.code=\pgfkeysalso{inner/sectionpage=none}, |
|||
darkcolors/.code=\pgfkeysalso{color/background=dark}, |
|||
blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill}, |
|||
} |
|||
\newcommand{\metropolis@setdefaults}{ |
|||
\pgfkeys{/metropolis/.cd, |
|||
titleformat plain=regular, |
|||
} |
|||
} |
|||
\useinnertheme{metropolis} |
|||
\useoutertheme{metropolis} |
|||
\usecolortheme{metropolis} |
|||
\usefonttheme{metropolis} |
|||
\AtEndPreamble{% |
|||
\@ifpackageloaded{pgfplots}{% |
|||
\RequirePackage{pgfplotsthemetol} |
|||
}{} |
|||
} |
|||
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}} |
|||
\def\metropolis@plaintitleformat#1{#1} |
|||
\newcommand{\plain}[2][]{% |
|||
\PackageWarning{beamerthememetropolis}{% |
|||
The syntax `\plain' may be deprecated in a future version of Metropolis. |
|||
Please use a frame with [standout] instead. |
|||
} |
|||
\begin{frame}[standout]{#1} |
|||
\metropolis@plaintitleformat{#2} |
|||
\end{frame} |
|||
} |
|||
\newcommand{\mreducelistspacing}{\vspace{-\topsep}} |
|||
\metropolis@setdefaults |
|||
\ProcessPgfOptions{/metropolis} |
|||
\endinput |
|||
%% |
|||
%% End of file `beamerthememetropolis.sty'. |
@ -0,0 +1,183 @@ |
|||
%% drawstack.sty |
|||
% |
|||
% v0 (2010) : draw stack. |
|||
% v0.1 (2012) : draw structures outside stack. |
|||
% |
|||
%% Copyright 2010,2012 Matthieu Moy <Matthieu.Moy@imag.fr> |
|||
% |
|||
% This work may be distributed and/or modified under the |
|||
% conditions of the LaTeX Project Public License, either version 1.3 |
|||
% of this license or (at your option) any later version. |
|||
% The latest version of this license is in |
|||
% http://www.latex-project.org/lppl.txt |
|||
% and version 1.3 or later is part of all distributions of LaTeX |
|||
% version 2005/12/01 or later. |
|||
% |
|||
% This work has the LPPL maintenance status `maintained'. |
|||
% |
|||
% The Current Maintainer of this work is M. Matthieu Moy. |
|||
% |
|||
% This work consists of the files drawstack.sty and the example file |
|||
% stack-example.tex. |
|||
|
|||
\NeedsTeXFormat{LaTeX2e} |
|||
|
|||
\ProvidesPackage{drawstack}[2010/08/06 Draw Execution Stack in LaTeX] |
|||
|
|||
\RequirePackage{tikz} |
|||
\RequirePackage{ifthen} |
|||
|
|||
% Default styles definition. |
|||
\tikzstyle{freecell}=[fill=green!10,draw=green!30!black] |
|||
\tikzstyle{freestruct}=[fill=blue!10,draw=blue!30!black] |
|||
\tikzstyle{occupiedcell}=[fill=green!10!red!10,draw=green!30!black] |
|||
\tikzstyle{padding}=[fill=green!10!black!10,draw=green!30!black] |
|||
\tikzstyle{highlight}=[draw=red!50!black,text=red!50!black] |
|||
|
|||
\DeclareOption{nocolor}{ |
|||
\tikzstyle{freecell}=[fill=white!95!black,draw=black] |
|||
\tikzstyle{freestruct}=[fill=white!93!black,draw=black] |
|||
\tikzstyle{occupiedcell}=[fill=white!60!black,draw=black] |
|||
\tikzstyle{padding}=[fill=white!90!black!10,draw=black] |
|||
\tikzstyle{highlight}=[draw=black,text=black] |
|||
} |
|||
\ProcessOptions |
|||
|
|||
\pgfdeclarelayer{background layer} |
|||
\pgfdeclarelayer{foreground layer} |
|||
\pgfsetlayers{background layer,main,foreground layer} |
|||
\usetikzlibrary{shapes} % ellipse |
|||
\usetikzlibrary{snakes} % braces |
|||
|
|||
\newcounter{cellnb} |
|||
\newcounter{structnb} |
|||
\setcounter{cellnb}{0} |
|||
|
|||
\newcommand{\llcell}[3]{ |
|||
\addtocounter{cellnb}{-#1} |
|||
\setcounter{ptrnb}{0} |
|||
\draw[#2] (0,\value{cellnb}) +(-2,-.5) rectangle +(2,-.5+#1); |
|||
\draw (0,\value{cellnb}+#1/2-0.5) node(currentcell) {#3}; |
|||
} |
|||
\newcommand{\bigcell}[2]{ |
|||
\llcell{#1}{freecell}{#2} |
|||
\foreach \c in {2,...,#1} { |
|||
\draw[freecell] |
|||
(-2,\value{cellnb}+\c-1.5) -- (-1.7,\value{cellnb}+\c-1.5); |
|||
\draw[freecell] |
|||
(1.7,\value{cellnb}+\c-1.5) -- (2,\value{cellnb}+\c-1.5); |
|||
} |
|||
} |
|||
\newcommand{\cell}[2][freecell]{% |
|||
\llcell{1}{#1}{#2}} |
|||
|
|||
\newcommand{\separator}[1][freecell,very thick]{ |
|||
\draw[#1] (0,\value{cellnb}) +(-2,-.5) -- +(2,-.5); |
|||
} |
|||
|
|||
% Pointer to the next cell, useful if the next cell has size != 0. |
|||
\newcommand{\cellptrnext}[1]{ |
|||
\draw[<-,line width=0.7pt] (0,\value{cellnb}-1) +(2,\value{ptrnb}*0.1) -- +(2.5,\value{ptrnb}*0.45); |
|||
\draw (2.5,\value{ptrnb}*0.5+\value{cellnb}-1) node[anchor=west] {#1}; |
|||
\addtocounter{ptrnb}{1} |
|||
} |
|||
\newcounter{ptrnb} |
|||
\newcommand{\cellptr}[1]{ |
|||
\draw[<-,line width=0.7pt] (0,\value{cellnb}) +(2,\value{ptrnb}*0.1) -- +(2.5,\value{ptrnb}*0.45); |
|||
\draw (2.5,\value{ptrnb}*0.5+\value{cellnb}) node[anchor=west] {#1}; |
|||
\addtocounter{ptrnb}{1} |
|||
} |
|||
\newcommand{\esp}{\cellptr{\%esp}} |
|||
\newcommand{\ebp}{\cellptr{\%ebp}} |
|||
|
|||
% like cellptr, but without the arrow |
|||
\newcommand{\cellcom}[1]{ |
|||
\draw (2.4,\value{ptrnb}*0.5+\value{cellnb}) node[anchor=west] {#1}; |
|||
\addtocounter{ptrnb}{1} |
|||
} |
|||
% like cellcom, but on the left hand side |
|||
\newcommand{\cellcomL}[1]{ |
|||
\draw (-2,\value{ptrnb}*0.5+\value{cellnb}) node[anchor=east] {#1}; |
|||
\addtocounter{ptrnb}{1} |
|||
} |
|||
|
|||
\newcommand{\cellround}[1]{ |
|||
\begin{pgfonlayer}{foreground layer} |
|||
\draw[highlight] (0,\value{cellnb}) |
|||
node[shape=ellipse,draw, minimum width=3cm, minimum height=0.9cm] |
|||
(marked) {}; |
|||
\draw[highlight] (0,\value{cellnb}) +(3,1.3) node[anchor=west] (textmarked) {#1}; |
|||
\draw[highlight,->] (marked) -- (textmarked.text); |
|||
\end{pgfonlayer} |
|||
} |
|||
|
|||
\newcommand{\stacktop}[2][freecell]{ |
|||
\setcounter{cellnb}{0} |
|||
\ifthenelse{\equal{#2}{}}{}{ |
|||
\draw (0,\value{cellnb}) node {#2}; |
|||
\addtocounter{cellnb}{-1} |
|||
} |
|||
|
|||
\draw[#1] (0,\value{cellnb}) |
|||
+(-2,.5) -- +(-2,-.5) -- +(2,-.5) -- +(2,.5); |
|||
\draw (0,\value{cellnb}) node{...}; |
|||
} |
|||
\newcommand{\stackbottom}[1][freecell]{ |
|||
\addtocounter{cellnb}{-1} |
|||
\draw[#1] (0,\value{cellnb}) |
|||
+(-2,-.5) -- +(-2,+.5) -- +(2,+.5) -- +(2,-.5); |
|||
\draw (0,\value{cellnb}) node{...}; |
|||
} |
|||
\newenvironment{drawstack}[1][]% |
|||
{\begin{tikzpicture}[#1]\stacktop{}}% |
|||
{\stackbottom\end{tikzpicture}} |
|||
|
|||
\newcommand{\bcell}[1]{\cell[occupiedcell]{#1}} |
|||
\newcommand{\padding}[2]{\llcell{#1}{padding}{#2}} |
|||
\newcommand{\bstacktop}[0]{\stacktop[occupiedcell]} |
|||
\newcommand{\bstackbottom}[0]{\stackbottom[occupiedcell]} |
|||
|
|||
\newcounter{startframe} |
|||
\newcommand{\startframe}[0]{ |
|||
\setcounter{startframe}{\value{cellnb}} |
|||
} |
|||
\newcommand{\finishframe}[1]{ |
|||
\draw[snake=brace, line width=0.6pt, segment amplitude=7pt] |
|||
(-2,\value{cellnb}-0.5) -- (-2,\value{startframe}-0.5); |
|||
\draw (-4.2cm,\value{cellnb}*0.5+\value{startframe}*0.5-0.5) node |
|||
{\parbox{2cm}{% |
|||
\begin{flushright} |
|||
#1 |
|||
\end{flushright}}}; |
|||
} |
|||
\newcommand{\stackframe}[3]{ |
|||
\draw[snake=brace] (-2,-#1-0.5) -- (-2,-#2-0.5); |
|||
\draw (0, #1) node {#3}; |
|||
} |
|||
|
|||
\newcommand{\drawstruct}[1]{ |
|||
\setcounter{structnb}{0} |
|||
\path #1 coordinate (structpos); |
|||
\path (structpos) ++ (0,\value{structnb}) +(-1.6,-.5) coordinate (structtopleft); |
|||
} |
|||
|
|||
\newcommand{\llstructcell}[3]{ |
|||
\addtocounter{structnb}{-#1} |
|||
\path (structpos) ++ (0,\value{structnb}) +(-1.6,-.5) coordinate (topleft); |
|||
\path (structpos) ++ (0,\value{structnb}) +(-1.6,-.5+#1) coordinate (bottomleft); |
|||
\path (structpos) ++ (0,\value{structnb}) +( 1.6,-.5+#1) coordinate (bottomright); |
|||
\draw[#2] (topleft) rectangle (bottomright); |
|||
\draw (structpos) ++ (0,\value{structnb}+#1/2-0.5) node (currentcell){#3}; |
|||
} |
|||
|
|||
\newcommand{\structcell}[2][freestruct]{% |
|||
\llstructcell{1}{#1}{#2} |
|||
} |
|||
|
|||
\newcommand{\structname}[1]{ |
|||
\path (structpos) ++ (0,\value{structnb}) +(-1.6,-.5) coordinate (structbottomleft); |
|||
\draw (barycentric cs:structtopleft=.5,structbottomleft=.5) |
|||
node[rotate=90,anchor=south] {#1}; |
|||
} |
|||
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
@ -0,0 +1,163 @@ |
|||
\pdfminorversion=4 |
|||
|
|||
\documentclass{beamer} |
|||
|
|||
\usepackage[T1]{ fontenc } |
|||
\usepackage[utf8]{ inputenc } |
|||
\usepackage{ lmodern } |
|||
\usepackage{ color } |
|||
\usepackage{ graphicx } |
|||
\graphicspath{ {./pix/} } |
|||
|
|||
\usepackage{ drawstack } |
|||
|
|||
\usetheme{metropolis} |
|||
|
|||
\title{Customs tests in Free Electrons's lab} |
|||
\subtitle{} |
|||
\date{\today} |
|||
\author{Florent (Skia) Jacquet} |
|||
\institute{Free Electrons} |
|||
|
|||
\begin{document} |
|||
|
|||
\maketitle |
|||
|
|||
\begin{frame}[fragile]\frametitle{Why custom tests} |
|||
\begin{itemize} |
|||
\item Just booting is not enough. |
|||
\item Need to test some specific components such as USB, SATA, |
|||
network... |
|||
\item Also need to test with custom kernel images, or custom rootfs, or |
|||
both. |
|||
\item Need to be able to send jobs, on demand, easilly, on the specified |
|||
boards, while being notified at the end. |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\section{Overall architecture} |
|||
\begin{frame}[fragile]\frametitle{Many tools} |
|||
\begin{itemize} |
|||
\item LAVA |
|||
\item Buildroot |
|||
\item The custom test tool |
|||
\item The test suite |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\begin{frame}[fragile]\frametitle{LAVA} |
|||
\begin{itemize} |
|||
\item Runs jobs on devices. |
|||
\item Runs KernelCI jobs: only boot. |
|||
\item Provides an API to do many thing. Among them: sending jobs and |
|||
querying results. |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\begin{frame}[fragile]{Buildroot} |
|||
\begin{itemize} |
|||
\item Used to make only rootfs. |
|||
\item Is configured to provided the needed tools such as iperf, |
|||
bonnie++, etc... |
|||
\item Builds fresh rootfs every night for all the needed architectures: |
|||
ARMv4, ARMv5, ARMv7, ARMv8. |
|||
\item Stores them in a LAVA-accessible folder. |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\begin{frame}[fragile]{The custom test tool} |
|||
\begin{itemize} |
|||
\item Has jobs templates and knows how to send them. |
|||
\item Can upload custom artifacts useable for tests. |
|||
\item Can ask LAVA to notify given emails addresses when the job ends. |
|||
\item Needs an access to the LAVA API, an SSH access to the LAVA server |
|||
to upload artifacts, and a KernelCI API token to go fetch the latest |
|||
builds if no custom artifacts are provided. |
|||
\item Keeps a \verb$boards.py$ file to store the boards configuration. |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\begin{frame}[fragile]{The test suite} |
|||
\begin{itemize} |
|||
\item Is a bunch of shell scripts that will be run on the devices. |
|||
\item Also needs YAML files to interface with LAVA. |
|||
\item Leaves in one of our git repo on Github \footnote{\url{https://github.com/free-electrons/test_suite}}. |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\begin{frame}[fragile]{Workflow} |
|||
\begin{itemize} |
|||
\item Daily jobs: |
|||
\begin{itemize} |
|||
\item A cron job runs at 23:23 to: |
|||
\begin{itemize} |
|||
\item Build fresh rootfs. |
|||
\item Launch custom tests on every boards with there |
|||
default configuration. |
|||
\end{itemize} |
|||
\item Another cron is run at 11:00 to get the results of the |
|||
last 24 hours and send mails given the failed tests and |
|||
which email address is subscribed to what board. |
|||
\end{itemize} |
|||
\item On demand jobs: |
|||
\begin{itemize} |
|||
\item Someone installs and configures the custom test tool on |
|||
his/her laptop. |
|||
\item He/She can send jobs, specifying whether to use custom |
|||
boot artifacts from his/her laptop, or to use KernelCI's |
|||
one, and in that case, which branch on which tree to use. |
|||
\item He/She gets notified once the job's done. |
|||
\end{itemize} |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\section{How do tests works?} |
|||
|
|||
\begin{frame}[fragile]{LAVA v2 jobs} |
|||
\begin{itemize} |
|||
\item Jobs are YAML files that, combined with the device-types and |
|||
devices dictionaries in the LAVA configuration, describe what to do |
|||
with which device. |
|||
\item It contains: |
|||
\begin{itemize} |
|||
\item Which device(s) to use |
|||
\item The artifacts informations (URL, type, ...) |
|||
\item How to boot them (Uboot, fastboot, ramdisk, nfs, shell |
|||
strings to expect, ...) |
|||
\item The tests to run once booted. |
|||
\item Some metadata and various job informations (priority, |
|||
notifications, timeouts, ...) |
|||
\end{itemize} |
|||
\end{itemize} |
|||
\end{frame} |
|||
|
|||
\begin{frame}[fragile]{How do LAVA runs test?} |
|||
\begin{itemize} |
|||
\item Before bringing up the board, LAVA: |
|||
\begin{itemize} |
|||
\item Fetches the artifacts. |
|||
\item Applies the needed modifications (append DTB, mkimage, |
|||
modules, ...) |
|||
\item Also downloads the test suite and puts it in the rootfs. |
|||
This moment also makes some magic to provide some helpers |
|||
useable in the test scripts. |
|||
\item Finally connects itself and powers up the board. |
|||
\end{itemize} |
|||
\item After the board is booted: |
|||
\begin{itemize} |
|||
\item Runs each test described in the job definition. |
|||
\item For each call to the `lava-test-case` function, creates |
|||
the results objects. |
|||
\end{itemize} |
|||
\end{itemize} |
|||
|
|||
\end{frame} |
|||
|
|||
|
|||
\begin{frame}{Questions} |
|||
\begin{center} |
|||
\alert{Question?} |
|||
\end{center} |
|||
\end{frame} |
|||
|
|||
\end{document} |
@ -0,0 +1,20 @@ |
|||
\frametitle{How do LAVA runs test?} |
|||
\begin{itemize} |
|||
\item Before bringing up the board, LAVA: |
|||
\begin{itemize} |
|||
\item Fetches the artifacts. |
|||
\item Applies the needed modifications (append DTB, mkimage, |
|||
modules, ...) |
|||
\item Also downloads the test suite and puts it in the rootfs. |
|||
This moment also makes some magic to provide some helpers |
|||
useable in the test scripts. |
|||
\item Finally connects itself and powers up the board. |
|||
\end{itemize} |
|||
\item After the board is booted: |
|||
\begin{itemize} |
|||
\item Runs each test described in the job definition. |
|||
\item For each call to the `lava-test-case` function, creates |
|||
the results objects. |
|||
\end{itemize} |
|||
\end{itemize} |
|||
|
Kirjoita
Esikatselu
Ladataan…
Peruuta
Tallenna