03 September, 2006
Why I love the CLI
I'm printing, binding and submitting my thesis tomorrow, so I've been making eleventh hour (make that forty-five minutes past the eleventh hour) changes. This has involved making cross-references explicit. No problem in LaTeX, of course, but when you have a tonne of labels, remembering the name you gave to a particular one can be tricky, and if you go and look for it, you have to search for where you were editing once you've found it.
So, in an xterm, I've been running this command:
watch "cat *.tex|grep -o \\label\{[^}]*\} |grep \{.*\} -o |sort|grep -v tab:|grep -v fig:|column "
Now I have a nice list of labels I can reference, updated every 2 seconds.
Even better, running it in yakuake means I can press F12 to toggle a drop-down list of labels without tabbing in and out of Emacs.
Another thing that's handy is my "spell" makefile directive, which checks all LaTeX files in the current directory:
ind . -maxdepth 1 -name "*.tex" -exec aspell check --key-mapping=ispell --mode=tex --don't-backup --sug-mode=slow '{}' ';'
I've never made the effort to learn aspell key bindings, so I always ask it to behave like ispell.
And for the people that scoff and mumble about how they don't have to do this in Windows: it's because you can't do this in Windows.