1

I'm struggling at customizing the footline of my beamer slides. I want them to be symetric with the title bar (rounded with inversed horizontal shading). So far, my footline has most of the properties I want but does not go at the extreme right of the slide. How can I address this issue?

Here is my mwe

\documentclass[]{beamer}

\usepackage{pgfplots}

%%%%%%%%%% frame title
\definecolor{titleleft}{rgb}{0.0, 0.75, 1.0}
\definecolor{titleright}{rgb}{0.94, 0.97, 1.0}

\setbeamercolor*{frametitle}{fg=white}

\makeatletter
\pgfdeclarehorizontalshading[titleleft,titleright]{beamer@frametitleshade}{0.7\paperheight}{%
  color(10pt)=(titleleft);
  color(0.91\paperwidth)=(titleright)}
\pgfdeclarehorizontalshading[titleright,titleleft]{beamer@bottomtitleshade}{0.7\paperheight}{%
  color(10pt)=(titleright);
  color(0.91\paperwidth)=(titleleft)}

\defbeamertemplate*{frametitle}{horizontal shading}
{%
  \nointerlineskip%
  \vskip+3pt%
  \hbox{\leavevmode
    \advance\beamer@leftmargin by -12bp%
    \advance\beamer@rightmargin by -12bp%
    \beamer@tempdim=\textwidth%
    \advance\beamer@tempdim by \beamer@leftmargin%
    \advance\beamer@tempdim by \beamer@rightmargin%
    \hskip-\Gm@lmargin\hbox{%
      \setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
          \vbox{}\vskip-.75ex%
          \leftskip1cm%
          \rightskip0.1cm plus1fil\leavevmode
          \insertframetitle%
          \ifx\insertframesubtitle\@empty%
            \strut\par%
          \else
          \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
           \fi%
          \nointerlineskip
          \vbox{}%
          \end{minipage}}%
      \beamer@tempdim=\ht\beamer@tempbox%
      \advance\beamer@tempdim by 2pt%
      \begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
        \usebeamercolor{frametitle right}
%        \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}} 
         \pgfsetcornersarced{\pgfpoint{4mm}{4mm}}
         \pgfpathrectanglecorners{\pgfpoint{.05\paperwidth}{0}}{\pgfpoint{.9\paperwidth}{\beamer@tempdim}}
        \pgfusepath{clip}
        \pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
      \end{pgfpicture}
      \hskip-\paperwidth%
      \box\beamer@tempbox%
    }%
    \hskip-\Gm@rmargin%
  }%
  \vskip-2pt
  }
\makeatother

%%%%%%%%% end frame title

%%%%%%%%% footline
\makeatletter
\setbeamertemplate{footline}
{
    \leavevmode%
    \setbox\beamer@tempbox=\hbox{%
      \begin{beamercolorbox}[wd=\textwidth,ht=5.25ex,dp=2ex,center]{blue}%
      \end{beamercolorbox}%
    }%
        \beamer@tempdim=\ht\beamer@tempbox%
        \advance\beamer@tempdim by 2pt%
        \begin{pgfpicture}{0pt}{0pt}{\paperwidth}{15pt}
        \usebeamercolor{frametitle right}
        \pgfsetcornersarced{\pgfpoint{4mm}{4mm}}
        \pgfpathrectanglecorners{\pgfpoint{.3\paperwidth}{0}}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
        \pgfusepath{clip}
        \pgftext[base, left]{\pgfuseshading{beamer@bottomtitleshade}}
        \end{pgfpicture}
        \vskip-\beamer@tempdim%
        \box\beamer@tempbox%    
}%
\makeatother

\beamertemplatenavigationsymbolsempty
%%%%%%%%% end footline

\begin{document}

\begin{frame}
  \frametitle{XXX}
  \begin{itemize}
  \item blablabla
  \item blablabla
  \item blablabal
  \end{itemize}
\end{frame}

\end{document}

Here is the actual result actual result

1 Answer 1

1

You could use a TikZ node, then you don't have to deal yourself with all the messy stuff like the colour shading

\documentclass[]{beamer}

\definecolor{titleleft}{rgb}{0.0, 0.75, 1.0}
\definecolor{titleright}{rgb}{0.94, 0.97, 1.0}
\setbeamercolor{author in head/foot}{fg=white}

\usepackage{tikz}

%%%%%%%%% footline
\setbeamertemplate{footline}{
  \begin{beamercolorbox}[ht=1cm,dp=0.2cm,center]{}%
  \begin{tikzpicture}
    \node[
      shade, 
      left color=titleleft, 
      right color=titleright,
      text width=.85\textwidth,
      rounded corners=0.3cm,
      minimum height=0.7cm,
      font={\small\usebeamercolor[fg]{author in head/foot}},
      inner xsep=0.5cm
    ] at (0,0) {\insertshortauthor};
  \end{tikzpicture}  
  \end{beamercolorbox}
}%

\author{names}

\beamertemplatenavigationsymbolsempty

\begin{document}

\begin{frame}
  \frametitle{XXX}
  \begin{itemize}
  \item blablabla
  \item blablabla
  \item blablabal
  \end{itemize}
\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 .