Change latex printing for NaN (issue 3763)