Added option to supply custom latex command.