67 lines
1.8 KiB
TeX
67 lines
1.8 KiB
TeX
% packages
|
|
\usepackage{xcolor}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{amsmath}
|
|
\usepackage{amsfonts}
|
|
\usepackage{amssymb}
|
|
\usepackage{graphicx}
|
|
\usepackage{listings}
|
|
\usepackage{minted}
|
|
\usepackage{xparse}
|
|
|
|
% for \verb inside \item
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[Q=yes]{examplep}
|
|
|
|
% package configuration
|
|
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
|
|
\beamertemplatenavigationsymbolsempty
|
|
\setbeamertemplate{footline}[frame number]
|
|
\usemintedstyle{friendly}
|
|
\newminted{haskell}{frame=single,numbers=left}
|
|
\newminted{cpp}{frame=single,numbers=left}
|
|
\newminted{c}{frame=single,numbers=left}
|
|
\renewcommand{\theFancyVerbLine}{\ttfamily
|
|
\textcolor[rgb]{0.0,0.0,0.0}{\footnotesize
|
|
\oldstylenums{\arabic{FancyVerbLine}}}}
|
|
|
|
% color definition
|
|
\definecolor{solarized}{HTML}{002B36}
|
|
\definecolor{mygreen}{rgb}{0,0.6,0}
|
|
|
|
% macros and environments
|
|
\newcommand{\code}[1]{\texttt{#1}}
|
|
\newcommand{\slidep}{\onslide<+->}
|
|
\newenvironment{itemizep}
|
|
{\begin{itemize}[<+->]}
|
|
{\end{itemize}}
|
|
|
|
|
|
\NewDocumentCommand {\slide} { m O{} O{} }
|
|
{\begin{frame}{#3}
|
|
\frametitle{\thesection.\ifnum\thesubsection=0\else\thesubsection.\fi\ \currentname {#2}}
|
|
\input{#1}
|
|
\end{frame}}
|
|
|
|
\NewDocumentCommand {\slidetoc} { }
|
|
{\begin{frame}
|
|
\frametitle{\thesection. \currentname}
|
|
\tableofcontents[currentsection,hideothersubsections]
|
|
\end{frame}}
|
|
|
|
|
|
% sections numbered
|
|
\setbeamertemplate{section in toc}[sections numbered]
|
|
\setbeamertemplate{subsection in toc}[subsections numbered]
|
|
\defbeamertemplate{subsubsection in toc}{subsubsections numbered}
|
|
{\leavevmode\leftskip=3em%
|
|
\rlap{\hskip-3em\inserttocsectionnumber.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber}%
|
|
\inserttocsubsubsection\par}
|
|
\setbeamertemplate{subsubsection in toc}[subsubsections numbered]
|
|
|
|
% get current section name
|
|
\usepackage{nameref}
|
|
\makeatletter
|
|
\newcommand*{\currentname}{\@currentlabelname}
|
|
\makeatother
|