Fix flag transition.
Allow overriding location of latex binaries.