If I have a macro that works like this, inside the braces:
{\SomeMacro applies to this text}
I can easily do this:
\newcommand\MySomeMacro[1]{{\SomeMacro #1}}
Then the new command goes outside the braces:
\MySomeMacro{applies to this text}
I can also use \let
to re-define the original macro, via an intermediary.
My question: Can it be done the other way around? That is, if I already have a macro that is used outside the braces, can I re-define it (or create a new macro) that does the same thing, but inside the braces?
I am using LuaTeX on TeXlive 2016, but surely this is a rather basic question, applicable to anything. Also, in my particular case, the argument of the macro is very simple, usually plain text.
Why I would like to do this: I am working with a document, in which most of the user commands go inside the braces. For consistency in writing, I would like to define my own commands so that they work the same way. Re-defining the original commands, so that they go outside the braces, might confuse someone who is editing my document.
\bfseries
do not pick up an argument from a surrounding group they are a state change just acting at the point of the command. To take a command that has an argument like\section{abc}
and change its syntax so{zzzz \newsection abc}
works (but\begin{figure} zzzz \newsection abc\end{figure}
gives a parse error) obscures the underlying operation of the command.