I've searched for but not found an answer to this.
I am using two layers of \newcommand
s to create symbols inline with text, using \includegraphics
. (It's for music symbols.)
At present, I have this as the generic command:
\newcommand*{\inlineImage}[2]{\raisebox{#1pt}{\fbox{\includegraphics{__#2__}}}}
And then many commands of the form:
\newcommand*{\Eighth}{\inlineImage{0}{Eighth}}
\newcommand*{\Sixteenth}{\inlineImage{-1.5}{Sixteenth}}
This works, but it is cumbersome to type the same text twice during set up. Of course, I could employ a command with arguments in my document body, but I don't want to do that. Is there a way to replace the specific commands with something of the form:
\newcommand*{\Sixteenth}{\inlineImage{-1.5}{<thecommandname>}}
\def\newnote#1{\edef\csname #1\endcsname\inlineImage{-1.5}{#1}}