Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am on my way to create a beamer template according to the powerpoint template from my institute.

For the theme I need the possibility to use a footline plus a left sidebar. The problem is that the sidebar should go to the bottom and not to the top line of the footline. The sidebar should only be a slim line on the left side for estetic reasons. No relevant content.

What I did get so far is in the picture: Page created with the theme

The colors will be set later correctly. I want the black block go to the bottom end of the page. The green is the footline (for correct identification).

I created the black block using (\ILEA@Sidebar@Width is a fixed, pre-defined length in the theme)

\defbeamertemplate*{sidebar left}{ILEA}{%
\rule{\ILEA@Sidebar@Width}{\textheight}%
}

I first thought of calculating the height of the foot line and then to enlarge the rule height by that but the gap between the black rule and the green background will not be included, will it?

If I disable the footline (make it empty), the gap is still there. So it seems to be not the raw footline, that inserts the space here. I"ll give you a (more or less) minimal working example to reproduce what I did:

\documentclass{beamer}
\setbeamersize{sidebar width left=12pt}
\setbeamercolor*{footline}{fg=red,bg=green}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{%
\begin{beamercolorbox}{footline}%
~\hfill \insertframenumber\hspace{10pt}\vspace{1ex}%
\end{beamercolorbox}}
\setbeamertemplate{sidebar left}{%
\rule{10pt}{\textheight}}
\begin{document}
\begin{frame}
\frametitle{Der Titel}
Mein Text
\end{frame}
\end{document}

EDIT:

I want to avoid hardcodeing some length values other than estetic ones into the template. Otherwise it might quickly happen, that any modification to let's say the font size might lead to destruction of the template. So I'd like to let latex calculate this required length.

If you put instead \setbeamertemplate{sidebar left}{a \vfill b} you see, that latex seems to know the correct height of the availabe space. As far as I know, \textheight represents the length of the vertical availabe space. So I tried this length.

Is there a better way to handle things?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Try \paperheight

\documentclass{beamer}
\usepackage{calc}
\setbeamersize{sidebar width left=12pt}
\setbeamercolor*{footline}{fg=red,bg=green}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{%
\begin{beamercolorbox}[sep=2pt]{footline}%
~\hfill \insertframenumber\hspace{10pt}\vspace{1ex}%
\end{beamercolorbox}}
%
\newlength\mytep
\setlength\mytep{\paperheight-10.7pt}
\setbeamertemplate{sidebar left}{%
\begin{beamercolorbox}[ht=\mytep, wd=10pt, dp=0pt]{footline}%

\end{beamercolorbox}
%
}
\begin{document}
\begin{frame}
\frametitle{Der Titel}
Mein Text
\end{frame}
\end{document}

To avoid any overfull vertical boxes one should calculate the width of all elements and subtract this form the height of the sidebar. In this example i have added a manual adjustment since an automatic version would need a real life example. (Another possibility is to use the sidebar theme.)

You also may find the sidebar section in the beameruserguide intressting.

If one does not want to care about heights and errors, one could use the sidebar canvas left template. (This does not clip but will raise so errors. see beameruserguide)

\documentclass{beamer}

\setbeamersize{sidebar width left=12pt}

\setbeamercolor*{footline}{fg=red,bg=green}

\setbeamertemplate{footline}{%
\begin{beamercolorbox}[sep=2pt]{footline}%
~\hfill \insertframenumber\hspace{10pt}\vspace{1ex}%
\end{beamercolorbox}}
\setbeamertemplate{sidebar left}{%

%
}

\setbeamertemplate{sidebar canvas left}{\color{red}\rule{12pt}{\paperheight}}

\begin{document}
\begin{frame}
\frametitle{Der Titel}
Mein Text
\end{frame}
\end{document}
share|improve this answer
    
This will raise a badbox on every single frame later on. Can I avoid that? –  Christian Wolf Feb 28 '13 at 12:47
    
@ChristianWolf I wonder why one would care about this, but i added a a possible solution. –  bloodworks Feb 28 '13 at 13:04
1  
If you have many pages (overlays!), you will have many bad boxes. You will then maybe oversee real bad boxes that you better should not. Also see my edit of the question. –  Christian Wolf Feb 28 '13 at 13:31
    
@ChristianWolf unlike text documents a presentation ought to be checked careful visually and tested on a actual beamer. I recommend not to rely on warnings only. But see my edit. –  bloodworks Feb 28 '13 at 15:15
    
@bloodworks I agree that in a presentation, the result is important, and not the bad boxes. Sill, people who don't care about bad boxes are pain-in-the-neck if you revise their work. And having one "not bad" bad box in a document doesn't cause one to oversee the real ones, but having one on each page does. It is a matter of a good style to try to make your code not to produce any implicit ones. –  tohecz Mar 1 '13 at 12:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.