Back when I was using sweave, I could make my inline code look like R code by using \texttt{whatever} or \verb@whatever@. I am trying out knitr, and the format of the code chunks sure is pretty. But how do I get the format of the inline code to match the code chunks? Mostly I want to say things like
The \someformattingcommand{lm} function fits linear regression models $y = X'\beta+\epsilon$
What is that formatting command?
\texttt{}I think. I've looked around and I don't know if you can get the syntax highlighting outside of a code block (which is provided via thelistingspackage).tcolorboxallows you to change the background color inline, that might help: http://tex.stackexchange.com/questions/136742/changing-background-color-of-text-in-latex?rq=1 – Tyler Dec 11 '15 at 22:42