33

Is it possible to replace bullet points in an itemize environment with graphics? I can find answers about replacing bullet points with other symbols, but in all the examples I can find, these symbols are given by LaTeX commands and are not separate graphics files.

I am interested in finding out if this is possible both in Beamer and other standard document classes.

3 Answers 3

21

Simply replace the mentioned LaTeX commands with \includegraphics[<options>]{<image>} (graphicx package). You can adjust the scale or height of the images using the scale and height option, receptively. Using either ex or em as unit for the height will scale the image depending on the font size.

For beamer you do it the following way (See also Change bullet style / formatting in Beamer)

\documentclass{beamer}

\usepackage{graphicx}

\defbeamertemplate{itemize item}{image}{\small\includegraphics[height=1.6ex]{myimage}}
\defbeamertemplate{itemize subitem}{image}{\scriptsize\includegraphics[height=1.6ex]{myimage}}
\defbeamertemplate{itemize subsubitem}{image}{\tiny\includegraphics[height=1.6ex]{myimage}}

\setbeamertemplate{itemize item}[image]
\setbeamertemplate{itemize subitem}[image]
\setbeamertemplate{itemize subsubitem}[image]

\begin{document}

\begin{frame}{Example}

\begin{itemize}
    \item A
    \item B
    \item C
    \begin{itemize}
        \item A
        \item B
        \item C
        \begin{itemize}
            \item A
            \item B
            \item C
        \end{itemize}
    \end{itemize}
\end{itemize}

\end{frame}

\end{document}

For the normal itemize you can redefine \labelitemi, \labelitemii, \labelitemiii and \labelitemiv for the four possible nesting levels.

If you want to have different images for different items you should simply define macros which call \item with the optional argument as described by me in How to define a list with custom symbols?.

For images this would look e.g. like this:

\newcommand*\tick{\item[\includegraphics[height=1.6ex]{tickimg}]}
\newcommand*\fail{\item[\includegraphics[height=1.6ex]{failimg}]}
5
  • 1
    Very good comprehensive answer! I also like \defbeamertemplate which my solution didn't use.
    – Stefan Kottwitz
    Commented Mar 5, 2011 at 19:49
  • @Stefan: Thanks, for that I like your \setbeamertemplate{itemize item}{\upbullet} because it is more direct, which is good for small changes which are are not reused often. Commented Mar 5, 2011 at 21:01
  • @MartinScharrer i adopted this solution myself by i later found out that it does not play well with \setbeamercovered{transparent} (the image remains fully showed when the text is grayed out). is there a way to fix this? or at least include a different image when the item is covered? Commented Sep 19, 2012 at 21:59
  • @capitalaslash: Sorry, no idea. My beamer template knowledge doesn't go so far. Commented Sep 20, 2012 at 5:08
  • Your newcommand definition don't work. It results in ! Argument of \beamer@includegraphics has an extra }. It seems it cannot handle the double [ of graphics arguments inside the item arguments.
    – Youda008
    Commented Mar 15 at 12:35
21

Here's a beamer way, using setbeamertemplate which Leo mentioned:

\documentclass{beamer}
\newcommand*{\upbullet}{\includegraphics[width=1em]{up}}
\setbeamertemplate{itemize item}{\upbullet}
\begin{document}
\begin{frame}
\begin{itemize}
 \item One
 \item Two
 \item Three
\end{itemize}
\end{frame}
\end{document}

enter image description here

1
  • Can i do this only for particular itemize section?
    – Youda008
    Commented Mar 15 at 12:35
12

Redefine \labelitemi. The origin definition is (in standard document classes):

\newcommand\labelitemi{\textbullet}

You can redefine it as your wish:

\renewcommand\labelitemi{\includegraphics{foo}}

For beamer, you can use \setbeamertemplate. Please refer manual of beamer for details. And you can see this question:

Change bullet style / formatting in Beamer

2
  • 5
    Or do the same thing using the enumitem package. \setitemize[1]{\includegraphics{foo}}, where [1] is the depth of the itemization.
    – Alan Munn
    Commented Mar 5, 2011 at 19:42
  • 5
    @Alan Munn: Very good advice! enumitem is great for most documents. Just a remark, since also beamer is a part of the question: enumitem doesn't work with beamer.
    – Stefan Kottwitz
    Commented Mar 5, 2011 at 19:56

You must log in to answer this question.

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