pyspecdata.latexscripts

Provides the pdflatex_notebook_wrapper shell/dos command, which you run instead of your normal Latex command to build a lab notebook. The results of python environments are cached and only re-run if the code changes, even if the python environments are moved around. This makes the compilation of a Latex lab notebook extremely efficient.

Functions

cache_output_if_needed(scriptnum_as_str, …) if needed, run the python script numbered by scriptnum_as_str that hashes to hashstring, and output the result to the cache ONLY
cached_filename(hashstring[, returndir]) this sets the format for where the cached file is stored we use the first two characters as directory names (so there are just 16 of them
check_image_path()
det_new_pdf_name(thisargv) based on an original tex or pdf name, determine the original basename (i.e., no extension), as well as one with the final word after the underscore removed
flush_script(number)
genconfig() creates a template configuration directory
get_scripts_dir()
grab_script_string(scriptnum_as_str)
main() This looks for scripts/scriptsUsed.csv inside the notebook directory, and checks whether or not it should be run if a command line argument of “flush” is passed, it flushes that script number from the cache
script_filename(scriptnum_as_str)
sha_string(script) convert the sha hash to a string
wraplatex() runs the python scripts after running latex also creates a copy of latex without the final portion under the underscore This prevents the viewer from hanging while it’s waiting for a refresh.
wrapviewer() see wraplatex