# Tweaking infolines outer theme with horizontal shading

I'm trying to improve on the infolines outer theme by adding shading at the edge of each box of the footline. Taking a very simple example, my code is:

\documentclass{beamer}

\usepackage{tikz}

\useoutertheme{infolines} %current section at the top; author, institution, title, date and page at bottom

\makeatletter
\AtBeginDocument{

}
}

% Adjust footline (use just author/institution/date/page)
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\end{beamercolorbox}%
\end{beamercolorbox}%
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother

\usecolortheme{beaver}

\usefonttheme{structuresmallcapsserif}

\title{Title}
\author{Author}
\institute{Institute}
\date{Date}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\end{document}


And the output looks like this: My color choices here are deliberately ugly, to make things more apparent. In practice, what I want is a "blend" feeling at the shared border of the red and pink areas in the footline; same for the pink and grey ones. So, I have the following three problems:

-why is the shaded area not vertically aligned with the box I put it in?

-how can I shift it leftwards to adjust it to the rim of the boxes?

-in the definition of the shading, here:

\pgfdeclarehorizontalshading{beamer@authorinstituteshade}{2.25ex}{%
}


How can I set the height of the shading to automatically match the height of the box it is called in, instead of being manually set to the same height {2.25ex} ?

• Welcome to TeX.Stackexchange! – user36296 Oct 31 '17 at 20:41

\documentclass{beamer}

\usepackage{tikz}

\useoutertheme{infolines}
\usecolortheme{beaver}

\colorlet{titleleft}{red!60!black}
\colorlet{titlemiddle}{red!40!}
\colorlet{titleright}{gray!40}

color(0\paperwidth)=(titleleft);
color(0.15\paperwidth)=(titleleft);
color(0.5\paperwidth)=(titlemiddle);
color(0.85\paperwidth)=(titleright);
color(\paperwidth)=(titleright)
}

\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\end{beamercolorbox}%
\end{beamercolorbox}%
\end{beamercolorbox}%
}%
\vskip-\beamer@tempdim%
\beamer@tempdim=\ht\beamer@tempbox%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
}%

{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\end{beamercolorbox}%
\end{beamercolorbox}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\vskip-\beamer@tempdim%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
\vskip0pt%
}
\makeatother

\title{Title}
\author{Author}
\institute{Institute}
\date{Date}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\end{document}


• Thanks, that's great! One issue though: why is there a blank space between the navigation bar and the footline? – Magean Oct 31 '17 at 21:40
• @Magean fixed :) – user36296 Oct 31 '17 at 22:57
• Thanks again! Last (very minor) problem: there's a thin blank space to the left of the footline and headline. Can it be filled in? I tried adjusting the positioning of the various boxes but I'm too awkward at it. Also, could you please detail what you did with this chunk of code? I tried understanding it piecewise but I'm not expert enough... I have in mind the part that starts with \vskip-\beamer@tempdim% and ends with: \box\beamer@tempbox% – Magean Nov 1 '17 at 16:54
• @Magean Sorry, but I don't see a blank space. How are you compiling? – user36296 Nov 1 '17 at 16:58
• it's weird, the blank space only appears on some zoom percentages, but not all. Here's a zoomed-out example: image.noelshack.com/fichiers/2017/44/3/… It also appears on zoom-in documents, the relationship between the zoom % and the blank space is non-monotonic. I didn't observe it before, on basic infoline. I'm compiling with Mactex, using TexStudio as GUI. Maybe I should update Mactex and see what happens. – Magean Nov 1 '17 at 17:19