I have a fairly basic questions (I guess), but can't find a clear answer.
I have an existing command \ox{#1,#2}
from a package (chemmacros) which has two arguments which are separated by commas. I want to change the command (i.e. \renewcommand
), but I don't know how to handle the comma-separated arguments.
By basic idea would be:
\renewcommand{\ox}[2]{#1($\mathrm{#2}$)}
But this doesn't work.
Does anyone have a suggestion how to separate the arguments?
\def
, e.g.\makeatletter\def\ox#1{\@ox[#1]}\def\@ox[#1,#2]{#1($\mathrm{#2}$)}\makeatother
. Note that this doesn't work if your argument contains[
or]
-- in this case you would have to specify other delimiters.