check for latex mode metadata and use