Is it possible to check whether some macro's optional argument has its default value and generate different output based on this condition?
For instance, say I defined:
\documentclass{article}
\newcounter{item}[section]
\newcommand{\myitem}[1][the default]{\refstepcounter{item}Item{{~\theitem}}: This is #1.\newline}
\begin{document}
\section{Default Item}
\myitem
\section{Special Items}
\myitem[special case 1]
\myitem[special case 2]
\end{document}
How can I have the counter in double curly braces only be output if the argument is not its default value? Specifically, I would like to remove the counter only from the single item in the first section in this example.