Hacker News new | ask | show | jobs
by bee_rider 1432 days ago
There are some packages that slow LaTeX down, I think... Tikz is one I think.

My masters thesis was written on an old netbook with an Atom processor, plenty of graphics, the compile times got pretty ugly. But I did different files for each section, and set it up so the latex process would automatically kick off and run in the background after writing to the file in vim. Working within constraints like that is sort of fun, it forces you to get the slow operations off the critical path.

Currently I use a script like:

  inotifywait -e close_write,moved_to,create -m . |
  while read -r directory events filename; do
    if [ "$filename" = "$1" ]; then
      latexmk -interaction=nonstopmode -f -pdf $1 2> $1.errlog
    fi  
  done
to just re-compile the .tex whenever it changes. I'm not really a bash programmer though so I guess this will probably be ripped apart by somebody here, haha (the top couple lines were probably taken from some post on the internet somewhere).
1 comments

FWIW, `latexmk` has a "Watch the sources for this document and rebuild if they change" mode builtin. It gets activated if you pass it the command line flag `-pvc`.
Suggesting things on this site is such an easy way to get better solutions. Thanks!