fixed latex conversion