3

I have a long tex file which uses many newcommands/providecommands sourced in from a separate file using \input{}. To upload to a preprint server I would like to keep only those commands which are really needed. Therefore I wonder how to generate a list of newcommands names to extract from the input file. Assuming all of these are defined as single lines it would be quite easy to extract them. My first approach was to comment the \input-statement to get a list Undefined control sequence errors and to generate the list from it. However the latex output is a little difficult to parse. Is there a switch to latex which allows me to extract a useful list more easily or some different approach?

1 Answers1

1

The package cmdtrack can be useful. Of course you can use the Terminal to search the log-file:

grep -ni -A 1 "Undefined control sequence" <filename>.log
Marco Daniel
  • 95,681