fix issue when parsing beamer using '-t latex'