Fixed pre block parsing and added more escaping to tex input