diff --git a/beamerthemesimple.sty b/beamerthemesimple.sty new file mode 100644 index 0000000..2159c61 --- /dev/null +++ b/beamerthemesimple.sty @@ -0,0 +1,100 @@ +% Copyright 2015 by Facundo Muñoz +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% + + +\ProvidesPackage{beamerthemesimple} + +%\def\beamer@simplecolor{gris} +%\DeclareOptionBeamer{color}{\beamer@simplecolor=#1} +%\ExecuteOptionsBeamer{gris} +%\ProcessOptionsBeamer + +\usepackage{tikz} +\usetikzlibrary{arrows,shapes,trees,positioning,fadings} + +\input xkeyval + +\newcommand<>{\includeoverlaygraphics}[2][] +{ + \begin{tikzpicture} + \alt#3{\node[opacity=1] {\includegraphics[#1]{#2}};} + {\node[opacity=.15] {\includegraphics[#1]{#2}};} + \end{tikzpicture} +} + +% These define macros \KV@setwatermark@hoffset that take one argument +% which is processed by the last piece of codes into braces +\def\@hos{} +\def\@vos{} +\def\@alpha{} % This one does not work. Why? +\define@key{setwatermark}{hoffset}[\def\@hos{.}]{\def\@hos{\hspace*{#1}}} +\define@key{setwatermark}{voffset}[\def\@vos{.}]{\def\@vos{\vspace*{#1}}} +\define@key{setwatermark}{alpha}[\def\@alpha{0.7}]{\def\@alpha{#1}} + +\def\setwatermark{\@ifnextchar[\@setwatermark{\@setwatermark[]}} +\def\@setwatermark[#1]#2{% + \setkeys{setwatermark}{#1}% + \def\@watermark{#2} +} +% \newcommand{\setwatermark}[1]{\def\@watermark{#1}} +\setwatermark{} % Empty initialization + + +\mode + + % http://www.colorcombos.com/color-scheme-275.html + \definecolor{destacado}{HTML}{515151} % gris oscuro + \definecolor{normal}{HTML}{797979} % gris medio + \definecolor{fondo}{HTML}{e6e6e6} % gris claro + + \setbeamercolor{normal text}{bg=white,fg=normal} + \setbeamercolor*{block title}{bg=fondo,fg=destacado} + \setbeamercolor*{block body}{bg=fondo,fg=normal} + \setbeamercolor{alerted text}{fg=black} + + \usetheme{default} +% \usecolortheme[named=gris]{structure} + \usecolortheme[named=destacado]{structure} + \usefonttheme{structurebold} + + % overlays semitransparentes + \setbeamercovered{transparent} + + % incluir el contador de diapos + \setbeamertemplate{footline}[frame number] + + % eliminar íconos de nav. + \setbeamertemplate{navigation symbols}{} + + % bloques + \setbeamertemplate{blocks}[rounded][shadow=true] + + % especificación global para listas + %\beamerdefaultoverlayspecification{<+-| alert@+>} + + % márgenes + \setbeamersize{text margin left=0.4cm,text margin right=0.4cm} + + \setbeamertemplate{background}{ + \parbox[c][\paperheight]{\paperwidth}{% + \vfill \hfill + \begin{tikzpicture} + %\node[opacity=\@alpha] % not working. why? + \node[opacity=.07] + { + \@watermark + }; + \end{tikzpicture} + \@hos + + \@vos + } +} + +\mode + diff --git a/demo.pdf b/demo.pdf new file mode 100644 index 0000000..b805242 Binary files /dev/null and b/demo.pdf differ diff --git a/demo.tex b/demo.tex new file mode 100644 index 0000000..24d9109 --- /dev/null +++ b/demo.tex @@ -0,0 +1,117 @@ +\documentclass{beamer} + +\usetheme{simple} + +\usepackage{lmodern} +\usepackage[scale=2]{ccicons} + +% TODO: +% position adjustement +% change colours +% + +% Watermark background (simple theme) + +\setwatermark{\includegraphics[height=8cm]{img/Heckert_GNU_white.png}} + + +\title{A simple beamer theme} +\subtitle{} +\date{\today} +\author{Facundo Mu\~noz} +\institute{\url{http://github.com/famuvie}} + +\begin{document} + +\maketitle + +\begin{frame}{simple} + \framesubtitle{A beamer theme} + + \texttt{simple} is a minimalist Beamer theme that features + + \begin{columns} + \column{.5\textwidth} + \begin{itemize} + \item a \alert{watermark} logo in the background + \item slide \alert{numbers} + \item \emph{emph}asized and \alert{alert}ed text + \end{itemize} + + \column{.5\textwidth} + \begin{block}{And of course...} + blocks, columns, and all Beamer power + \end{block} + \end{columns} + +\end{frame} + + + +\setwatermark{\fontsize{125pt}{125pt}\selectfont{Simple}} + +\begin{frame}[fragile]{watermark} + \framesubtitle{not only for images} + + \begin{itemize} + \item You can place \emph{any} \LaTeX{} \alert{contents} as a watermark + \end{itemize} + + \begin{block}{In preamble} + \begin{verbatim} + \setwatermark{\includegraphics[height=8cm]{% + img/Heckert_GNU_white.png}} + \end{verbatim} + \end{block} + + \begin{block}{Just before this frame} + \begin{verbatim} + \setwatermark{\fontsize{125pt}{125pt}% + \selectfont{Simple}} + \end{verbatim} + \end{block} + + +\end{frame} + + + +\setwatermark[hoffset=-3cm,voffset=-2cm]{\fontsize{125pt}{125pt}\selectfont{Simple}} + + +\begin{frame}{Options} + \framesubtitle{Fine adjustement of the watermark position} + + + \begin{itemize} + \item \texttt{hoffset} + \item \texttt{voffset} + \end{itemize} + + They admit any \emph{positive} or \emph{negative} spacing \alert{unit} + + Note that some \alert{warnings} about \emph{badboxes} might be generated at compilation + +\end{frame} + + + + +\begin{frame}{License} + + \begin{block}{Get the source of this theme and the demo presentation from} + + \begin{center}\url{http://github.com/famuvie/beamerthemesimple}\end{center} + + \end{block} + + The theme \emph{itself} is licensed under a + \href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons + Attribution-ShareAlike 4.0 International License}. + + \begin{center}\ccbysa\end{center} + +\end{frame} + +\end{document} + diff --git a/img/Heckert_GNU_white.png b/img/Heckert_GNU_white.png new file mode 100644 index 0000000..79747fa Binary files /dev/null and b/img/Heckert_GNU_white.png differ diff --git a/img/Heckert_GNU_white.svg b/img/Heckert_GNU_white.svg new file mode 100644 index 0000000..437fe5e --- /dev/null +++ b/img/Heckert_GNU_white.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file