josephwright / josephwright/beamer
Non-hacky way to configure topsep and itemsep
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 1.7k
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
Unless I missed something, it is surprisingly difficult to configure in beamer the spacing in lists, as it is incompatible with the great enumitem package. Notably, to just remove the vertical space between the text and the list (usually called topsep), you need a crazy hack that basically redefines itemize https://tex.stackexchange.com/questions/115907/how-do-i-remove-white-space-above-itemize-command-in-beamer-using-enumitem Similarly, other hacks are needed to configure the \itemsep globally https://tex.stackexchange.com/questions/225736/latex-beamer-define-itemsep-globally
It would be great to propose a simple solution to these issues, to allow both local and global configuration of these parameters.
MWE
\documentclass{beamer}
\setbeamertemplate{itemize/enumerate body begin}{%
\setlength{\leftmargini}{0em}% Adjusts the left horizontal margin between margin and text
\setlength{\labelsep}{0mm}% Adjusts the space between bullet and text
}
\setbeamertemplate{itemize/enumerate subbody begin}{\setlength{\leftmarginii}{4cm}\setlength{\labelsep}{10mm}} % Adjust the left margin for nested lists
\setbeamertemplate{itemize/enumerate subsubbody begin}{\setlength{\leftmarginiii}{2em}} % Adjust the left margin for further nested lists
\setbeamertemplate{itemize item}[triangle] % Use a triangle bullet
\setbeamertemplate{itemize body item}{\setlength{\itemsep}{10cm}} % Adjust the space for nested lists
\begin{document}
\begin{frame}
See that topsep does not work:
\topsep100pt % does not work
\setlength{\parsep}{0mm} %
\begin{itemize}
\setlength{\itemsep}{0mm} % important to be inside the itemize. to set it globally, see https://tex.stackexchange.com/questions/225736/latex-beamer-define-itemsep-globally
\item We want no space between here and the next item
\item Let us put instead lots of space for subitems
\begin{itemize}
\setlength{\itemsep}{10mm} % important to be inside the itemize. to set it globally, see https://tex.stackexchange.com/questions/225736/latex-beamer-define-itemsep-globally
\item a
\item b
\end{itemize}
\item Second item
\end{itemize}
\end{frame}
\end{document}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MWE in the issue and compare its topsep and itemsep behavior with the two linked TeX Stack Exchange examples. Determine a simple approach that supports both local and global list-spacing configuration, then verify that the demonstrated beamer lists can set those parameters without redefining itemize.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex
- Domain
- design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100