Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to show syntax highlighting in the "Insert TeX code" boxes in LyX?

This would be very handy when one wants to input something longer using code.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

No, not at the moment.

According to the LyX bug tracker (http://www.lyx.org/trac/ticket/4343) this has been a longly requested feature and the LyX developers are still on it – with recent changes giving some hope that this might be available in a next major release.

For larger parts of ERT (evil red text = LyXism for inserted (La)TeX code) I generally employ an external editor and use Copy & Paste to move the code between LyX and my Editor. Instead of Copy & Paste one can also maintain the the TeX code in an external .tex file inserted with File > Insert > Child Document (Include Type = Input), which is useful during development or for maintaining larger parts of code.

share|improve this answer
    
Thank you. I have found I can use File > Insert > Child Document then set Include Type to Input and then use a .tex document with only the code I would have inserted in the ERT field -- that's another workaround. –  Rasmus Aug 20 '12 at 21:02
    
@Rasmus: Good point! I have edited it into the answer. –  Daniel Aug 21 '12 at 5:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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