Remove blank line in the output

Unwanted blank lines may appear bewteen items or before \end{enumerate}. We
fix this.