[Tex/LaTex] Change font size of TeX code in LyX editor

fontsizelyx

I'm working on a manuscript in LyX and using knitr to incorporate R code. The problem is that my inline TeX code is unwieldy to look at in LyX. How can I make the font appear smaller in the editor?

I think this has been answered previously on StackOverflow (https://stackoverflow.com/questions/24028076/how-to-change-lyxs-default-font-for-latex-code/24037400#comment63186741_24037400) but I think it's out-of-date for LyX 2.1.4. I'm using a Mac if that makes a difference.

enter image description here

Best Answer

Write the following in the document's local layout:

InsetLayout ERT
  Font
    Color               latex
    Family              typewriter
    Size                Small
  EndFont
End

(Tiny is an acceptable value as well.) This is an application of the general answer found there: https://tex.stackexchange.com/a/281207/87201