I am currently struggling to create fancy-looking section pages in Beamer
to achieve the following layout:
Based on my question on the matching TOC (fancy-table-of-contents-for-beamer) I came up with the following code which does not look so bad but does to really resemble the given layout. Any idea how to improve the code?
\documentclass[svgnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\pgfdeclarehorizontalshading{section shading}{2cm}{
color(0cm)=(LightSlateGrey!15);
color(3cm)=(LightSlateGrey)
}
\pgfdeclarehorizontalshading{subsection shading}{2cm}{
color(0cm)=(red!15);
color(1cm)=(red);
color(3cm)=(green)
}
\usepackage{tikz}
\tikzset{section number/.style={
draw=none,
rectangle,
left color=gray!40,
right color=gray!20!black,
minimum size=3.5em,
text=white,
},
section/.style={
draw=none,
rectangle,
shading=section shading,
minimum height=3.5em,
minimum width=0.9\textwidth,
text width=0.9\textwidth,
text=black,
align=left
},
subsection/.style={
draw=none,
rectangle,
shading=subsection shading,
minimum height=2em,
minimum width=0.9\textwidth,
text width=0.9\textwidth,
text=black,
align=left
}
}
\begin{document}
\frame{
\begin{tabular}{p{1.2cm}p{9cm}}
\tikz[baseline=-0.5ex]\node[section number]{\bfseries\Large 123}; & \tikz[baseline=-0.5ex]\node[section]{\bfseries\large fxdfsdf}; \\ & \\
& \tikz[baseline=-0.5ex]\node[subsection]{\bfseries fxdfsdf};
\end{tabular}
}
\end{document}
Best Answer
Here's one possibility; the section frames are automatically created using
\AtBeginSection
. I used your colors and shadings, but you can change them easily (and, of course, feel free to make any other changes, according to your needs):All you have to do is to use
\sectionsubtitle
before each\section
command.