File size: 677 Bytes
c09a3f4
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash
# Render paper/figs/NAME.tex standalone to paper/figs/out/NAME.pdf and NAME.png (low priority).
# Runs from paper/ so that data/*.dat, macros.tex and the PlotNeuralNet .sty files resolve as in the paper.
set -euo pipefail
cd "$(dirname "$0")/../paper"; mkdir -p figs/out
for f in "$@"; do
  nice -n 19 pdflatex -interaction=nonstopmode -halt-on-error -output-directory figs/out -jobname="$f" \
    "\def\figfile{figs/$f.tex}\input{figs/standalone.tex}" > figs/out/$f.log 2>&1 || { grep -A5 "^!" figs/out/$f.log | head -20; exit 1; }
  rm -f figs/out/$f.aux
  nice -n 19 pdftoppm -r 220 -png -singlefile figs/out/$f.pdf figs/out/$f
  echo "rendered $f"
done