1

I just require three types of pages. For all of those pages I want to declare a specific style, like the following:

  • Mainpage: The Mainpage is only used once, at the beginning and includes author, title, date, institution and maybe something optional like a link of supported company or something like that..think about a small picture. I need to implement some boxes with rounded corners filled with a specific color. There shall be no headline or footline. Since I don't know much about beamer (just starting to work with beamer) I try to realise alot with tikz (like the rounded corner-boxes).
  • Emptypage: The Emptypage will be used for the ToC or as a introductionpage to the next topic or for questions. I do not need a headline or footline.
  • Content: The Content will need a headline and footline.

Next I have to implement some boxes for "definition, theorem, lemma, corollary, proposition". So if the user will type

\begin{definition}[thing, that will be defined]
    Definition of that thing.
\end{definition}

the output shall be a box with rounded corners with a heading "Definition: thing, that will be defined" with a specific background and below there has to filled in the definition. Some spacing left and right. (I guess, that this is easy)

Now I hope you know, what I need to do. My first question is: How to declare mainpage, emptypage, contentpage?

Edit: If I declare:

\setbeamertemplate{headline}{%
    \begin{tikzpicture}[remember picture, overlay]
        \node [rectangle, left color=gradient, right color=gradient!30!white, anchor=north, minimum width=\paperwidth, minimum height=1cm] (box) at (current page.north){};
  \end{tikzpicture}%
}

it only appears on the first page.

MWE:

\documentclass{beamer}
\usetheme{test}
\title{Title}
\author{Author}
\date{\today}
\institute{Institute}

\begin{document}
    \begin{frame}{Mainpage}
        \titlepage
    \end{frame}
    \begin{frame}{Emptypage}
        \tableofcontents
    \end{frame}
    \begin{frame}{Content}
        some content
    \end{frame}
\end{document}

beamerthemetest.sty

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{amsfonts, amsmath, amssymb, amsthm}
\usepackage{textcomp}
\usepackage{lmodern} 
\usepackage{tikz}

% Declare the mainpage
    % only will be used for the mainpage

% Declare emptypage
    % only for the emptypage

% Declare contentpage
    % only for content
\definecolor{gradient}{HTML}{0E1778}

% headline
\setbeamertemplate{headline}{%
    \begin{tikzpicture}[remember picture, overlay]
        \node [rectangle, left color=gradient, right color=gradient!30!white, anchor=north, minimum width=\paperwidth, minimum height=1cm] (box) at (current page.north){};
  \end{tikzpicture}%
}
9
  • Your question boils down to the usage of tcolorbox I think. Please post a MWE so that we can help you better.
    – TeXnician
    Feb 26, 2017 at 17:15
  • Thank you for your response. First I only need to know how to declare different pagestyles. If I declare \setbeamertemplate{headline}{% \begin{tikzpicture}[remember picture, overlay] \node [rectangle, left color=gradient, right color=gradient!30!white, anchor=north, minimum width=\paperwidth, minimum height=1cm] (box) at (current page.north){}; \end{tikzpicture}% } it only appears on the first page.
    – Shalec
    Feb 26, 2017 at 17:17
  • 1
    There is a frame option called plain that should remove head- and footlines. You could add that for specific frames.
    – TeXnician
    Feb 26, 2017 at 17:18
  • Please do not post code fragments as comments but rather edit your post.
    – TeXnician
    Feb 26, 2017 at 17:18
  • I did it like you mentioned.
    – Shalec
    Feb 26, 2017 at 17:21

1 Answer 1

2

Generally it's better to only ask one question per question

Mainpage: The Mainpage is only used once, at the beginning and includes author, title, date, institution and maybe something optional like a link of supported company or something like that..think about a small picture. I need to implement some boxes with rounded corners filled with a specific color. There shall be no headline or footline. Since I don't know much about beamer (just starting to work with beamer) I try to realise alot with tikz (like the rounded corner-boxes).

You can simply use \titlepage. If you don't like the default layout or if you want to include additional information, you can redefine it using \setbeamertemplate{titlepage}{...}.

All the elements are already in boxes, you just have to make them visible by defining their colour, for example \setbeamercolor{title}{bg=blue!60!black, fg=white}. To make these boxes rounded, use \useinnertheme{rounded}.

To remove the head- and footline use the plain option for the frame.

Emptypage: The Emptypage will be used for the ToC or as a introductionpage to the next topic or for questions. I do not need a headline or footline.

plain option, see above

Content: The Content will need a headline and footline.

You already have the headline in your code, just define a footline in a similar way or use one of the default footlines from beamer

Next I have to implement some boxes for "definition, theorem, lemma, corollary, proposition". So if the user will type

Beamer already has this, you just have to make them visible, for example:

\setbeamercolor{block body}{fg=black, bg=green!70!white}
\setbeamercolor{block title}{fg=white, bg=green!40!black}

not asked but...

You don't need xcolor or graphicx with beamer, as these are already provided.


\documentclass{beamer}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
%\usepackage{xcolor}
%\usepackage{graphicx}
\usepackage{amsfonts, amsmath, amssymb, amsthm}
\usepackage{textcomp}
\usepackage{lmodern} 
\usepackage{tikz}

% Declare the mainpage
    % only will be used for the mainpage

% Declare emptypage
    % only for the emptypage

% Declare contentpage
    % only for content
\definecolor{gradient}{HTML}{0E1778}

% headline
\setbeamertemplate{headline}{%
    \begin{tikzpicture}[remember picture, overlay]
        \node [rectangle, left color=gradient, right color=gradient!30!white, anchor=north, minimum width=\paperwidth, minimum height=1cm] (box) at (current page.north){};
  \end{tikzpicture}%
}

\useinnertheme{rounded}
\setbeamercolor{frametitle}{fg=white}
\setbeamercolor{title}{bg=blue!60!black, fg=white}
\setbeamercolor{block body}{fg=black, bg=green!70!white}
\setbeamercolor{block title}{fg=white, bg=green!40!black}


\title{Title}
\author{Author}
\date{\today}
\institute{Institute}

\begin{document}
    \begin{frame}[plain]
        \titlepage
    \end{frame}
    \begin{frame}[plain]
        \tableofcontents
    \end{frame}
    \section{test}
    \begin{frame}{Content}
        some content
        \begin{definition}
            bal bla
        \end{definition}
    \end{frame}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .