Commit 78969d68 authored by Benoit Viguier's avatar Benoit Viguier

initial commit

parents
# Temporary files
.latex-cache
*.acn
*.acr
*.alg
*.aux
*.bbl
*.blg
*.dvi
*.fdb_latexmk
*.fls
*.glg
*.glo
*.gls
*.idx
*.ilg
*.ind
*.ist
*.lof
*.log
*.lot
*.maf
*.mtc
*.mtc0
*.nav
*.nlo
*.out
*.pdfsync
*.ps
*.snm
*.synctex.gz
*.toc
*.vrb
*.xdy
*.tdo
# Output
*.sty
doc/rutheme.pdf
demo/demo.pdf
INS = sources/beamerthemeru.ins
PACKAGE_SRC = $(wildcard sources/*.dtx)
PACKAGE_STY = $(notdir $(PACKAGE_SRC:%.dtx=%.sty))
DEMO_SRC = demo/demo.tex demo/demo.bib
DEMO_PDF = demo/demo.pdf
DOC_SRC = doc/rutheme.dtx
DOC_PDF = doc/rutheme.pdf
CTAN_CONTENT = README.md $(INS) $(PACKAGE_SRC) $(DOC_SRC) $(DOC_PDF) $(DEMO_SRC) $(DEMO_PDF)
DESTDIR ?= $(shell kpsewhich -var-value=TEXMFHOME)
INSTALL_DIR = $(DESTDIR)/tex/latex/ru
DOC_DIR = $(DESTDIR)/doc/latex/ru
CACHE_DIR := $(shell pwd)/.latex-cache
COMPILE_TEX := latexmk -xelatex -output-directory=$(CACHE_DIR)
export TEXINPUTS:=$(shell pwd):$(shell pwd)/sources:${TEXINPUTS}
DOCKER_IMAGE = latex-image
DOCKER_CONTAINER = latex-container
.PHONY: all sty doc demo clean install uninstall ctan clean-cache clean-sty ctan-version docker-run docker-build docker-rm
all: sty doc
sty: $(PACKAGE_STY)
doc: $(DOC_PDF)
demo: $(DEMO_PDF)
clean: clean-cache clean-sty
install: $(PACKAGE_STY) $(DOC_PDF)
@mkdir -p $(INSTALL_DIR)
@cp $(PACKAGE_STY) $(INSTALL_DIR)
@cp ru_background.png $(INSTALL_DIR)
@cp logo.png $(INSTALL_DIR)
@mkdir -p $(DOC_DIR)
@cp $(DOC_PDF) $(DOC_DIR)
uninstall:
@rm -f "$(addprefix $(INSTALL_DIR)/, $(PACKAGE_STY))"
@rmdir "$(INSTALL_DIR)"
@rm -f "$(DOC_DIR)/$(notdir $(DOC_PDF))"
@rmdir "$(DOC_DIR)"
clean-cache:
@rm -rf "$(CACHE_DIR)"
clean-sty:
@rm -f $(PACKAGE_STY)
ctan: $(CTAN_CONTENT) ctan-version
@tar --transform "s@\(.*\)@ru/\1@" -cf ru-$(shell date "+%Y-%m-%d").tar.gz $(CTAN_CONTENT)
ctan-version:
@sed -i 's@20[0-9][0-9]/[0-9]*/[0-9]*@$(shell date "+%Y/%m/%d")@' $(PACKAGE_SRC)
$(CACHE_DIR):
@mkdir -p $(CACHE_DIR)
$(PACKAGE_STY): $(PACKAGE_SRC) $(INS) | clean-cache $(CACHE_DIR)
@cd $(dir $(INS)) && latex -output-directory=$(CACHE_DIR) $(notdir $(INS))
@cp $(addprefix $(CACHE_DIR)/,$(PACKAGE_STY)) .
$(DOC_PDF): $(DOC_SRC) $(PACKAGE_STY) | clean-cache $(CACHE_DIR)
@cd $(dir $(DOC_SRC)) && $(COMPILE_TEX) $(notdir $(DOC_SRC))
@cp $(CACHE_DIR)/$(notdir $(DOC_PDF)) $(DOC_PDF)
$(DEMO_PDF): $(DEMO_SRC) $(PACKAGE_STY) | clean-cache $(CACHE_DIR)
@cd $(dir $(DEMO_SRC)) && $(COMPILE_TEX) $(notdir $(DEMO_SRC))
@cp $(CACHE_DIR)/$(notdir $(DEMO_PDF)) $(DEMO_PDF)
docker-run: docker-build
docker run --rm=true --name $(DOCKER_CONTAINER) -i -t -v `pwd`:/data $(DOCKER_IMAGE) make
docker-build:
docker build -t $(DOCKER_IMAGE) .
docker-rm:
docker rm $(DOCKER_CONTAINER)
## Ru
**IMPORTANT NOTICES FOR VERSION 1.0**
* The `title format` values have been restructured. Please refer to the
[manual][].
---
Ru is a simple, modern Beamer theme suitable for anyone to use. It tries
to minimize noise and maximize space for content; the only visual flourish it
offers is an (optional) progress bar added to each slide. .
Not convinced? Have a look at the [demo slides][].
## Installation
<!-- To install a stable version of this theme, please refer to update instructions
of your TeX distribution. Ru is on [CTAN][] since December
2014 thus it is part of MikTeX and will be part of TeX Live 2016.
-->
Installing Ru from source, like any Beamer theme, involves four easy
steps:
1. **Download the source** with a `git clone` of the [Ru repository](https://gitlab.science.ru.nl/benoit/rutheme) or as a [zip archive](https://gitlab.science.ru.nl/benoit/rutheme/archive/master.zip) of the latest development version.
2. **Compile the style files** by running `make sty` inside the downloaded
directory. (Or run LaTeX directly on `source/rutheme.ins`.)
3. **Move the resulting `*.sty` files** to the folder containing your
presentation. To use Ru with many presentations, run `make install`
or move the `*.sty` files to a folder in your TeX path instead (might require
`sudo` rights).
4. **Use the theme for your presentation** by declaring `\usetheme{ru}` in
the preamble of your Beamer document.
## Usage
The following code shows a minimal example of a Beamer presentation using
Ru.
```latex
\documentclass{beamer}
\usetheme{ru} % Use ru theme
\title{A minimal example}
\date{\today}
\author{Benoit Viguier}
\institute{Radboud University}
\begin{document}
\maketitle
\section{First Section}
\begin{frame}{First Frame}
Hello, world!
\end{frame}
\end{document}
```
Detailed information on using Ru can be found in the [manual][].
## License
The theme itself is licensed under a [Creative Commons Attribution-ShareAlike
4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/). This
means that if you change the theme and re-distribute it, you *must* retain the
copyright notice header and license it under the same CC-BY-SA license. This
does not affect the presentation that you create with the theme.
<!-- [demo slides]: http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/themes/metropolis/demo/demo.pdf
[manual]: http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/themes/metropolis/doc/metropolistheme.pdf
[CTAN]: http://ctan.org/pkg/beamertheme-metropolis -->
@article{Knuth92,
author = "D.E. Knuth",
title = "Two notes on notation",
journal = "Amer. Math. Monthly",
volume = "99",
year = "1992",
pages = "403--422",
}
@book{ConcreteMath,
author = "R.L. Graham and D.E. Knuth and O. Patashnik",
title = "Concrete mathematics",
publisher = "Addison-Wesley",
address = "Reading, MA",
year = "1989"
}
@unpublished{Simpson,
author = "H. Simpson",
title = "Proof of the {R}iemann {H}ypothesis",
note = "preprint (2003), available at
\texttt{http://www.math.drofnats.edu/riemann.ps}",
year = "2003"
}
@incollection{Er01,
author = "P. Erd{\H o}s",
title = "A selection of problems and results in combinatorics",
booktitle = "Recent trends in combinatorics (Matrahaza, 1995)",
publisher = "Cambridge Univ. Press",
address = "Cambridge",
pages = "1--6",
year = "1995"
}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
\documentclass[10pt]{beamer}
% \usetheme[progressbar=frametitle]{ru}
\usetheme{ru}
\usepackage{appendixnumberbeamer}
\usepackage{booktabs}
\usepackage[scale=2]{ccicons}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\usepackage{xspace}
\newcommand{\themename}{\textbf{\textsc{ru}}\xspace}
\title{Ru}
\subtitle{A modern beamer theme for Radboud University}
\date{\today}
\author[Beno\^{i}t \textsc{Viguier} MSc]{
Beno\^{i}t \textsc{Viguier} MSc \\\medskip
{\small (\texttt{$\lambda$ x y. x@y.nl}) benoit viguier} \\
{\small \url{https://www.viguier.nl}}}
% The institute:
% - to start the name of the university as displayed on the top of each slide
% this can be adjusted such that you can also create a Dutch version
% - next the institute information as displayed on the title slide
\institute[Radboud University Nijmegen]{
Institute for Computing and Information Sciences -- Digital Security \\
Radboud University Nijmegen}
% \titlegraphic{}
\begin{document}
\maketitle
\begin{frame}{Table of contents}
\setbeamertemplate{section in toc}[sections numbered]
\tableofcontents[hideallsubsections]
\end{frame}
\section{Introduction}
\begin{frame}[fragile]{Ru}
Enable the theme by loading
\begin{verbatim} \documentclass{beamer}
\usetheme{ru}\end{verbatim}
Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX
installed to enjoy this wonderful typography.
\end{frame}
\begin{frame}[fragile]{Sections}
Sections group slides of the same topic
\begin{verbatim} \section{Elements}\end{verbatim}
for which \themename provides a nice progress indicator \ldots
\end{frame}
\section{Titleformats}
\begin{frame}{Ru titleformats}
\themename supports 4 different titleformats:
\begin{itemize}
\item Regular
\item \textsc{Smallcaps}
\item \textsc{allsmallcaps}
\item ALLCAPS
\end{itemize}
They can either be set at once for every title type or individually.
\end{frame}
{
\ruset{titleformat frame=smallcaps}
\begin{frame}{Small caps}
This frame uses the \texttt{smallcaps} titleformat.
\begin{alertblock}{Potential Problems}
Be aware, that not every font supports small caps. If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in smallcaps will be typeset with the Computer Modern Serif font instead.
\end{alertblock}
\end{frame}
}
{
\ruset{titleformat frame=allsmallcaps}
\begin{frame}{All small caps}
This frame uses the \texttt{allsmallcaps} titleformat.
\begin{alertblock}{Potential problems}
As this titleformat also uses smallcaps you face the same problems as with the \texttt{smallcaps} titleformat. Additionally this format can cause some other problems. Please refer to the documentation if you consider using it.
As a rule of thumb: Just use it for plaintext-only titles.
\end{alertblock}
\end{frame}
}
{
\ruset{titleformat frame=allcaps}
\begin{frame}{All caps}
This frame uses the \texttt{allcaps} titleformat.
\begin{alertblock}{Potential Problems}
This titleformat is not as problematic as the \texttt{allsmallcaps} format, but basically suffers from the same deficiencies. So please have a look at the documentation if you want to use it.
\end{alertblock}
\end{frame}
}
\section{Elements}
\begin{frame}[fragile]{Typography}
\begin{verbatim}The theme provides sensible defaults to
\emph{emphasize} text, \alert{accent} parts
or show \textbf{bold} results.\end{verbatim}
\begin{center}becomes\end{center}
The theme provides sensible defaults to \emph{emphasize} text,
\alert{accent} parts or show \textbf{bold} results.
\end{frame}
\begin{frame}{Font feature test}
\begin{itemize}
\item Regular
\item \textit{Italic}
\item \textsc{SmallCaps}
\item \textbf{Bold}
\item \textbf{\textit{Bold Italic}}
\item \textbf{\textsc{Bold SmallCaps}}
\item \texttt{Monospace}
\item \texttt{\textit{Monospace Italic}}
\item \texttt{\textbf{Monospace Bold}}
\item \texttt{\textbf{\textit{Monospace Bold Italic}}}
\end{itemize}
\end{frame}
\begin{frame}{Lists}
\begin{columns}[T,onlytextwidth]
\column{0.33\textwidth}
Items
\begin{itemize}
\item Milk \item Eggs \item Potatos
\end{itemize}
\column{0.33\textwidth}
Enumerations
\begin{enumerate}
\item First, \item Second and \item Last.
\end{enumerate}
\column{0.33\textwidth}
Descriptions
\begin{description}
\item[PowerPoint] Meeh. \item[Beamer] Yeeeha.
\end{description}
\end{columns}
\end{frame}
\begin{frame}{Animation}
\begin{itemize}[<+- | alert@+>]
\item \alert<4>{This is\only<4>{ really} important}
\item Now this
\item And now this
\end{itemize}
\end{frame}
\begin{frame}{Figures}
\begin{figure}
\newcounter{density}
\setcounter{density}{20}
\begin{tikzpicture}
\def\couleur{alerted text.fg}
\path[coordinate] (0,0) coordinate(A)
++( 90:5cm) coordinate(B)
++(0:5cm) coordinate(C)
++(-90:5cm) coordinate(D);
\draw[fill=\couleur!\thedensity] (A) -- (B) -- (C) --(D) -- cycle;
\foreach \x in {1,...,40}{%
\pgfmathsetcounter{density}{\thedensity+20}
\setcounter{density}{\thedensity}
\path[coordinate] coordinate(X) at (A){};
\path[coordinate] (A) -- (B) coordinate[pos=.10](A)
-- (C) coordinate[pos=.10](B)
-- (D) coordinate[pos=.10](C)
-- (X) coordinate[pos=.10](D);
\draw[fill=\couleur!\thedensity] (A)--(B)--(C)-- (D) -- cycle;
}
\end{tikzpicture}
\caption{Rotated square from
\href{http://www.texample.net/tikz/examples/rotated-polygons/}{texample.net}.}
\end{figure}
\end{frame}
\begin{frame}{Tables}
\begin{table}
\caption{Largest cities in the world (source: Wikipedia)}
\begin{tabular}{lr}
\toprule
City & Population\\
\midrule
Mexico City & 20,116,842\\
Shanghai & 19,210,000\\
Peking & 15,796,450\\
Istanbul & 14,160,467\\
\bottomrule
\end{tabular}
\end{table}
\end{frame}
\begin{frame}{Blocks}
Three different block environments are pre-defined and may be styled with an
optional background color.
\begin{columns}[T,onlytextwidth]
\column{0.5\textwidth}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\column{0.5\textwidth}
\ruset{block=fill}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\end{columns}
\end{frame}
\begin{frame}{Math}
\begin{equation*}
e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n
\end{equation*}
\end{frame}
\begin{frame}{Line plots}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
mlineplot,
width=0.9\textwidth,
height=6cm,
]
\addplot {sin(deg(x))};
\addplot+[samples=100] {sin(deg(2*x))};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{frame}
\begin{frame}{Bar charts}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
mbarplot,
xlabel={Foo},
ylabel={Bar},
width=0.9\textwidth,
height=6cm,
]
\addplot plot coordinates {(1, 20) (2, 25) (3, 22.4) (4, 12.4)};
\addplot plot coordinates {(1, 18) (2, 24) (3, 23.5) (4, 13.2)};
\addplot plot coordinates {(1, 10) (2, 19) (3, 25) (4, 15.2)};
\legend{lorem, ipsum, dolor}
\end{axis}
\end{tikzpicture}
\end{figure}
\end{frame}
\begin{frame}{Quotes}
\begin{quote}
Veni, Vidi, Vici
\end{quote}
\end{frame}
{%
\setbeamertemplate{frame footer}{My custom footer}
\begin{frame}[fragile]{Frame footer}
\themename defines a custom beamer template to add a text to the footer. It can be set via
\begin{verbatim}\setbeamertemplate{frame footer}{My custom footer}\end{verbatim}
\end{frame}
}
\begin{frame}{References}
Some references to showcase [allowframebreaks] \cite{knuth92,ConcreteMath,Simpson,Er01,greenwade93}
\end{frame}
\section{Conclusion}
\begin{frame}{Summary}
Get the source of this theme and the demo presentation from
\begin{center}\url{github.com/matze/mtheme}\end{center}
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}
\begin{frame}[standout]
Questions?
\end{frame}
\appendix
\begin{frame}[fragile]{Backup slides}
Sometimes, it is useful to add slides at the end of your presentation to
refer to during audience questions.
The best way to do this is to include the \verb|appendixnumberbeamer|
package in your preamble and call \verb|\appendix| before your backup slides.
\themename will automatically turn off slide numbering and progress bars for
slides in the appendix.
\end{frame}
\begin{frame}[allowframebreaks]{References}
\bibliography{demo}
\bibliographystyle{abbrv}
\end{frame}
\end{document}
This diff is collapsed.
## Contributed by Walter Schulze (@awalterschulze)
## Simplified by Dirk Eddelbuettel (@eddelbuettel)
FROM ubuntu:trusty
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -q
RUN apt-get install -qy texlive-full
RUN apt-get install -qy \
gnuplot \
wget \
build-essential
ADD ./getFiraFont.sh ./getFiraFont.sh
RUN ./getFiraFont.sh
WORKDIR /data
VOLUME ["/data"]
#!/bin/bash
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html
cd /tmp
# install unzip just in case the user doesn't already have it.
sudo apt-get install unzip -y
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip"
wget "http://www.carrois.com/downloads/fira_mono_3_2/FiraMonoFonts3206.zip"
unzip FiraFonts4106.zip
unzip FiraMonoFonts3206.zip
sudo mkdir -p /usr/share/fonts/truetype/FiraSans
sudo mkdir -p /usr/share/fonts/opentype/FiraSans
sudo cp Fira*/WEB/TTF/*.ttf /usr/share/fonts/truetype/FiraSans/
sudo cp Fira*/OTF/Fira* /usr/share/fonts/opentype/FiraSans/
sudo fc-cache -fv
logo.png

83.1 KB

% \iffalse meta-comment -------------------------------------------------------
% Copyright 2016 Benoit Viguier
%
% https://gitlab.science.ru.nl/benoit/rutheme
%
% the original template was based on the mtheme
% (https://github.com/matze/mtheme) by Matthias Vogelgesang
%
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthemeru}[2016/11/22 Ru color theme]
%</package>
% \fi
% \CheckSum{0}
% \StopEventually{}
% \iffalse
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\themename color theme}
%
%
%
% \subsubsection{Package dependencies}
% \begin{macrocode}
\RequirePackage{pgfopts}
% \end{macrocode}
%
%
%
% \subsubsection{Options}
%
% \begin{macro}{block}
% Optionally adds a light grey background to block environments like
% |theorem| and |example|.
% \begin{macrocode}
\pgfkeys{
/ru/color/block/.cd,
.is choice,
transparent/.code=\ru@block@transparent,
fill/.code=\ru@block@fill,
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{colors}
% Provides the option to have a dark background and light foreground instead
% of the reverse.
% \begin{macrocode}
\pgfkeys{
/ru/color/background/.cd,
.is choice,
dark/.code=\ru@colors@dark,
light/.code=\ru@colors@light,
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ru@color@setdefaults}
% Sets default values for color theme options.
% \begin{macrocode}
\newcommand{\ru@color@setdefaults}{
\pgfkeys{/ru/color/.cd,
background=light,
block=transparent,
}
}
% \end{macrocode}
% \end{macro}
%
%
%
% \subsubsection{Base colors}
%
% \begin{macrocode}
\definecolor{ruDarkText}{HTML}{222222}
\definecolor{ruDarkTeal}{HTML}{B82B22}
\definecolor{ruLightTeal}{HTML}{DDDDDD}
\definecolor{ruLightBrown}{HTML}{F45709}
\definecolor{ruLightGreen}{HTML}{14B03D}
% \end{macrocode}
%
%
%
% \subsubsection{Base styles}
%
% All colors in \themename are derived from the definitions of |normal text|,
% |alerted text|, and |example text|.
%
% \begin{macrocode}
\newcommand{\ru@colors@dark}{
\setbeamercolor{normal text}{%
fg=black!2,
bg=ruLightTeal
}
\usebeamercolor[fg]{normal text}
}
\newcommand{\ru@colors@light}{
\setbeamercolor{normal text}{%
fg=ruDarkText,
bg=black!2
}
}
\setbeamercolor{title text}{%
fg=ruDarkTeal
}
\setbeamercolor{alerted text}{%
fg=ruLightBrown
}
\setbeamercolor{example text}{%
fg=ruLightGreen
}
% \end{macrocode}
%
%
%
% \subsubsection{Derived colors}
%
% The titles and structural elements (e.g. |itemize| bullets) are set in the
% same color as |normal text|. This would ideally done by setting |normal text|
% as a parent style, which we do to set |titlelike|, but this doesn't work for
% |structure| as its foreground is set explicitly in
% |beamercolorthemedefault.sty|.
%
% \begin{macrocode}
% \setbeamercolor{titlelike}{use=normal text, parent=normal text}
\setbeamercolor{titlelike}{use=title text, parent=title text}
\setbeamercolor{author}{use=normal text, parent=normal text}
\setbeamercolor{date}{use=normal text, parent=normal text}
\setbeamercolor{institute}{use=normal text, parent=normal text}
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
% \end{macrocode}