Correct the ref snippet and add package snippet for LaTeX

I corrected the error reported on bug #1170868