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

initial commit

# Temporary files
# Output
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
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
doc: $(DOC_PDF)
demo: $(DEMO_PDF)
clean: clean-cache clean-sty
install: $(PACKAGE_STY) $(DOC_PDF)
@mkdir -p $(INSTALL_DIR)
@cp ru_background.png $(INSTALL_DIR)
@cp logo.png $(INSTALL_DIR)
@mkdir -p $(DOC_DIR)
@cp $(DOC_PDF) $(DOC_DIR)
@rm -f "$(addprefix $(INSTALL_DIR)/, $(PACKAGE_STY))"
@rmdir "$(INSTALL_DIR)"
@rm -f "$(DOC_DIR)/$(notdir $(DOC_PDF))"
@rmdir "$(DOC_DIR)"
@rm -rf "$(CACHE_DIR)"
@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)
@sed -i 's@20[0-9][0-9]/[0-9]*/[0-9]*@$(shell date "+%Y/%m/%d")@' $(PACKAGE_SRC)
@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 -t $(DOCKER_IMAGE) .
## Ru
* The `title format` values have been restructured. Please refer to the
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
1. **Download the source** with a `git clone` of the [Ru repository]( or as a [zip archive]( 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
\usetheme{ru} % Use ru theme
\title{A minimal example}
\author{Benoit Viguier}
\institute{Radboud University}
\section{First Section}
\begin{frame}{First Frame}
Hello, world!
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]( 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]:
[CTAN]: -->
author = "D.E. Knuth",
title = "Two notes on notation",
journal = "Amer. Math. Monthly",
volume = "99",
year = "1992",
pages = "403--422",
author = "R.L. Graham and D.E. Knuth and O. Patashnik",
title = "Concrete mathematics",
publisher = "Addison-Wesley",
address = "Reading, MA",
year = "1989"
author = "H. Simpson",
title = "Proof of the {R}iemann {H}ypothesis",
note = "preprint (2003), available at
year = "2003"
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"
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"
% \usetheme[progressbar=frametitle]{ru}
\subtitle{A modern beamer theme for Radboud University}
\author[Beno\^{i}t \textsc{Viguier} MSc]{
Beno\^{i}t \textsc{Viguier} MSc \\\medskip
{\small (\texttt{$\lambda$ x y.}) benoit viguier} \\
{\small \url{}}}
% 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{frame}{Table of contents}
\setbeamertemplate{section in toc}[sections numbered]
Enable the theme by loading
\begin{verbatim} \documentclass{beamer}
Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX
installed to enjoy this wonderful typography.
Sections group slides of the same topic
\begin{verbatim} \section{Elements}\end{verbatim}
for which \themename provides a nice progress indicator \ldots
\begin{frame}{Ru titleformats}
\themename supports 4 different titleformats:
\item Regular
\item \textsc{Smallcaps}
\item \textsc{allsmallcaps}
They can either be set at once for every title type or individually.
\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.
\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.
\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.
\begin{verbatim}The theme provides sensible defaults to
\emph{emphasize} text, \alert{accent} parts
or show \textbf{bold} results.\end{verbatim}
The theme provides sensible defaults to \emph{emphasize} text,
\alert{accent} parts or show \textbf{bold} results.
\begin{frame}{Font feature test}
\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}}}
\item Milk \item Eggs \item Potatos
\item First, \item Second and \item Last.
\item[PowerPoint] Meeh. \item[Beamer] Yeeeha.
\begin{itemize}[<+- | alert@+>]
\item \alert<4>{This is\only<4>{ really} important}
\item Now this
\item And now this
\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}{%
\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;
\caption{Rotated square from
\caption{Largest cities in the world (source: Wikipedia)}
City & Population\\
Mexico City & 20,116,842\\
Shanghai & 19,210,000\\
Peking & 15,796,450\\
Istanbul & 14,160,467\\
Three different block environments are pre-defined and may be styled with an
optional background color.
Block content.
Block content.
Block content.
Block content.
Block content.
Block content.
e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n
\begin{frame}{Line plots}
\addplot {sin(deg(x))};
\addplot+[samples=100] {sin(deg(2*x))};
\begin{frame}{Bar charts}
\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}
Veni, Vidi, Vici
\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}
Some references to showcase [allowframebreaks] \cite{knuth92,ConcreteMath,Simpson,Er01,greenwade93}
Get the source of this theme and the demo presentation from
The theme \emph{itself} is licensed under a
\href{}{Creative Commons
Attribution-ShareAlike 4.0 International License}.
\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.
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 \
ADD ./ ./
RUN ./
VOLUME ["/data"]
## cf from
cd /tmp
# install unzip just in case the user doesn't already have it.
sudo apt-get install unzip -y
wget ""
wget ""
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

83.1 KB

% \iffalse meta-comment -------------------------------------------------------
% Copyright 2016 Benoit Viguier
% the original template was based on the mtheme
% ( by Matthias Vogelgesang
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
% International License (
% ------------------------------------------------------------------------- \fi
% \iffalse
\ProvidesPackage{beamercolorthemeru}[2016/11/22 Ru color theme]
% \fi
% \CheckSum{0}
% \StopEventually{}
% \iffalse
% ------------------------------------------------------------------------- \fi
% \subsection{\themename color theme}
% \subsubsection{Package dependencies}
% \begin{macrocode}
% \end{macrocode}
% \subsubsection{Options}
% \begin{macro}{block}
% Optionally adds a light grey background to block environments like
% |theorem| and |example|.
% \begin{macrocode}
.is choice,
% \end{macrocode}
% \end{macro}
% \begin{macro}{colors}
% Provides the option to have a dark background and light foreground instead
% of the reverse.
% \begin{macrocode}
.is choice,
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ru@color@setdefaults}
% Sets default values for color theme options.
% \begin{macrocode}
% \end{macrocode}
% \end{macro}
% \subsubsection{Base colors}
% \begin{macrocode}
% \end{macrocode}
% \subsubsection{Base styles}
% All colors in \themename are derived from the definitions of |normal text|,
% |alerted text|, and |example text|.
% \begin{macrocode}
\setbeamercolor{normal text}{%
\usebeamercolor[fg]{normal text}
\setbeamercolor{normal text}{%
\setbeamercolor{title text}{%
\setbeamercolor{alerted text}{%
\setbeamercolor{example text}{%
% \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}