3

I found the following code here which changes the font size and bullet size for nested itemize. I just want to change the bullet shape as well, for example circle for subitem. But I cannot. I tried removing this code and use some other available for this, but I don't what the issue is, but wif I remove this code, all the bullets of my slide will gone (white space instead appears). Any idea for editing this code to meet my requirement?

\documentclass{beamer}
\usepackage{enumitem} 
\usepackage{wasysym}

\setlist[enumerate, 1]{label*=\arabic*., listparindent=21pt, font=\bfseries\tiny, before*=\footnotesize }

\setlist[itemize,1]{before*=\small}
\setlist[itemize,2]{before*=\footnotesize}

\setbeamertemplate{itemize item}[square]

\setitemize{label=\usebeamerfont*{itemize item} \usebeamercolor[fg]{itemize item} \usebeamertemplate{itemize item}}
  • 1
    Have you tried this: tex.stackexchange.com/a/415298/120578 ? – koleygr Feb 24 '18 at 22:36
  • @koleygr Yes, my issue is that if I remove the above code (I mean after the packages), all my bullet will go away :( – m0_as Feb 24 '18 at 22:42
  • 1
    beamer has own mechanism for itemize which is highly customized to beamer specific. therefore is not smart idea to use enumitem in it. beamer also provide a way how to change bullets etc for itemize (with \setbeamertemplate{itemize} ... etc) – Zarko Feb 24 '18 at 22:44
  • @Zarko Thank you very much. The issue was with the enumitem package. – m0_as Feb 25 '18 at 1:00
  • 1
    @m0_as, of course it is. enumitem is not compatible with beamer. using it you will lost many functionality of beamer. so don't use it. rather stick with @samcarter solution below. – Zarko Feb 25 '18 at 1:15
7

Instead of trying to use enumitem with beamer, I'd stick with beamer's own mechanism.

enter image description here

\documentclass{beamer}

\setbeamertemplate{itemize item}[square]
\setbeamertemplate{itemize subitem}[circle]

\setbeamerfont{itemize/enumerate subbody}{size=\scriptsize}

\begin{document}

\begin{frame}

    \begin{itemize}
        \item An item
        \begin{itemize}
        \item a subitem
        \end{itemize}
    \end{itemize}

\end{frame} 

\end{document}
  • (+1), as i mentioned in comment (but than have problems with beamer documentation :-( ). is \setbeamerfont{itemize/enumerate subbody}{size=\scriptsize} for this example necessary? – Zarko Feb 25 '18 at 0:25
  • @Zarko In the question the OP mentioned that he/she/it used the enumitem based code to change the fontsize, so I thought it would be a good idea to show how this works with beamer tools. – user36296 Feb 25 '18 at 0:28
  • @Zarko I just saw your question about the beamer documentation. Not a solution, but as a quick workaround you could search in cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf instead of the beamer user guide. Of course this short document does not contain any details, but to look up things like the name of a template, it's good enough. – user36296 Feb 25 '18 at 0:53
  • clearly better than my fix (+1) – marmot Feb 25 '18 at 1:05
5

I think that the problem is that you are mixing beamer and enumitem methods. But you can fix this by adding the items to the enumitem command \setlist.

\documentclass{beamer}
\usepackage{enumitem} 
\usepackage{wasysym}

\setlist[enumerate, 1]{label*=\arabic*., listparindent=21pt, font=\bfseries\tiny, before*=\footnotesize }

\setlist[itemize,1]{before*=\small,label=$\triangleleft$}
\setlist[itemize,2]{before*=\footnotesize,label=\textbullet}

\setitemize{label=\usebeamerfont*{itemize item} 
\usebeamercolor[fg]{itemize item} \usebeamertemplate{itemize item}
}
\begin{document}
\begin{frame}
\frametitle{Itemize}
\begin{overlayarea}{\textwidth}{\textheight}
\begin{itemize}
 \item An item
 \begin{itemize}
  \item a subitem
 \end{itemize}
\end{itemize}
\end{overlayarea}
\end{frame}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.