RSS

 
WinEdt Macro Library  | LaTEX previous macro  | next macro

uncommand  

-- compatible with WinEdt version(s) 6, 5.4-5.6 --

Description

This macro expands all custom LaTEX commands in your file.

Sometimes, it may be necessary to remove your custom commands, e.g., if you want to submit your TEX source to journals that don't allow custom commands. This macro will

  • gather all commands defined with \newcommand in the preamble and
  • replace them in the current file.
  • It can also retain the knowledge about the original commands, so that it is even possible to change a command definition later on, or to restore the original commands.

Examples: If you have

\newcommand{\A}{\mathcal{A}}

in the document's preamble, all \A strings will be replaced by \mathcal{A}. Likewise, for

\newcommand{\abs}[1]{\left\vert #1\right\vert}

all \abs strings will be replaced by \left\vert #1\right\vert, where #1 is the respective argument to \abs.

Please read the documentation in the file for further instructions.

Installation

Put the macro in %b\Macros\LaTeX\, and assign a shortcut to it if you want.

Download

LaTeX/uncommand.edt

Macro contributed by Robert <w.m.lgmx.net>

WinEdt Macro Library  | LaTEX previous macro  | next macro