Scripts for extracting figures / captions from FASER papers and creating webpages from them
FASER LOI example:
The `process_faser_tex.py` script in the attachments extracts the figures and captions from FASER papers. To use this, download the script and run the following at the command prompt:
./process_faser_tex.py -i path/to/input.tex
with `path/to/input.tex` replaced with the actual name of the input file.
Running this creates an output directory called `script_results` (or specify the output directory name using the -o/--output option) containing the figures (e.g. fig_01.pdf) + captions (e.g. fig_01.txt).
One caveat is that any references in the captions need to be updated by hand (though the FASER-specific reference commands are still processed, e.g. `\figref{FigureReferenceName}` —> `Fig. (???)`).
To squelch the warnings about the image format (.pdf or .eps are recommended), run with the `-I`/`--ignoreImageRecommendations` option.
For a list of all available options, run with the `-h`/`--help` option.
Once the figures and tables are extracted into a directory using `process_faser_tex.py`, they are ready to be read into a webpage using `make_webpage.rb`.
Run the latter by entering the following at the command prompt:
./make_webpage.rb -i path/to/script_results
with `path/to/script_results` replaced with the actual name of the directory created by `process_faser_tex.py`.
This creates an output HTML file called `index.html` (or specify the output file name using the -o/--output option) that can then be opened from an internet browser.
One caveat is that the following elements need to be added to the script results directory by hand:
where `Title.txt` contains the title of the paper, `Date.txt` the publication date, etc.
A future version of `process_faser_tex.py` will add these automatically to the output directory it creates so that these will no longer need to be added manually.
Contact Aaron if you encounter any issues.
--
JamieBoyd - 2020-01-09