2

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?

  • Have you considered posting this question on the SO site for R? – lawyeR Dec 10 '15 at 22:41
  • @lawyeR what site is that? – Tyler Dec 11 '15 at 16:32
  • What exactly do you want for your inline code? Using the same font and background as the code chunks, or do you want the syntax highlighting too? – Tyler Dec 11 '15 at 16:33
  • @Tyler. I realize I have bookmarked stackoverflow.com/questions/tagged/r and think of that as a site. – lawyeR Dec 11 '15 at 16:50
  • @Tyler Syntax highlighting would be more informative for readers, if that is possible. Tx – lawyeR Dec 11 '15 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.