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

  • You can only change the font it seems, not the font size. – Werner Jun 16 '16 at 21:23
  • Well that's disappointing... – CephBirk Jun 17 '16 at 1:31
  • I'd suggest getting involved: "If you have a cool idea for a new feature, or comments in general about LyX, please share them with us. The more feedback we get from the users, the better we know what we should prioritize in the development effort." – Werner Jun 17 '16 at 17:12

Write the following in the document's local layout:

InsetLayout ERT
    Color               latex
    Family              typewriter
    Size                Small

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.