diff --git a/c++_evolution.tex b/c++_evolution.tex new file mode 100644 index 0000000..e1cbcf0 --- /dev/null +++ b/c++_evolution.tex @@ -0,0 +1,434 @@ +\documentclass[8pt,aspectratio=169]{beamer} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\usepackage[most, minted]{tcolorbox} +\usepackage{xcolor} +\usepackage{graphicx} +\usepackage{fancyvrb} +\usepackage{tikz} +\usepackage{colortbl} +\usepackage{booktabs} +\usepackage[super]{nth} +\usepackage{amssymb} +\usepackage[binary-units=true]{siunitx} +\usepackage{booktabs} +\usepackage{pgfpages} + +%\setbeameroption{show notes on second screen=left} + +\usemintedstyle{emacs} + +\makeatletter +% Define commands to select the folder where the Beamer theme lies in +\def\beamer@calltheme#1#2#3{% + \def\beamer@themelist{#2} + \@for\beamer@themename:=\beamer@themelist\do + {\usepackage[{#1}]{\beamer@themelocation/#3\beamer@themename}}} + +\def\usefolder#1{ + \def\beamer@themelocation{#1} +} +\def\beamer@themelocation{} + +% Patch Table of Content to insert fixed spaces between items instead of vfills +\patchcmd{\beamer@sectionintoc} + {\vfill} + {\vskip\itemsep} + {} + {} + +% New counter for line numbers +\newcounter{verbatim@cnt} + +% This is for color band on the linenos in listings +\AtEndEnvironment{Verbatim}{% + \stepcounter{verbatim@cnt}% + \protected@write\@auxout{}{% + \global\protect\@namedef{verbatim@numwidth@\the\c@verbatim@cnt}{% + \ifnum\c@FancyVerbLine>999 + 7.5mm% + \else\ifnum\c@FancyVerbLine>99 + 6mm% + \else + 4mm% + \fi\fi + }% + }% +} + +\def\minted@auto@numwidth#1{% + \ifcsname verbatim@numwidth@\the\numexpr\c@verbatim@cnt#1\relax\endcsname + \csname verbatim@numwidth@\the\numexpr\c@verbatim@cnt#1\relax\endcsname + \else + 4mm% + \fi +} + +\tcbset{bashstyle/.style={ + colframe=black!70, + listing engine=minted, + listing only, + minted style=colorful, + minted language=console, + size=fbox, + breakable, + enhanced, + minted options={ + autogobble=true, + breaklines=true, + breakbefore=., + numbersep=2mm, + }, + }} + +\tcbset{cxx/.style={ + colframe=black!70, + listing engine=minted, + listing only, + minted style=emacs, + minted language=C++, + size=fbox, + breakable, + enhanced, + minted options={ + autogobble=true, + linenos, + breaklines=true, + breakbefore=., + numbersep=2mm, + escapeinside=||, + }, + overlay={% + \begin{tcbclipinterior} + \fill[gray!25] (frame.south west) rectangle ([xshift=\dimexpr\minted@auto@numwidth{}\relax]frame.north west); + \end{tcbclipinterior} + }, + % in "left", \c@verbatim@cnt is not stepped yet, hence the argument "+1" + left=\dimexpr\minted@auto@numwidth{+1}\relax, + }} + +% \EscMintinline[options]{}{} +\def\EscMintinline{% + \FVExtraRobustCommand + \RobustEscMintinline + \FVExtraUnexpandedReadOArgMArgEscVArg} + +\NewExpandableDocumentCommand \FVExtraUnexpandedReadOArgMArgEscVArg { o m m } {% + \IfNoValueTF{#1} + {\FVExtraAlwaysUnexpanded + {\FVExtraUnexpandedReadOArgMArgEscVArg{#2}{#3}}} + {\FVExtraAlwaysUnexpanded + {\FVExtraUnexpandedReadOArgMArgEscVArg[#1]{#2}{#3}}}% +} + +\newrobustcmd\RobustEscMintinline[2][]{% + % similar to \mintinline + \begingroup + \setboolean{minted@isinline}{true}% + \minted@configlang{#2}% + \setkeys{minted@opt@cmd}{#1}% + \minted@fvset + \begingroup + \@ifnextchar\bgroup + {\FVExtraDetokenizeREscVArg{\minted@inline@iii}}% + {\PackageError{minted}% + {\string\EscMintinline\space delimiters must be paired curly braces in this context}% + {Delimit argument with curly braces}}} +\makeatother + +\newtcblisting{bashcode}{% + colframe=black!70, + width=\linewidth, + bashstyle, +} + +\newtcblisting{consoleoutput}{% + colback=black, + colupper=gray!50, + colframe=black!70, + listing engine=minted, + listing only, + minted style=monokai, + minted language=console, + size=fbox, + breakable, + enhanced, + minted options={ + autogobble=true, + breaklines=true, + breakbefore=., + numbersep=2mm, + }, +% width=80ex, +} + +\newtcblisting{cxxcode}[2][]{ + cxx, + title={#2}, + #1, +} + +\newtcbinputlisting{cxxfile}[2][]{% + cxx, + minted options app={ + fontsize=\small, + }, + listing file={#2}, + % width=80ex, + #1 +} + +\newcommand{\cxxinline}[1]{\EscMintinline{C++}{#1}} +\newcommand{\cmd}[1]{\EscMintinline[style=colorful]{console}{#1}} +%newmintinline[cmd]{console}{style=colorful,autogobble} +\newcommand{\code}[1]{\texttt{\bf #1}} + +\DeclareSIUnit\flop{FLOP} +\DeclareSIUnit\transfer{T} +\DeclareSIUnit\cycle{c} +\DeclareSIUnit\flops{\flop\per\second} +\DeclareSIUnit\chf{CHF} +\sisetup{per-mode=symbol} +\sisetup{exponent-product = \cdot} +\sisetup{group-separator={\mathrm{'}}} + +\definecolor{blue0}{HTML}{002255} +\definecolor{blue1}{HTML}{003380} +\definecolor{blue2}{HTML}{0044AA} +\definecolor{blue3}{HTML}{0055D4} +\definecolor{blue4}{HTML}{0066FF} +\definecolor{blue5}{HTML}{2A7FFF} +\definecolor{blue6}{HTML}{5599FF} +\definecolor{blue7}{HTML}{80B3FF} +\definecolor{blue8}{HTML}{AACCFF} +\definecolor{blue9}{HTML}{D5E5FF} + +\definecolor{yellowbrown0}{HTML}{554400} +\definecolor{yellowbrown1}{HTML}{806600} +\definecolor{yellowbrown2}{HTML}{AA8800} +\definecolor{yellowbrown3}{HTML}{D4AA00} +\definecolor{yellowbrown4}{HTML}{FFCC00} +\definecolor{yellowbrown5}{HTML}{FFD42A} +\definecolor{yellowbrown6}{HTML}{FFDD55} +\definecolor{yellowbrown7}{HTML}{FFE680} +\definecolor{yellowbrown8}{HTML}{FFEEAA} +\definecolor{yellowbrown9}{HTML}{FFF6D5} + +\definecolor{colShellBg}{HTML}{F5EDE4} +\definecolor{links}{HTML}{2A1B81} +\hypersetup{colorlinks,linkcolor=,urlcolor=links} + +\usefolder{scitas_theme} +\usetheme{scitas} + +\newcommand{\FIGREP}{figures} +\renewcommand{\arraystretch}{1.3} + +% Remove numbering from the ToC when it's spread on multiple frames +\setbeamertemplate{frametitle continuation}{} + +\title{Evolution of C++} +\author[N. Richart]{Nicolas Richart} +\date{\nth{15} of March 2022} + +\begin{document} + +\begin{frame}[plain] + \titlepage +\end{frame} + +\begin{frame}[fragile] + \frametitle{C with Classes} + + \begin{itemize} + \item Developed by Bjarne Stroustrup + \item Started in 1979 in AT\&T Bell Labs + \item C compiler extended with ideas from Simula, Algol 68, Ada + \item New features + \begin{itemize} + \item classes + \item derived classes + \item public private members + \item strong typing (no undefined functions, static type checking, ...) + \item in-lining + \item default arguments + \end{itemize} + \item 1982 renamed to C++ + \begin{itemize} + \item virtual functions + \item function name, operator overloading + \item references + \item constants + \item type-safe free-store memory allocation (new/delete) + \item improved type checking + \item single-line comments with two forward slashes (//) + \end{itemize} + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{C++ 2.0 and first standardization} + + \begin{itemize} + \item C++ 2.0 in 1989 + \begin{itemize} + \item multiple inheritance + \item abstract classes + \item static member functions + \item const member functions + \item protected members + \end{itemize} + \item 1991 further improvements + \begin{itemize} + \item templates + \item exceptions + \item namespaces + \item new casts + \item Boolean type. + \end{itemize} + \item 1998 first standardization of the standard as ISO C++ + \item Small correction in C++03 + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Modern C++} + + \begin{minipage}{0.44\linewidth} + \begin{itemize} + \item C++11 / C++14 + \item Languages changes (selection): + \begin{itemize} + \item<2-> rvalue reference and move constructor (NRVO) + \item<3-> \code{constexpr} posibility of compile time optimizations + \item<4-> type inference (\code{auto}, \code{decltype}) + \item<5-> range-based for loop + \item<6-> lambda functions + \item<7-> strongly typed enumerations + \item<8-> variadic templates + \item<9-> user defined literals + \item<10-> \code{default}, \code{delete}, \code{override} and \code{final} + \item<11-> right angle bracket + \end{itemize} + + \item Library changes (selection: + \begin{itemize} + \item<12-> tuple types + \item<13-> hash tables + \item<14-> smart pointers (RAII) + \item<15-> type traits (SFINEA) + \end{itemize} + \end{itemize} + \end{minipage} + \hfill + \begin{minipage}{0.55\linewidth} + \begin{overprint} + \onslide<2> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{rvalue} + MyClass && m; + \end{cxxcode} + \begin{cxxcode}[minted options app={fontsize=\small}]{move constructor} + MovableClass & operator=(MovableClass && m); + \end{cxxcode} + \begin{cxxcode}[minted options app={fontsize=\small}]{NRVO or move} + MyClass f() { + MyClass tmp; + // do something with tmp + return tmp; + } + \end{cxxcode} + \end{minipage} + \onslide<3> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{constexpr pow} + constexpr double pow(double x, int n) { + double p = 1.; + for(int i =0; i < n; ++i) p *= x; + return p; + } + + constexpr double pi_2 = pow(std::atan(1.) * 4., 2); + \end{cxxcode} + \end{minipage} + \onslide<4> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{} + // C++03 + std::vector::const_iterator it = vector.begin(); + // C++11 + auto it = vector.begin(); + decltype(it) it2; + // C++14 + auto deduceReturnType(); + decltype(auto) deduceReturnTypeMaybeRef(); + \end{cxxcode} + \end{minipage} + \onslide<5> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{} + for(auto & v: vector) { + // do something with v + } + \end{cxxcode} + \end{minipage} + \onslide<6> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{} + // C++03 + bool ComparePairs(std::pair & a, std::pair &b) { + return a.first < b.second; + } + std::sort(vector.begin(), vector.end(), ComparePairs); + // C++11 + std::sort(vector.begin(), vector.end(), + [](std::pair & a, std::pair &b) { + return a.first < b.second; + }); + // C++14 + std::sort(vector.begin(), vector.end(), + [](auto & a, auto & b) { + return a.first < b.second; + }); + \end{cxxcode} + \end{minipage} + \onslide<7> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{} + enum class Colors { + blue, + red, + green, + }; + + Colors color = Colors::blue; + int fail = Colors::red; // not valid + \end{cxxcode} + \end{minipage} + \onslide<8> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{} + template + void variadicFunction(Ts... ts); + \end{cxxcode} + \end{minipage} + \onslide<9> + \begin{minipage}{\linewidth} + \begin{cxxcode}[minted options app={fontsize=\small}]{} + auto speed = 10._m / 1._s; + \end{cxxcode} + \end{minipage} + + \end{overprint} + \end{minipage} + \onslide<1>\addimage[width=3.7cm]{images/C++11}{11}{.4} +\end{frame} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-command-extra-options: "-shell-escape" +%%% TeX-master: t +%%% End: diff --git a/images/C++11.png b/images/C++11.png new file mode 100644 index 0000000..90b474d Binary files /dev/null and b/images/C++11.png differ diff --git a/phys_743_parallel_programming.tex b/phys_743_parallel_programming.tex new file mode 100644 index 0000000..3bcab52 --- /dev/null +++ b/phys_743_parallel_programming.tex @@ -0,0 +1,247 @@ +\documentclass[8pt,aspectratio=169]{beamer} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\usepackage[most, minted]{tcolorbox} +\usepackage{xcolor} +\usepackage{graphicx} +\usepackage{fancyvrb} +\usepackage{tikz} +\usepackage{colortbl} +\usepackage{booktabs} +\usepackage[super]{nth} +\usepackage{amssymb} +\usepackage[binary-units=true]{siunitx} +\usepackage{booktabs} +\usepackage{pgfpages} + +%\setbeameroption{show notes on second screen=left} + +\usemintedstyle{emacs} + +\makeatletter +% Define commands to select the folder where the Beamer theme lies in +\def\beamer@calltheme#1#2#3{% + \def\beamer@themelist{#2} + \@for\beamer@themename:=\beamer@themelist\do + {\usepackage[{#1}]{\beamer@themelocation/#3\beamer@themename}}} + +\def\usefolder#1{ + \def\beamer@themelocation{#1} +} +\def\beamer@themelocation{} + +% Patch Table of Content to insert fixed spaces between items instead of vfills +\patchcmd{\beamer@sectionintoc} + {\vfill} + {\vskip\itemsep} + {} + {} + +% New counter for line numbers +\newcounter{verbatim@cnt} + +% This is for color band on the linenos in listings +\AtEndEnvironment{Verbatim}{% + \stepcounter{verbatim@cnt}% + \protected@write\@auxout{}{% + \global\protect\@namedef{verbatim@numwidth@\the\c@verbatim@cnt}{% + \ifnum\c@FancyVerbLine>999 + 7.5mm% + \else\ifnum\c@FancyVerbLine>99 + 6mm% + \else + 4mm% + \fi\fi + }% + }% +} + +\def\minted@auto@numwidth#1{% + \ifcsname verbatim@numwidth@\the\numexpr\c@verbatim@cnt#1\relax\endcsname + \csname verbatim@numwidth@\the\numexpr\c@verbatim@cnt#1\relax\endcsname + \else + 4mm% + \fi +} + +\tcbset{bashstyle/.style={ + colframe=black!70, + listing engine=minted, + listing only, + minted style=colorful, + minted language=console, + size=fbox, + breakable, + enhanced, + minted options={ + autogobble=true, + breaklines=true, + breakbefore=., + numbersep=2mm, + }, + }} + +\tcbset{cxx/.style={ + colframe=black!70, + listing engine=minted, + listing only, + minted style=emacs, + minted language=C++, + size=fbox, + breakable, + enhanced, + minted options={ + autogobble=true, + linenos, + breaklines=true, + breakbefore=., + numbersep=2mm, + escapeinside=||, + }, + overlay={% + \begin{tcbclipinterior} + \fill[gray!25] (frame.south west) rectangle ([xshift=\dimexpr\minted@auto@numwidth{}\relax]frame.north west); + \end{tcbclipinterior} + }, + % in "left", \c@verbatim@cnt is not stepped yet, hence the argument "+1" + left=\dimexpr\minted@auto@numwidth{+1}\relax, + }} + +% \EscMintinline[options]{}{} +\def\EscMintinline{% + \FVExtraRobustCommand + \RobustEscMintinline + \FVExtraUnexpandedReadOArgMArgEscVArg} + +\NewExpandableDocumentCommand \FVExtraUnexpandedReadOArgMArgEscVArg { o m m } {% + \IfNoValueTF{#1} + {\FVExtraAlwaysUnexpanded + {\FVExtraUnexpandedReadOArgMArgEscVArg{#2}{#3}}} + {\FVExtraAlwaysUnexpanded + {\FVExtraUnexpandedReadOArgMArgEscVArg[#1]{#2}{#3}}}% +} + +\newrobustcmd\RobustEscMintinline[2][]{% + % similar to \mintinline + \begingroup + \setboolean{minted@isinline}{true}% + \minted@configlang{#2}% + \setkeys{minted@opt@cmd}{#1}% + \minted@fvset + \begingroup + \@ifnextchar\bgroup + {\FVExtraDetokenizeREscVArg{\minted@inline@iii}}% + {\PackageError{minted}% + {\string\EscMintinline\space delimiters must be paired curly braces in this context}% + {Delimit argument with curly braces}}} +\makeatother + +\newtcblisting{bashcode}{% + colframe=black!70, + width=\linewidth, + bashstyle, +} + +\newtcblisting{consoleoutput}{% + colback=black, + colupper=gray!50, + colframe=black!70, + listing engine=minted, + listing only, + minted style=monokai, + minted language=console, + size=fbox, + breakable, + enhanced, + minted options={ + autogobble=true, + breaklines=true, + breakbefore=., + numbersep=2mm, + }, +% width=80ex, +} + +\newtcblisting{cxxcode}[2][]{ + cxx, + title={#2}, + #1, +} + +\newtcbinputlisting{cxxfile}[2][]{% + cxx, + minted options app={ + fontsize=\small, + }, + listing file={#2}, + % width=80ex, + #1 +} + +\newcommand{\cxxinline}[1]{\EscMintinline{C++}{#1}} +\newcommand{\cmd}[1]{\EscMintinline[style=colorful]{console}{#1}} +%newmintinline[cmd]{console}{style=colorful,autogobble} +\newcommand{\code}[1]{\texttt{\bf #1}} + +\DeclareSIUnit\flop{FLOP} +\DeclareSIUnit\transfer{T} +\DeclareSIUnit\cycle{c} +\DeclareSIUnit\flops{\flop\per\second} +\DeclareSIUnit\chf{CHF} +\sisetup{per-mode=symbol} +\sisetup{exponent-product = \cdot} +\sisetup{group-separator={\mathrm{'}}} + +\definecolor{blue0}{HTML}{002255} +\definecolor{blue1}{HTML}{003380} +\definecolor{blue2}{HTML}{0044AA} +\definecolor{blue3}{HTML}{0055D4} +\definecolor{blue4}{HTML}{0066FF} +\definecolor{blue5}{HTML}{2A7FFF} +\definecolor{blue6}{HTML}{5599FF} +\definecolor{blue7}{HTML}{80B3FF} +\definecolor{blue8}{HTML}{AACCFF} +\definecolor{blue9}{HTML}{D5E5FF} + +\definecolor{yellowbrown0}{HTML}{554400} +\definecolor{yellowbrown1}{HTML}{806600} +\definecolor{yellowbrown2}{HTML}{AA8800} +\definecolor{yellowbrown3}{HTML}{D4AA00} +\definecolor{yellowbrown4}{HTML}{FFCC00} +\definecolor{yellowbrown5}{HTML}{FFD42A} +\definecolor{yellowbrown6}{HTML}{FFDD55} +\definecolor{yellowbrown7}{HTML}{FFE680} +\definecolor{yellowbrown8}{HTML}{FFEEAA} +\definecolor{yellowbrown9}{HTML}{FFF6D5} + +\definecolor{colShellBg}{HTML}{F5EDE4} +\definecolor{links}{HTML}{2A1B81} +\hypersetup{colorlinks,linkcolor=,urlcolor=links} + +\usefolder{scitas_theme} +\usetheme{scitas} + +\newcommand{\FIGREP}{figures} +\renewcommand{\arraystretch}{1.3} + +% Remove numbering from the ToC when it's spread on multiple frames +\setbeamertemplate{frametitle continuation}{} + +\title{{\huge Evolution of C++} +\author[N. Richart]{Nicolas Richart} +\date{\nth{15} of March 2022} + +\begin{document} +\begin{frame}[plain] + \titlepage +\end{frame} + + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-command-extra-options: "-shell-escape" +%%% TeX-master: t +%%% End: diff --git a/scitas_theme/beamercolorthemescitas.sty b/scitas_theme/beamercolorthemescitas.sty new file mode 100644 index 0000000..608649b --- /dev/null +++ b/scitas_theme/beamercolorthemescitas.sty @@ -0,0 +1,21 @@ +\mode + +\definecolor{greyEPFL}{rgb}{0.2549, 0.2352, 0.2274} +\definecolor{redEPFL}{rgb}{0.8867,0.0235,0.0745} +\definecolor{orangeEPFL}{RGB}{243,152,105} +\definecolor{greenEPFL}{RGB}{194,221,176} +\definecolor{acierEPFL}{RGB}{79,143,204} +\definecolor{carotteEPFL}{RGB}{236,102,8} +\definecolor{zinzolinEPFL}{RGB}{92,36,131} + +% Settings +\setbeamercolor*{title page header}{fg=white} +\setbeamercolor*{author}{fg=white} +\setbeamercolor*{date}{fg=white} +\setbeamercolor*{normal text}{fg=greyEPFL} +\setbeamercolor{section in toc}{fg=greyEPFL} +\setbeamercolor{subsection in toc}{fg=greyEPFL} +\setbeamercolor{subsubsection in toc}{fg=greyEPFL} + +\mode + diff --git a/scitas_theme/beamerinnerthemescitas.sty b/scitas_theme/beamerinnerthemescitas.sty new file mode 100644 index 0000000..6c72e07 --- /dev/null +++ b/scitas_theme/beamerinnerthemescitas.sty @@ -0,0 +1,82 @@ +\mode + + +\setbeamertemplate{background}{ + \begin{tikzpicture}[overlay,remember picture] + \begin{scope}[shift={(current page.south west)}] + \ifnum\thepage=1\relax% + % EPFL logo + \node[anchor=west, inner sep=0pt] at (0.5cm, 8.5cm) {\includegraphics[width=2cm]{scitas_theme/figures/EPFL_logo.pdf}}; + % SCITAS logo + \node[anchor=west, inner sep=0pt] at (0.2cm, 0.5cm) {\includegraphics[width=1cm]{scitas_theme/figures/LSMS_logo.png}}; + % SCITAS background + \node[anchor=south west, inner sep=0pt] at (3cm, 1.7cm) {\includegraphics[width=13cm]{scitas_theme/figures/SCITAS.jpg}}; + % Draw red rectangle + \fill[color=redEPFL, anchor=south west] (3cm, 0cm) rectangle (17cm,3cm); + \else + % EPFL logo + \node[anchor=west, inner sep=0pt] at (0.2cm, 8.5cm) {\includegraphics[width=1.6cm]{scitas_theme/figures/EPFL_logo.pdf}}; + % SCITAS logo + \node[anchor=west, inner sep=0pt] at (0.2cm, 0.25cm) {\includegraphics[width=0.8cm]{scitas_theme/figures/SCITAS_logo.png}}; + \fi + \end{scope} + \end{tikzpicture} +} + +% Title page +\defbeamertemplate*{title page}{scitas}[1][] +{ + \vskip6.0cm% + \begin{beamercolorbox}[wd=15.5cm,leftskip=3cm,sep=0pt,#1]{title page header} + \usebeamerfont{title}\textbf{\inserttitle}\par% + \end{beamercolorbox}% + \vskip0.5cm% + \begin{beamercolorbox}[wd=12cm,leftskip=3.0cm,sep=0pt,#1]{author} + \usebeamerfont{author}\textbf{\insertauthor}% + \end{beamercolorbox} + \vskip0.0cm% + \begin{beamercolorbox}[wd=12cm,leftskip=3.0cm,sep=0pt,#1]{date} + \usebeamerfont{author}\scriptsize\insertdate% + \end{beamercolorbox} + \vskip0.0cm% + \begin{beamercolorbox}[wd=12cm,leftskip=3.0cm,sep=0pt,#1]{date} + \usebeamerfont{author}\scriptsize\insertinstitute% + \end{beamercolorbox} + \vfill +} + +\setbeamertemplate{footline} +{ + \leavevmode% + \hbox{% + \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.25ex,dp=1ex,center] {author in head/foot}% + \usebeamerfont{author in head/foot}\textcolor{greyEPFL!60}{\insertshortauthor} + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}% + \textcolor{greyEPFL!60}{\insertframenumber{} / \inserttotalframenumber}\hspace*{2ex} + \end{beamercolorbox}}% + \vskip0.1cm% +} + +\setbeamertemplate{itemize item}{% + \begin{tikzpicture} + \fill[color=redEPFL, anchor=south west, transform canvas={xshift=1mm,yshift=0.3mm}] (0,0) rectangle (0.1633,0.14); + \end{tikzpicture} +} + +\setbeamertemplate{itemize subitem}{\color{redEPFL}$\blacktriangleright$} +\setbeamertemplate{itemize subsubitem}{\color{redEPFL}$\bullet$} + +\setbeamertemplate{section in toc}{% + {% + \begin{tikzpicture} + \fill[color=redEPFL, anchor=south west, transform canvas={xshift=1mm,yshift=0.3mm}] (0,0) rectangle (0.1633,0.14); + \end{tikzpicture} + }% + ~\inserttocsection} + +\setbeamertemplate{subsection in toc}{\hspace{1.2em}{\color{redEPFL}$\blacktriangleright$}~\inserttocsubsection\par} + +\mode diff --git a/scitas_theme/beamerouterthemescitas.sty b/scitas_theme/beamerouterthemescitas.sty new file mode 100644 index 0000000..a293eb1 --- /dev/null +++ b/scitas_theme/beamerouterthemescitas.sty @@ -0,0 +1,33 @@ +\mode +% Frame title +\defbeamertemplate*{frametitle}{top box color}[1][greyEPFL] +{ + \begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle} + \begin{tikzpicture}[overlay,remember picture] + \begin{scope}[shift={(current page.south west)}] + % Draw grey rectangle + \fill[color=#1, anchor=south west] (2cm, 8cm) rectangle (17cm,9cm); + \node[anchor=west, white,font=\large] at (2cm, 8.75cm){\textbf{\insertframetitle}}; + \node[anchor=west, white,font=\large] at (2cm, 8.25cm){\small\insertframesubtitle}; + \end{scope} + \end{tikzpicture} +\end{beamercolorbox} +} +\setbeamersize{text margin left=18mm,text margin right=30mm} + +% The following is to define an ``exercise'' template for the frames +% It will change the color of the header to redEPFL + +% Set the default behavior for each new slide +\BeforeBeginEnvironment{frame}{% + \setbeamertemplate{frametitle}[top box color]% +} + +% Define label for the \begin{frame}[