-4

I'm using these two packages

\usepackage{graphicx,pifont}% http://ctan.org/pkg/{graphicx,pifont}
\let\oldding\ding% Store old \ding in \oldding
\renewcommand{\ding}[2][1]{\scalebox{#1}{\oldding{#2}}}% Scale \oldding via optional argument

this line works well

\ding[0.5]{111}

However when I use in list items it breaks the code and I get an error

\begin{itemize}[label=\ding[0.5]{111}]
...
\end{itemize}
4
  • 6
    I’m voting to close this question because it belongs to the TEX SE
    – Sursula
    Commented Jun 19, 2023 at 8:35
  • Please don't post code fragments. Always make a [mre]. Commented Jun 19, 2023 at 8:38
  • sorry my badddd
    – zEn feeLo
    Commented Jun 21, 2023 at 9:07
  • I hope I didn't hurt the community hehe
    – zEn feeLo
    Commented Jun 21, 2023 at 9:07

1 Answer 1

0

Wrap your command in {...} if you want to use it inside of an optional argument:

\documentclass{article}

\usepackage{graphicx,pifont}% http://ctan.org/pkg/{graphicx,pifont}
\let\oldding\ding% Store old \ding in \oldding
\renewcommand{\ding}[2][1]{\scalebox{#1}{\oldding{#2}}}% Scale \oldding via optional argument

\usepackage{enumitem}

\begin{document}

\ding[0.5]{111}

\begin{itemize}[label={\ding[0.5]{111}}]
\item ttt
\end{itemize}


\end{document}
0

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