I'm trying to present my thesis in stochastic area with some beautiful Beamer theme I found useful website http://latex.simon04.net/.
But as my thesis is in stochastic (probability) I search if there are any themes which contain style or background like this
Could someone indicate me of any probability theme if it exists
[Tex/LaTex] Probability beamer theme
beamertikz-pgf
Related Solutions
Build your own theme: no one forces you to exploit predefined inner, outer, color and font themes. Look at this theme: is it instantly recognisable as Beamer ?
But, let's have a practical example: it is one hour-built theme, thus take it just for demonstration. Lot of improvements can be done. The reference is one of your pictures.
We call this new theme texsx
mainly due to the fact that I don't have much fantasy with names. So in a directory we create the following files:
beamercolorthemetexsx.sty
beamerinnerthemetexsx.sty
beamerouterthemetexsx.sty
beamerthemetexsx.sty
texsx-example.tex
To build the theme we might exploit TikZ: very likely you can avoid it, but the question has the magic tag, so I felt almost obligated (even if the true reason is: with TikZ was faster ;)
).
So we keep beamerthemetexsx.sty
very simple:
\mode<presentation>
% Requirement
\RequirePackage{tikz}
% Settings
\useinnertheme{texsx}
\useoutertheme{texsx}
\usecolortheme{texsx}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded][shadow=true]
\mode<all>
we load the themes, remove the navigation symbols and define blocks aspect.
Now, let's start define the title page in the inner
theme. As we need to test what we're doing, at first is is better to set up the example document:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{There Is No Largest Prime Number}
\date[ISPN ’80]{27th International Symposium of Prime Numbers}
\author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}
\usetheme{texsx}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}
Nothing is strange or difficult till now. Time to build the titlepage; I would proceed as follows:
- exploit the
background
template to set the titlepage background - define a
title page
template in which the title, the author and the date are actually set.
The operations described are translated in beamerinnerthemetexsx.sty
in the following way:
\mode<presentation>
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fill[color=brown] (0,2) rectangle (\the\paperwidth,\the\paperheight);
\fill[color=orange] (0,0) rectangle(2.95,1.9);
\fill[color=blue!50!cyan!80] (3.05,0) rectangle(\the\paperwidth,1.9);
\ifnum\thepage>1\relax%
\fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}
% Title page
\defbeamertemplate*{title page}{texsx}[1][]
{
\vskip6cm%
\begin{beamercolorbox}[wd=12cm,leftskip=3cm,sep=8pt,#1]{title page header}
\usebeamerfont{title}\inserttitle\par%
\end{beamercolorbox}%
\vskip0.75cm%
\begin{beamercolorbox}[wd=12cm,leftskip=3cm,#1]{author}
\usebeamerfont{author}\insertauthor%
\end{beamercolorbox}
\vskip0.2cm%
\begin{beamercolorbox}[wd=12cm,leftskip=3cm,#1]{date}
\usebeamerfont{author}\insertdate%
\end{beamercolorbox}
\vfill
}
\mode
<all>
It is important to notice that we define ourself the bounding box through \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
then, thanks to the test on the page number, we apply the background on the title page only.
In the title page
template then we actually put the elements mentioned above. We characterize their color aspect passing to beamercolorboxes
title page header
, author
, date
so we need these definitions. Let's add them to the beamercolorthemetexsx.sty
:
\mode<presentation>
% Settings
\setbeamercolor*{title page header}{fg=white}
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\mode
<all>
Now, if we compile our example we get:
Cool!
Let's going on defining the aspect of the frame title. This is done with a template called frametitle
in the beamerouterthemetexsx.sty
, which looks like:
\mode<presentation>
% Frame title
\defbeamertemplate*{frametitle}{texsx}[1][]
{
\vskip1cm%
\begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle}
\begin{tikzpicture}
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,1.2);
\fill[orange] (0,0) rectangle(2.95,1.2);
\fill[blue!50!cyan!80] (3.05,0) rectangle(\the\paperwidth,1.2);
\ifx\insertframesubtitle\@empty%
{\node[anchor=west, white,font=\large] at (3.2,0.61){\insertframetitle};}
\else%
{\node[anchor= west, white,font=\large] at (3.2,0.81){\insertframetitle};%
\node[anchor= west, white,font=\small] at (3.2,0.41){\insertframesubtitle};}%
\fi
\end{tikzpicture}
\end{beamercolorbox}
}
\mode<all>
Basically, we exploit the same concept of the titlepage to draw some boxes; then we check whether the subtitle is present: accordingly we set the position of title and subtitle or we set only the frame title with TikZ nodes.
We need again tests to verify our idea. So let's add something on our example:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{There Is No Largest Prime Number}
\date[ISPN ’80]{27th International Symposium of Prime Numbers}
\author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}
\usetheme{texsx}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number. \end{theorem}
\begin{enumerate}
\item<1-| alert@1> Suppose $p$ were the largest prime number.
\item<2-> Let $q$ be the product of the first $p$ numbers.
\item<3-> Then $q+1$ is not divisible by any of them.
\item<1-> But $q + 1$ is greater than $1$, thus divisible by some prime
number not in the first $p$ numbers.
\end{enumerate}
\end{frame}
\begin{frame}{A longer title}
\begin{itemize}
\item one
\item two
\end{itemize}
\end{frame}
\end{document}
As we also have lists, we have to define their aspect and color. So we need to add:
\setbeamercolor*{item}{fg=orange}
in our beamercolorthemetexsx.sty
and:
% Items
\setbeamertemplate{items}[square]
\setbeamertemplate{sections/subsections in toc}[square]
in beamerinnerthemetexsx.sty
. It is not mandatory to put the latter definitions in the inner theme, but I followed the Beamer style.
It seems to me we can compile our document; the result is:
Ok, I agree: the colors are not the ones in the reference picture and the subtitle is not perfectly aligned with the title (this is due to the font size difference), but the new theme is here.
You should NOT put custom or personal additions under /usr/local/texlive/2013/
as that directory should be reserved for the TeX distribution. Changes you make there can easily be overwritten when you update the installation and will certainly be lost if you switch to, say, TeX Live 2014.
The reason it doesn't work when you add the theme there is because TeX relies on a database of hashed names to find things in that directory. You would have to also update that database in order for the theme to be found.
You have two options.
- Your personal
texmf
tree. TeX does not use a hashed database to search this directory - it just looks at what is there at the time of compilation. /usr/local/texlive/texmf-local/
[note that this is NOT under a directory named for a year]. TeX does use a hashed database for this directory. So if you use this one, you need to update that database in order for the theme to be found.
The first option is easier since all you need do is put the file in the correct place - no need to worry about updating any database.
Try placing the theme in <your home directory>/Library/texmf/tex/latex/beamer/themes/
to mirror the directory structure you found in your main texmf
tree. Note that you should NOT use /Library
. You want to use <your home>/Library/
.
If you did want to use the local texmf
tree rather than your personal one - perhaps because other users of the machine should have access to the same theme - you could use /usr/local/texlive/texmf-local/tex/latex/beamer/themes/
. To update the database of names, you would then need to run mktexlsr /usr/local/texlive/texmf-local
. (You could just run mktexlsr
but it is a little quicker to specify the appropriate texmf
tree.)
Best Answer
When you need this level of customization, it is unlikely that you find themes which suit perfectly all you need, and it is time for you to do the "dirty work" yourself.
Adding a background image to a beamer presentation is possible using the
background canvas
template.A very basic MWE (I didn't change the color of anything to make the text readable, nor did I try to tweak the alignment).
The images you provided don't make a good fit for a background, they don't have a high-enough resolution, and they are too colorful for the text to be readable. But that's no longer a latex problem.
Edit: As mentioned by Mark Wibrow in a comment, the readability issue can be tackled with Latex features, using
tikz
to change the opacity of the included picture.His code snippet also shows how one can change the placement of the picture, by aligning it to the right.
If you want to have a different image on each slide, you have a few solutions.
The first one is to manually define the background at each slide (thanks to Mark Wibrow for this solution).
For this, you put in the preamble:
and you call it using
Another option, if you want to cycle amongst a few images only, is to use the beamer template system. That is, you define different templates for the background in the preamble:
and then you can use them in the document