I have made a beamer template and I want to change the margins, especially the one of the main body block, from the template itself. I have read about \voffset and all the other margins from another post, I tried them but they didn't work as they push the title also down. Also using shrink fails due to the margins. I can use \vspace within the frames in the tex file but this is hardly elegant and a good solution IMO.
Find below the template file (beamerthemeMedian.sty):
%% Filename: beamerthemeMedian.sty
\mode<presentation>
\RequirePackage{pgfcomp-version-0-65, textpos, xcolor, tikz}
% % WHAT I HAVE TRIED!
%\voffset=2cm
%\topmargin=2cm
%\headsep=2cm
%\headheight=3cm
\setlength{\leftmargini}{4mm}
\newcommand{\MedianLine}{%
\ifnum \insertpagenumber=1
\else
\raisebox{-15mm}[0pt][0pt]{%
\begin{pgfpicture}{0mm}{0mm}{0mm}{0mm}
\pgfsetlinewidth{3mm}
\color{yellow}
\pgfline{\pgfpoint{-1cm}{0mm}}{\pgfpoint{-0.1cm}{0mm}}%
\pgfsetlinewidth{3mm}
\color{yellow}
\pgfline{\pgfpoint{0mm}{0mm}}{\pgfpoint{12cm}{0mm}}%
\end{pgfpicture}}
\fi}
\setbeamertemplate{headline}[text line]{\MedianLine}
\setbeamertemplate{frametitle}{
\vspace*{4mm}\hspace*{0mm}\insertframetitle}
\mode
<all>
and a minimal example that uses it and demonstrates the issues:
\documentclass{beamer}
\usetheme{Median}
\usepackage{mwe}
\begin{document}
\frame{\titlepage}
\frame[shrink=5]{\frametitle{When [shrink] and no vspace}
%\vspace{0.75cm}
\begin{itemize}
\item lorem ipsum
\end{itemize}
}
\frame[shrink=5]{\frametitle{When [shrink] and no vspace}
\begin{itemize}
\item lorem ipsum
\end{itemize}
}
\frame[shrink=5]{\frametitle{When [shrink] and vspace; not elegant}
\vspace{0.75cm}
\begin{itemize}
\item lorem ipsum
\end{itemize}
}
\frame{\frametitle{Using an image; no vspace}
\begin{figure}
\includegraphics[width=4cm]{example-image}
\end{figure}
\begin{itemize}
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\end{itemize}
}
\frame{\frametitle{Using an image; with vspace; not elegant}
\vspace{0.75cm}
\begin{figure}
\includegraphics[width=4cm]{example-image}
\end{figure}
\begin{itemize}
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\item lorem
\end{itemize}
}
\end{document}
Best Answer
A quick and dirty solution is to add a
\vspace{}
after the frametitleFull code: