diff --git a/README.md b/README.md new file mode 100644 index 0000000..dc73395 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ + +## Writing + +[Erick's notes on writing](https://github.com/matsengrp/wiki/wiki/writing_with_erick) + + +## Compilation + +Type `scons --sconstruct SConstruct-noinkscape` in the command line if you don't have Inkscape all set up to work on the command line. +If you do, `scons` should work. +Use `scons continuous` to have continuous building after installing inotify. + diff --git a/SConstruct-noinkscape b/SConstruct-noinkscape new file mode 100644 index 0000000..5f5999d --- /dev/null +++ b/SConstruct-noinkscape @@ -0,0 +1,27 @@ +import glob +import os + +VariantDir('_build', src_dir='.') + +env = Environment(ENV=os.environ) +inkscape = Builder(action = 'inkscape --without-gui --export-pdf=$TARGET $SOURCE') +env['BUILDERS']['Inkscape'] = inkscape +env['BUILDERS']['Latexdiff'] = Builder(action = 'latexdiff $SOURCES > $TARGET') +env['BUILDERS']['Copier'] = Builder(action = Copy('$TARGET', '$SOURCE')) + +pdfs = [env.Copier(target = '_build/' + os.path.basename(pdf), source = pdf) + for pdf in glob.glob('figures/*.pdf')] + +main=env.PDF(target='_build/main.pdf',source='main.tex') + +Depends(Flatten([main]), + Flatten([pdfs, 'main.bib'])) + +cont_build = env.Command('.continuous', ['main.bib', 'main.tex'], + 'while :; do inotifywait -e modify $SOURCES; scons -Q; done') +Alias('continuous', cont_build) + +Default(main) + +env.Latexdiff(target='diff.tex',source=['versions/main.v1.tex','main.tex']) +diff = env.PDF(target='diff.pdf',source='diff.tex')