0

I found a very neat beamer theme (Arguelles, https://github.com/piazzai/arguelles) however there are three things that I believe are troublesome with the theme. I am trying to improve them but I am finding myself short of the required knowledge in the beamer class and LaTeX in general. Any help would be greatly appreciated.

This question concerns the use of the enumitem package. The theme loads enumitem, which is a great package, I use it for articles, but is not recommended with beamer (Trouble combining enumitem and beamer). I find that I can circumvent this by commenting line 49 of beamerthemeArguelles.sty to not load enumitem, and comment lines 46-55 of beamerinnerthemeArguelles.sty. However, this loses the list and description style of the theme. Any idea how to rewrite the lines 46-55 into something beamer can use?

Cryme
  • 761

2 Answers2

1

You can adjust the itemize (sub(sub))item templates like this to use the same symbols as Arguelles:

\documentclass{beamer}

\usetheme{Arguelles}

\setbeamertemplate{itemize item}{$\bullet$} \setbeamertemplate{itemize subitem}{$\circ$} \setbeamertemplate{itemize subsubitem}{$\cdot$}

\AtBeginEnvironment{itemize}{ \setlength{\leftmargini}{0.4cm} \setlength{\leftmarginii}{0.4cm} \setlength{\leftmarginiii}{0.4cm} }

\AtBeginEnvironment{enumerate}{ \setlength{\leftmargini}{0.5cm} \setlength{\leftmarginii}{0.6cm} \setlength{\leftmarginiii}{0.8cm} }

\begin{document} \begin{frame} why does this theme colour the first frame even if there is no title page? \end{frame}

\begin{frame} \frametitle{A frame with title and subtitle} \framesubtitle{Subtitle here} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua \par Itemized list: \begin{itemize} \item Lorem ipsum \item Dolor sit amet \begin{itemize} \item Consectetur \item Adipiscing elit \end{itemize} \item Sed do eiusmod \begin{itemize} \item Tempor incididunt \begin{itemize} \item Ut labore et dolore \item Magna aliqua \end{itemize} \end{itemize} \end{itemize} \end{frame}

\begin{frame} \frametitle{A frame with title and subtitle} \framesubtitle{Subtitle here} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua \par Itemized list: \begin{enumerate} \item Lorem ipsum \item Dolor sit amet \begin{enumerate} \item Consectetur \item Adipiscing elit \end{enumerate} \item Sed do eiusmod \begin{enumerate} \item Tempor incididunt \begin{enumerate} \item Ut labore et dolore \item Magna aliqua \end{enumerate} \end{enumerate} \end{enumerate} \end{frame}

\end{document}

enter image description here

enter image description here

  • That's true but what about removing the margins on the left and having the right height separations between items? – Cryme Feb 23 '24 at 20:54
  • @Cryme See my updated answer, now with adjusted leftmargini (fine tune the value as you like) – samcarter_is_at_topanswers.xyz Feb 23 '24 at 21:03
  • Great, I have made it work for the left margin. Any idea about the height separations? I was reading answers from https://tex.stackexchange.com/questions/225736/latex-beamer-define-itemsep-globally but fiddling with the different heights does not get the enumitem result (I would like the nested lists not only to be tighter in height, but also vertically closer to their parent item). – Cryme Feb 23 '24 at 21:21
  • Actually \vspace can do the job alright, let me post an answer with the entire code in case anyone is interested. The only difference now it seems is with the handling of descriptions. – Cryme Feb 23 '24 at 21:28
  • You can adjust \itemsep at the start of the list – samcarter_is_at_topanswers.xyz Feb 23 '24 at 21:34
  • That's true, you can do that for each list individually, but you can also have the specification in the inner theme. Many thanks for the help. – Cryme Feb 23 '24 at 21:35
0

In the end, this is the code (replacing lines 46-55 of beamerinnerthemeArguelles.sty)that best replicated the results using the enumitem package. It requires the package xpatch. There is still some difference with the handling of description environments, but hopefully itemize and enumerate environments look faithful to the original theme.

\setbeamertemplate{itemize item}{$\bullet$}
\setbeamertemplate{itemize subitem}{$\circ$}
\setbeamertemplate{itemize subsubitem}{$\cdot$}

\setbeamertemplate{enumerate item}[default] \setbeamertemplate{enumerate subitem}{\theenumi.\theenumii.} \setbeamertemplate{enumerate subsubitem}{\theenumi.\theenumii.\theenumiii.}

\setbeamertemplate{description item}{\normalfont\itshape\insertdescriptionitem}

\AtBeginEnvironment{itemize}{ \settowidth{\leftmargini}{\usebeamertemplate{itemize item}} \addtolength{\leftmargini}{\labelsep} \settowidth{\leftmarginii}{\usebeamertemplate{itemize subitem}} \addtolength{\leftmarginii}{\labelsep} \settowidth{\leftmarginiii}{\usebeamertemplate{itemize subsubitem}} \addtolength{\leftmarginiii}{\labelsep} }

\xpatchcmd{\itemize} {\def\makelabel} {\ifnum@itemdepth=1\relax \setlength\itemsep{0em}% separation for first level \else \ifnum@itemdepth=2\relax \vspace{-0.5em} \setlength\itemsep{-0.5em}% separation for second level \else \vspace{-0.5em} \ifnum@itemdepth=3\relax \setlength\itemsep{-.5em}% separation for third level \fi\fi\fi\def\makelabel } {} {}

\xpatchcmd{\beamer@enum@} {\def\makelabel} {\ifnum@itemdepth=1\relax \setlength\itemsep{0em}% separation for first level \else \ifnum@itemdepth=2\relax \vspace{-0.5em} \setlength\itemsep{-0.5em}% separation for second level \else \vspace{-0.5em} \ifnum@itemdepth=3\relax \setlength\itemsep{-.5em}% separation for third level \fi\fi\fi\def\makelabel } {} {}

Cryme
  • 761