0

I am using the enumitem package to customise my list. That works fine, however I would like to combine images and the counter to each item in an easy way. What I tried:

\begin{enumerate}[label=\thechapter.\arabic*, font=\normalfont, wide= 4pt, leftmargin=*]

\item[{\includegraphics{Bluestar.eps} \value{enumi}}] \refstepcounter{enumi} first is blue 
\item[{\includegraphics{Redstar.eps} \value{enumi}}] \refstepcounter{enumi} second is red
\item[{\includegraphics{Greenstar.eps} \value{enumi}}] \refstepcounter{enumi} third is green
\end{enumerate}

but does not compile. Any ideas?

Thanks in advance,

Ilias

1 Answer 1

1

Here an option you can insert your images like this

\begin{enumerate}
\Item(first-image) first is blue 
\Item(second-image) second is red
\Item(third-image) third is green
\end{enumerate} 

The width of inserted images is 1cm, you can modify it within \labelenumi command which hold item label.

\documentclass{article}
\usepackage{graphicx}

\renewcommand{\labelenumi}{\includegraphics[width=1cm]\ima~\arabic{enumi}}
\def\Item(#1){\def\ima{#1}\item}

\begin{document}

\begin{enumerate}
\Item(example-image) first is blue 
\Item(example-image-a) second is red
\Item(example-image-b) third is green
\end{enumerate}

\end{document}

enter image description here

2
  • Thanks a log for the reply and the solution. Would work for me, unfortunately the images I want to put in my lists are not ordered by number so cannot be referenced as \ima~\arabic{enumi}. My present solution is to define a fully custom list, but I was after an easy implementation using the enumerate and enumitem packages. Sep 19, 2020 at 9:58
  • Name of image is stored in \ima command and used inside \labelenumi macro as argument of \includgraphics, ~ is added just to create space between image and numbering you can use also just \ .
    – Salim Bou
    Sep 19, 2020 at 11:39

You must log in to answer this question.

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