I would like my description list to automatically fill the vertical space of a beamer slide. I have found solutions for this here, but it only applies to itemize
and enumerate
.
I tried to modify the examples in the list for a description
list and it gives the desired effect for vertical spacing. However, the horizontal alignment alignment is incorrect. I cannot see the full description item because it is cut off on the left as shown in the image below.
I have provided the code for what I have tried so far below. Honestly, I get a little lost when I see \makeatletter
.
\documentclass{beamer}
\makeatletter
\renewcommand{\description}[1][]{%
\beamer@ifempty{#1}{}{\def\beamer@defaultospec{#1}}%
\ifnum \@itemdepth >2\relax\@toodeep\else
\advance\@itemdepth\@ne
\beamer@computepref\@itemdepth% sets \beameritemnestingprefix
\usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
\usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
\list
{\usebeamertemplate{itemize \beameritemnestingprefix item}}
{\def\makelabel##1{%
{%
\hss\llap{{%
\usebeamerfont*{itemize \beameritemnestingprefix item}%
\usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%
}%
}%
}
\fi%
\setlength\itemsep{\fill}
\ifnum \@itemdepth >1
\vfill
\fi%
\beamer@cramped%
\raggedright%
\beamer@firstlineitemizeunskip%
}
\def\enditemize{\ifhmode\unskip\fi\endlist%
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body end}
\ifnum \@itemdepth >1
\vfil
\fi%
}
\makeatother
\begin{document}
\begin{frame}{Vertical Spacing}
\begin{description}
\item[description] details
\item[description] vertical spacing is working
\item[description] but descriptions are cut off
\end{description}
\end{frame}
\end{document}