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?
Asked
Active
Viewed 346 times
3
highsciguy
- 887
1 Answers
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
grep -A 1 "Undefined control sequence" filename.log– egreg Nov 08 '12 at 21:21occamrequires programs that only work in the original MacOS. It is no longer usable nowadays. – TeX Apprentice Dec 05 '21 at 14:48