"Extract" generates a new file containing only the contents of specific environments and commands. I have begun exploring it in the hopes of extracting the footnotes of my father's book, in order to make a unified bibliography of all the citations. I discovered while proofreading the various citations that there were errors in them — they all date from decades before the Internet, and there is no efficient way to check them without combining them into a single list first. But by hand that would be a lot of tiresome work.
Below is the bare-bones description of the package from the full documentation:
The following provides an example of the user interface of the package.
\usepackage[
active,
generate=file,
extract-env={figure,table}
]{extract}
If the active option is not specified (or set to false), the package does nothing and active no files are generated. If the option is specified, the package will redefine the environments figure and table so that they write their bodies (the content of the environment) to the file indicated with the generate option, here
file.tex
, including the\begin{figure}
and\end{figure}
commands.… This package can also extract commands. It supplies two methods to do this. See the extract-cmd example below.
\usepackage[
active,
generate=file,
extract-cmd=section,
extract-cmdline=label
]{extract}
The first method (accessed with the
extract-cmd
option) is based on the particular syntax of the command and hence only supports particular commands. It will read it arguments and write them, together with the original command, to the target file. … The second method (accessed with theextract-cmdline
option) will redefine commands to write themselves and all the text following on the same line to the target file and will also execute the entire line as with an ordinary LaTeX run. This allows to redefine any command that is not supported by the first method, but should be applied with care.
See http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/extract.html (accessed 20121028) for more information.