Improvements to the tex snippets by rene vergara.