I have a linked question that I previously found on here, but I cannot make any comment yet to post. The link being: Good way to make \textcircled numbers?
My question was how could we use this command more then once in our TeX file in different parts of our file without generating an error.
Example Code:
\documentclass{article}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
\begin{document}
Numbers aligned with the text: \circled{1} \circled{2} \circled{3} end.
\end{document}
The error message is this:
! LaTeX Error: Command \circled already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
1.222 ...circle,draw,inner sep=2pt] (char) {#1};}}
When removing the \newcommand* it shows this next error message:
! You can't use 'macro parameter character #' in restricted horizontal mode.
<argument> ...ircle,draw,inner sep=2pt] (char {##
1}
Can someone help out please. Thank You so much.
\circledmultiple times, instead of using it. Make sure that you only have one\newcommandand that it isn't inside a macro you use. – Martin Scharrer♦ Apr 8 '11 at 17:53`to format inline code or package names, like I did in my edit. We also prefer to not have any opening or closing lines. Thanks. – Martin Scharrer♦ Apr 8 '11 at 17:59\circled. – Willie Wong Apr 8 '11 at 18:15