yihui/highr — pull request #4 by lq (2014-10-23 02:58:01+00:00)
Title: Inline highlighting

Make `hi_latex()` workable without the alltt package. This make it possible to highlight inline code by writing `\texttt{\Sexpr{hilight("some code")}}`.

The resulted .tex file become even less readable, but users are not expected to look into it anyway.

Now the user, specifically the knitr package, is not required to enclose the output with the alltt environment, so it is more flexible. However, to make some characters, say `_`, appear nice, one would better include `usepackage[T1]{fontenc}`, which is useful in general, and should be used in every LaTeX document in my opinion.