fix tex template and formatting - better spacing