3

All,

I'd like some help making some minor cosmetic changes to my beamer template. I like the template I have no since it's rather bare/plain (which is how I like it), but I'd like to add a little color to it in the form of a small/negligible two-tone border at the bottom of the slides.

Right now, I have something like this

enter image description here

and would like something like this, even if it means adding just a little padding to the footline to separate it from the two-tone border.

enter image description here

Right now, I have the following footline style in my template.

\defbeamertemplate*{footline}{my footline}
{
\ifnum \insertpagenumber=1
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=.8ex,dp=1ex,center]{}%
  % empty environment to raise height
\end{beamercolorbox}}%
\vskip0pt%
\else
\hspace*{.5cm}\Tiny{%
\hspace*{50pt} \hfill\insertframenumber/\inserttotalframenumber\hspace*{.00cm} \\ \vspace*{5pt}}%
\fi
}

Basically, I keep the title frame plain and have those page numbers on every other slide. I'd like to keep it like that.

Any help would be greatly appreciated. beamer markup still isn't very intuitive to me.

3

A very quick solution is to just add \rule{width}{height} in the desired colour:

\documentclass{beamer}

\setbeamertemplate{navigation symbols}{}

\defbeamertemplate*{footline}{my footline}{%
    \ifnum\insertpagenumber=1
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=.8ex,dp=1ex,center]{}%
            % empty environment to raise height
        \end{beamercolorbox}%
    }%
    \vskip0pt%
    \else%
        {%
            \Tiny
            \hfill%
            \insertframenumber/\inserttotalframenumber \hspace*{0.1cm}%
            \newline%
            \textcolor{red}{\rule{\paperwidth}{0.4mm}}\newline%
            \textcolor{black}{\rule{\paperwidth}{0.5mm}}%
        }%
    \fi%
}

\begin{document}

    \frame{a}
    \frame{d}
    \frame{c}       
    \frame{b}   

\end{document}

enter image description here

  • It took some additional tweaking to get exactly what I wanted, but this was great. Thanks! – steve Feb 23 '15 at 21:48
  • 1
    \color doesn't have a second mandatory argument; either use \textcolor{red}{\rule{\paperwidth}{0.4mm}} or {\color{red}\rule{\paperwidth}{0.4mm}} (+1, by the way). – Gonzalo Medina Feb 23 '15 at 21:59
  • @GonzaloMedina Thanks for pointing this out, I modified my example accordingly. – samcarter_is_at_topanswers.xyz Feb 24 '15 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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