I would like to know if someone has a solution to the following problem:
I have recently start to create shortcut to certain operator to display directly the parenthesis around their arguments.
\providecommand{\ker}[1]{\operatorname{ker}\left ( #1 \right )}
for when I want to give the "ker" operator an argument and the command
\providecommand{\Ker}{\operatorname{ker}}
for when I only want to display the operator name.
I would like if there is a way to have those tow command in one such as
\providecommand{\ker}[1][...]{
ifthenelse{...=#1}{
\operatorname{ker}
}{
\operatorname{ker} \left ( #1 \right )
}
}
Where ... is the whitespace character \
I would like to avoid to use number in case I have to put them inside or some other characters that could be used to express a vector space.
Thanks to everyone who will take the time to read my question.
\providecommand{\ker}will do nothing at all, because\keris already defined in the kernel. – egreg Feb 29 '24 at 09:27