With pifont, the darkened circled number starts from 182.

enter image description here

I made a macro that maps \dcircle{1} to \ding{182} as follows.

\newcommand{\dcircle}[1]{\ding{181 + #1}}

However, \dcircle{1} returns the characters that I don't expect:

enter image description here

What might be wrong?


You have to evaluate the numeric expression; \numexpr provides this:

enter image description here

\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\dcircle}[1]{\ding{\numexpr181 + #1}}

\ding{182}\ \dcircle{1}

Note that this performs no end-of-sequence checking.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.