[Tex/LaTex] Creating the own Beamer Theme

beamertemplatestikz-pgf

I'm trying to create my own beamer theme based on this answer. My data till now:

beamerthemetexsx.sty

%beamerthemetexsx.sty
\mode<presentation>

% Requirement
\RequirePackage{tikz}
\RequirePackage{xcolor}

%Colour
\definecolor{aublue}{HTML}{0A1439}

% Settings
\useinnertheme{texsx}
\useoutertheme{texsx}
\usecolortheme{texsx}

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded][shadow=true]  

\mode<all>

beamercolorthemetexsx.sty

%beamercolorthemetexsx.sty
\mode<presentation>

% Settings
\setbeamercolor*{title page header}{fg=white}
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\setbeamercolor*{item}{fg=orange}
% Items
\setbeamertemplate{items}[square]
\setbeamertemplate{sections/subsections in toc}[square]
\mode
<all>

beamerouterthemetexsx.sty

%beamerouterthemetexsx.sty
\mode<presentation>

\setbeamertemplate{background}{
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
  \fill[color=aublue] (0,0.75) rectangle (\the\paperwidth, 8);
  \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][]
{ 
    \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>

beamerinnerthemetexsx.sty

%beamerinnerthemetexsx.sty
\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[aublue] (0,0) rectangle(\the\paperwidth,1.5);
   \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>

texsx-example.tex

%texsx-example.tex
\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}

Problems

1. Outer

A picture says more than thousand words:
Titlepage

I would like to place the university logo (looks like a square) at point 1, the title in big at point 2 and the name of my university at point 3. I've tried a lot, but it seems like all information just wants to be in the blue field. I don't know how to fix that.

2. Inner

Next image:

First page.

I would like to move the titleframe a little more upwards (there should still be some white space). In the white space over the titleframe, I would love to have the name of my university in black, next the name of the authors in grey (all seperated by | ) at point (1).

Second, I would love to place my university logo (from the title frame) at point 2.

More Clarification

I've tried the best I can. If I get a little help, I will try more (since it's just two problems going again and again).

Thank you very much in advance!

Best Answer

The following example should in principal display everything you mentioned. I redefined some of your elements, but now the positioning is very flexible. So if you want the frametitle a little bit further up, just play around with its coordinates.

[caution notice: all the coordinates are just to roughly fit our design, you might want to finetune them]

%texsx-example.tex
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{There Is No ...}
\date[ISPN ’80]{27th International Symposium of Prime Numbers}
\author[author1 \quad|\quad author2]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}
\institute{My University}

\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}

%beamercolorthemetexsx.sty
\mode<presentation>

% Settings
\setbeamercolor*{title page header}{fg=white}
\setbeamercolor*{frametitle}{fg=white}
\setbeamercolor*{framesubtitle}{fg=white}
\setbeamercolor*{headline}{fg=red}
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\setbeamercolor*{title}{fg=red}
\setbeamercolor*{institute}{fg=red}
\setbeamercolor*{item}{fg=orange}
% Items
\setbeamertemplate{items}[square]
\setbeamertemplate{sections/subsections in toc}[square]
\mode
<all>

%beamerinnerthemetexsx.sty
\mode<presentation>

% Frame title
\defbeamertemplate*{frametitle}{texsx}[1][]{
    \setlength{\unitlength}{1mm}
    \begin{picture}(0,0)(0,0)
        %author
        \put(10,2){%
            \usebeamerfont{footline}
                \usebeamercolor[fg]{headline}%
                \ifx\insertinstitute\empty\else
                    \insertshortinstitute\quad|\quad
                \fi
                \ifx\insertauthor\empty\else
                    \insertshortauthor
                \fi
        }%
        % Blue background
        \put(-10,-12){\color{aublue}\rule{\paperwidth}{12mm}}
        % logo
        \put(-10,-12){\includegraphics[height=12mm]{pic}}
        % Title
        \put(10,-8){%
            \begin{minipage}[c][30mm][c]{80mm}
                \ifx\insertframetitle\empty\else
                \usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}\insertframetitle\par%
                \fi%
                \ifx\insertframesubtitle\empty\else
                \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\par%
                \fi%
            \end{minipage}
        }
    \end{picture}
}

\mode<all>

%beamerthemetexsx.sty
\mode<presentation>

% Requirement
\RequirePackage{tikz}
\RequirePackage{xcolor}

%Colour
\definecolor{aublue}{HTML}{0A1439}

% Settings
\useinnertheme{texsx}
\useoutertheme{texsx}
\usecolortheme{texsx}
\usefonttheme{texsx}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded][shadow=true]  

\mode<all>

%beamerouterthemetexsx.sty
\mode<presentation>

% Title page
\defbeamertemplate*{title page}{texsx}[1][]
{ 
        \setlength{\unitlength}{1mm}
        \begin{picture}(0,0)(0,0)
            % Blue background
            \put(-10,-46.5){\color{aublue}\rule{\paperwidth}{72mm}}
            % logo 
            \put(0,28){\includegraphics[width=.15\textwidth]{pic}}
            % Title
            \put(23,32){%
                \begin{minipage}[c][30mm][c]{80mm}
                    \usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par%
                \end{minipage}
            }
            % author etc
            \put(23,-5){%
                \begin{minipage}[c][30mm][c]{80mm}
                    \ifx\insertauthor\empty\else
                        \usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor%
                        \vskip0.2cm%
                    \fi%
                    \ifx\insertdate\empty\else
                        \usebeamerfont{author}\usebeamercolor[fg]{author}\insertdate%
                    \fi%
                \end{minipage}
            }       
            % author etc
            \put(23,-53){%
                \begin{minipage}[c][30mm][c]{80mm}
                \ifx\insertinstitute\empty\else
                    \usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute%
                \fi%
                \end{minipage}
            }               
    \end{picture}
}

\mode
<all>

%beamerfontthemetexsx.sty
\mode<presentation>

\setbeamerfont{title}{series=\bfseries,size=\fontsize{18}{22}}
\setbeamerfont{footline}{size=\fontsize{6}{8}}

\mode
<all>

enter image description here