5

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}}
5
  • 1
    Have you tried this: tex.stackexchange.com/a/415298/120578 ?
    – koleygr
    Commented Feb 24, 2018 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
    Commented Feb 24, 2018 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
    Commented Feb 24, 2018 at 22:44
  • @Zarko Thank you very much. The issue was with the enumitem package.
    – m0_as
    Commented Feb 25, 2018 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
    Commented Feb 25, 2018 at 1:15

2 Answers 2

13

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}
4
  • (+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
    Commented Feb 25, 2018 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. Commented Feb 25, 2018 at 0:28
  • 1
    @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. Commented Feb 25, 2018 at 0:53
  • clearly better than my fix (+1)
    – user121799
    Commented Feb 25, 2018 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .