LaTeX/Sweave related utility functions