Maybe I can add a new compile action to texfindpkg, so that with
texfindpkg compile -options somefile.tex
texfindpkg extracts the preamble of somefile.tex, then detects and installs missing packages with it before compiling the whole document. Obviously texfindpkg should remember the preamble, so as to ignore the detection when the preamble is unchanged.
There are two ways to detect missing packages: (1) searching \usepackage and other similar commands; (2) compiling the preamble (with empty document body) first and checking the log file. Not sure which one is better.
Maybe I can add a new
compileaction totexfindpkg, so that withtexfindpkgextracts the preamble ofsomefile.tex, then detects and installs missing packages with it before compiling the whole document. Obviouslytexfindpkgshould remember the preamble, so as to ignore the detection when the preamble is unchanged.There are two ways to detect missing packages: (1) searching
\usepackageand other similar commands; (2) compiling the preamble (with empty document body) first and checking the log file. Not sure which one is better.