diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 21 | ||||
-rw-r--r-- | src/beamercolorthemesolarized.sty | 156 | ||||
-rw-r--r-- | src/func-w-elixir.tex | 117 | ||||
-rw-r--r-- | src/images/xkcd_functional.png | bin | 0 -> 16070 bytes | |||
-rw-r--r-- | src/references.bib | 4 |
5 files changed, 298 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..7e6d93e --- /dev/null +++ b/src/Makefile @@ -0,0 +1,21 @@ +.PHONY: all clean + +all: func-w-elixir.pdf + +%.pdf: %.tex references.bib + @xelatex -halt-on-error $< + @bibtex $(basename $<).aux + @xelatex -halt-on-error $< + @xelatex -halt-on-error $< + +clean: + @rm --force *.nav \ + *.log \ + *.out \ + *.pdf \ + *.toc \ + *.snm \ + *.aux \ + *.bbl \ + *.blg \ + *.vrb diff --git a/src/beamercolorthemesolarized.sty b/src/beamercolorthemesolarized.sty new file mode 100644 index 0000000..101bee2 --- /dev/null +++ b/src/beamercolorthemesolarized.sty @@ -0,0 +1,156 @@ +% Beamer Color Theme using the Solarized Palette, +% http://ethanschoonover.com/solarized. +% +% Copyright 2012 Jeffrey B. Arnold +% +% This program is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program. If not, see <http://www.gnu.org/licenses/>. + +\ProvidesPackage{beamercolorthemesolarized} +\RequirePackage{etoolbox} +\RequirePackage{kvoptions} + +%% This is ugly. First time using options and conditionals in LaTeX +\SetupKeyvalOptions{ + family=solarized, + prefix=solarized@, +} +\DeclareBoolOption[false]{dark} +\DeclareComplementaryOption{light}{dark} +\DeclareStringOption[yellow]{accent}[yellow] +\ProcessKeyvalOptions* + +% Solarized palette +\definecolor{solarizedBase03}{HTML}{002B36} +\definecolor{solarizedBase02}{HTML}{073642} +\definecolor{solarizedBase01}{HTML}{586e75} +\definecolor{solarizedBase00}{HTML}{657b83} +\definecolor{solarizedBase0}{HTML}{839496} +\definecolor{solarizedBase1}{HTML}{93a1a1} +\definecolor{solarizedBase2}{HTML}{EEE8D5} +\definecolor{solarizedBase3}{HTML}{FDF6E3} +\definecolor{solarizedYellow}{HTML}{B58900} +\definecolor{solarizedOrange}{HTML}{CB4B16} +\definecolor{solarizedRed}{HTML}{DC322F} +\definecolor{solarizedMagenta}{HTML}{D33682} +\definecolor{solarizedViolet}{HTML}{6C71C4} +\definecolor{solarizedBlue}{HTML}{268BD2} +\definecolor{solarizedCyan}{HTML}{2AA198} +\definecolor{solarizedGreen}{HTML}{859900} + +% Set Accent color +% Ugly. Should be done with a switch +\ifdefstring{\solarized@accent}{yellow}{ + \colorlet{solarizedAccent}{solarizedYellow} +}{} +\ifdefstring{\solarized@accent}{orange}{ + \colorlet{solarizedAccent}{solarizedOrange} +}{} +\ifdefstring{\solarized@accent}{red}{ + \colorlet{solarizedAccent}{solarizedRed} +}{} +\ifdefstring{\solarized@accent}{magenta}{ + \colorlet{solarizedAccent}{solarizedMagenta} +}{} +\ifdefstring{\solarized@accent}{violet}{ + \colorlet{solarizedAccent}{solarizedViolet} +}{} +\ifdefstring{\solarized@accent}{blue}{ + \colorlet{solarizedAccent}{solarizedBlue} +}{} +\ifdefstring{\solarized@accent}{cyan}{ + \colorlet{solarizedAccent}{solarizedCyan} +}{} +\ifdefstring{\solarized@accent}{green}{ + \colorlet{solarizedAccent}{solarizedGreen} +}{} + +%% Set base colors for dark or light versions +%% Dark +% Switch between light and dark themes using the method in the CSS +% stylesheet http://ethanschoonover.com/solarized +\ifboolexpe{ bool {solarized@dark}}{ + \colorlet{solarizedRebase03}{solarizedBase03} + \colorlet{solarizedRebase02}{solarizedBase02} + \colorlet{solarizedRebase01}{solarizedBase01} + \colorlet{solarizedRebase00}{solarizedBase00} + \colorlet{solarizedRebase0}{solarizedBase0} + \colorlet{solarizedRebase1}{solarizedBase1} + \colorlet{solarizedRebase2}{solarizedBase2} + \colorlet{solarizedRebase3}{solarizedBase3} +}{ + %% Light + \colorlet{solarizedRebase03}{solarizedBase3} + \colorlet{solarizedRebase02}{solarizedBase2} + \colorlet{solarizedRebase01}{solarizedBase1} + \colorlet{solarizedRebase00}{solarizedBase0} + \colorlet{solarizedRebase0}{solarizedBase00} + \colorlet{solarizedRebase1}{solarizedBase01} + \colorlet{solarizedRebase2}{solarizedBase02} + \colorlet{solarizedRebase3}{solarizedBase03} +} + +\mode<presentation> + +\setbeamercolor{normal text}{fg=solarizedRebase0, bg=solarizedRebase03} +\setbeamercolor{alerted text}{fg=solarizedAccent} +% based css pre element +\setbeamercolor{example text}{fg=solarizedRebase1, bg=solarizedRebase02} + +% Header and footer from CSS +\setbeamercolor{footline}{bg=solarizedRebase02,fg=solarizedRebase01} +\setbeamercolor{headline}{bg=solarizedRebase01,fg=solarizedRebase1} + +% Titles +\setbeamercolor*{titlelike}{fg=solarizedAccent} +\setbeamercolor*{frametitle}{fg=solarizedAccent} +\setbeamercolor*{title}{fg=solarizedAccent} + +% Structure elements use css style for header +\setbeamercolor*{structure}{bg=solarizedRebase01, fg=solarizedRebase1} + +% Do not mess with subtle colors in palette. I don't like it. +\setbeamercolor*{palette primary}{bg=solarizedRebase01, fg=solarizedRebase1} +\setbeamercolor*{palette secondary}{bg=solarizedRebase01, fg=solarizedRebase1} +\setbeamercolor*{palette tertiary}{bg=solarizedRebase01, fg=solarizedRebase1} +\setbeamercolor*{palette quaternary}{bg=solarizedRebase01, fg=solarizedRebase1} + +% Make Blocks slightly lighter/darker +\setbeamercolor{block title}{fg=solarizedAccent, bg=solarizedRebase02} +%\setbeamercolor{block title alerted}{} +%\setbeamercolor{block title example}{} + +\setbeamercolor{block body}{parent=normal text, bg=solarizedRebase02} +% \setbeamercolor{block body alerted}{} +% \setbeamercolor{block body example}{} + +% same as footline +% Set Sidebar and footline to use the css style for footer +\setbeamercolor*{sidebar}{parent=headline} +\setbeamercolor*{palette sidebar primary}{fg=solarizedRebase01, fg=solarizedRebase1} +\setbeamercolor*{palette sidebar secondary}{fg=solarizedRebase01, fg=solarizedRebase1} +\setbeamercolor*{palette sidebar tertiary}{fg=solarizedRebase01, fg=solarizedRebase1} +\setbeamercolor*{palette sidebar quaternary}{fg=solarizedRebase01, fg=solarizedRebase1} + +% border-color for headings +\setbeamercolor{separation line}{fg=solarizedRebase0} +\setbeamercolor{fine separation line}{fg=solarizedRebase0} + +\setbeamercolor*{section in sidebar shaded}{parent=palette sidebar primary} +% a.hover.navlink in CSS +\setbeamercolor*{section in sidebar}{parent=palette sidebar primary, fg=solarizedRooebase02} +\setbeamercolor*{subsection in sidebar}{parent=section in sidebar} +\setbeamercolor*{subsection in sidebar shaded}{parent=section in sidebar shaded} + +\mode +<all> diff --git a/src/func-w-elixir.tex b/src/func-w-elixir.tex new file mode 100644 index 0000000..ea5bdd5 --- /dev/null +++ b/src/func-w-elixir.tex @@ -0,0 +1,117 @@ +\documentclass{beamer} +\usetheme{Berlin} +\usecolortheme[light,accent=blue]{solarized} +\usepackage{fontspec} +\usepackage{xunicode} +\usepackage{xltxtra} +\setmainfont{DejaVuSans} +\usepackage{booktabs} +\usepackage{lmodern} +\usepackage{listings} +\usepackage{color} +\usepackage{tikz} +\usetikzlibrary{trees, shapes.misc, arrows} +\usepackage{pgfkeys} +\usepackage{graphicx} +\graphicspath{{./images/}} +\setbeamertemplate{headline}{} + +\lstset{% + basicstyle=\footnotesize\ttfamily, + breakatwhitespace=false, + breaklines=true, + captionpos=b, + frame=signle, + keepspaces=true, + columns=flexible, + language=Java, + numbers=left, + numbersep=5pt, + numberstyle=\tiny\color{solarizedBase00}, + showspaces=false, + showstringspaces=false, + stepnumber=1, + showtabs=false, + stringstyle=\color{solarizedMagenta}, + keywordstyle=\color{solarizedCyan}, + commentstyle=\color{solarizedGreen}, + tabsize=2 +} + +\title{Learning Functional Programming with Elixir} +\subtitle{A Short Guide Through Functional Programming} +\author[Ballou]{Kenny Ballou} +\institute[zData]{% + \inst{}% + zData, Inc. +} + +\AtBeginSection[]{% + \begin{frame} + \tableofcontents[ + currentsection, + sectionstyle=show/shaded, + subsectionstyle=show/show/hide] + \end{frame} +} + +\begin{document} +% TikZ Styles +\tikzstyle{every node}=[% + fill=solarizedBase02, + draw=solarizedBase01, + thick, + rounded corners, + anchor=north, + sibling distance=6cm] +\tikzstyle{edge from parent}=[% + solarizedBase00, + -o, + thick, + draw] + +%\tikzstyle{edge from parent path}=[% +% \tikzparentnode.east |- \tikzchildnode.south] + +\begin{frame}[label=titleslide] +\titlepage{} +\end{frame} + +\begin{frame} +\tableofcontents[subsectionstyle=hide] +\end{frame} + +\begin{frame} +\frametitle{Who am I?} +\begin{itemize} +\item{Hacker} +\item{Developer (read gardener)} +\item{Mathematician} +\item{Student} +\item{Author~(?)} +\end{itemize} + +\end{frame} + +\section{Introduction} + +\begin{frame} +\begin{figure} +\includegraphics[scale=0.45]{xkcd_functional.png} +\caption{``Functional programming combines the flexibility and power of +abstract mathematics with the intuitive clarity of abstract mathematics.''} +\end{figure} +XKCD on Functional\cite{website:xkcd_functional} +\end{frame} + +\section*{References} +\begin{frame}[allowframebreaks] +\frametitle{References} +\nocite{*} +\renewcommand{\refname}{} +\bibliographystyle{plain} +\bibliography{references} +\end{frame} + +\againframe{titleslide} +\end{document} diff --git a/src/images/xkcd_functional.png b/src/images/xkcd_functional.png Binary files differnew file mode 100644 index 0000000..2720e17 --- /dev/null +++ b/src/images/xkcd_functional.png diff --git a/src/references.bib b/src/references.bib new file mode 100644 index 0000000..13f6113 --- /dev/null +++ b/src/references.bib @@ -0,0 +1,4 @@ +@misc{website:xkcd_functional, + howpublished="\url{https://xkcd.com/1270}", + author="Randall Munroe" +} |