How to remove a specific latex command from the text AND closing bracket behind it, but to keep the text inside the brackets? The command in the following example to remove is \edit{<some staff>}
. \edit{
and }
should be removed, whereas <some staff>
should be left unchanged.
Please fill free to suggest SED, or AWK, or Perl or whatever will do the job
senseless example:
We \edit{Introduce a} model for analyzing \emph{data} from various
experimental designs, \edit{such as paired or \url{http://www/}
longitudinal; as was done 1984 by NN \cite{mycitation} and by NNN
\cite{mycitation2}}.
Note that there might be one or more latex commands in the form \command{smth}
inside \edit{}
statements. \command{smth}
should be left as it was
Output:
We Introduce a model for analyzing \emph{data} from various
experimental designs, such as paired or \url{http://www/}
longitudinal; as was done 1984 by NN \cite{mycitation} and by NNN
\cite{mycitation2}.
PS. I am introducing a lot of small edits into my tex file. I want those edits to be highlighted, so my collaborator can see them. But afterwards I would like to remove all highlights and to send the text to a reviewer.
The question was originally asked at AWK/SED Remove a specific latex command from the text AND closing bracket behind it. But example there was too soft
\edit{
then look for the first}
, which is not preceded by the{
. But I definitively have no idea how to implement this