Skip to content

Commit

Permalink
Style file with demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Facundo Muñoz committed Jan 31, 2015
1 parent f912409 commit 20434e9
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 0 deletions.
100 changes: 100 additions & 0 deletions beamerthemesimple.sty
Original file line number Diff line number Diff line change
@@ -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<presentation>

% 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
<all>
Binary file added demo.pdf
Binary file not shown.
117 changes: 117 additions & 0 deletions demo.tex
Original file line number Diff line number Diff line change
@@ -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}

Binary file added img/Heckert_GNU_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions img/Heckert_GNU_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 20434e9

Please sign in to comment.