我正在使用 enumitem 套件來自訂我的清單。這很好用,但是我想以簡單的方式將圖像和計數器組合到每個項目。我嘗試過的:
\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}
但不編譯。有任何想法嗎?
先謝,
伊利亞斯
答案1
這裡有一個選項,您可以像這樣插入圖像
\begin{enumerate}
\Item(first-image) first is blue
\Item(second-image) second is red
\Item(third-image) third is green
\end{enumerate}
插入圖像的寬度為,您可以在包含項目標籤的命令1cm
中修改它。\labelenumi
\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}