Saturday, 24 August 2013

Command which uses brackets automatically when applied to more symbols

Command which uses brackets automatically when applied to more symbols References How can I define a command like *, similar to \\newcommand{\\astcommand}[1]{{#1}^*} but which, when applied to a single symbol a, gives the output a*, and when applied to multiple symbols, like abc, automatically adds brackets to the output, like (abc)*? I mean, without having to call it with brackets, as in \\astcommand{(abc)} just \\astcommand{abc}

No comments:

Post a Comment