Fix getting latex documentclass.