fix case statement in TeX output