How do you use TikZ efficiently in Lyx? I understand I have to go to Insert->Tex code, which opens a box where I can type actual Tex code. But it's really difficult, there is no indentation, everything I type is in one color only. (Note: I'm using Lyx on Mac) Is there any easier way to do this?

  • 1
    why no indentation? Tab does not work for you? If you're referring to pasting, make sure you do Edit > Paste Special > Plain Text – scottkosty Nov 6 '15 at 2:10

Write your tikzpicture in a separate plain text file, then include it in your LyX document, using the menu item Insert | File | Child Document.

You have to make sure that you use the Include type: Input here.

enter image description here

  • Isn't there a tikz GUI editor on Lyx?. Working directly, without importing is very important, specially when dealing with diagrams, you may need to connect some parts of your already made content. – skan Nov 14 '17 at 12:20

You could use a Latex editor and copy paste the code once you're done. Or use a Latex editor, save file and import it to lyx. lyx is supposed to be a text editor, somewhat like MS word, and indeed using ERT is not fun.

btw, you can use ctrl+L to open the ERT box

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.