Can LyX be used as an IDE for LaTeX? I am considering using LyX instead of Emacs to write my LaTeX papers. Emacs is powerful editor/IDE which helps me be more productive while writing LaTeX. LyX looks like more than an IDE, because it uses its own file format. Is LyX is a good option if the end result must be a LaTeX code?

  • 5
    "LyX looks like more than IDE, because it uses its own file format." That's not a way to define an IDE. I mean, which C++ IDE does use it's own file format for the C++ files? Sure, every IDE saves a project file or similar, but with LyX the .lyx is the complete document. Commented Sep 18, 2011 at 18:49
  • 1
    you cannot compare a simple text editor for C++ with LyX which itself tries to display the LaTeX source in WYSIWIG.
    – user2478
    Commented Sep 18, 2011 at 19:02
  • 3
    My own experience with trying to replace Emacs with LyX: if you are comfortable writing LaTeX in Emacs/AucTeX, don't switch to LyX.
    – Truong
    Commented Sep 19, 2011 at 3:49
  • 4
    @MartinScharrer: Isn't that the point? The OP is saying that just as IDEs for programming languages don't use their format for their files, so also (hypothetical) LaTeX IDEs would not use their own format, and hence something that's using its own format is (probably) more than just an IDE. It's doing something more/different, which LyX indeed is -- as you said, the .lyx is a complete document, and LyX is indeed not a LaTeX IDE. The conclusion is correct. Commented Dec 2, 2011 at 11:54

2 Answers 2


No, LyX should not be considered as an IDE for LaTeX, even though it uses LaTeX as backend.

The point here is that while every LyX document can be exported to LaTeX, not every LaTeX document can be imported into LyX (even though simple stuff works pretty well). This means, if collaborating on a paper, all or no authors have to use LyX.

I personally use and prefer LyX for writing papers and larger documents, but fall back to plain LaTeX if one of my collaborators does not want to use LyX.


Here is a more detailed answer...

Is LyX an IDE for LaTeX?

"IDE" stands for Integrated Development Environment. That is a software application which is usually used for writing and developing new programs in a certain programming language. An IDE integrates several components into one big entity. The basic requirements are to provide:

  1. a source code editor for a specific programming language;
  2. a configurable mechanism to build the output (e.g., an executable program) from the source code automatically;

Here the programming language corresponds to a language for typesetting documents: LaTeX.

  1. In LyX one cannot edit LaTeX code at an arbitrary position, see LyX FAQ. LyX generates a few different output formats (LaTeX, HTML, OpenDocument) from a LyX document. Thus, it is not a LaTeX editor.
  2. LyX automatically generates the output (e.g., a PDF file) also including bibliography, indices, etc. It is possible to influence this process. Thus, LyX satisfies the second requirement.

Overall, LyX cannot be considered as an IDE for LaTeX, although it acts in parts similarly to an IDE.

Is LyX a good option if the end result must be LaTeX code?

Comparison of LaTeX, LyX, PDF: table with math formula above picture

This picture shows a LaTeX document, its LyX equivalent, and the final PDF. LyX comes close to the PDF!

Features of LyX: LyX has a reasonably good support of LaTeX from classes ("article", "book", "letter") to commands (\textbf{...}, \medskip, \ref{...}) and environments ("itemize", "minipage"). Furthermore, LyX has a good table editor, with which one can rapidly create, edit, format tables - no knowledge of the tabular or longtable environments is needed. For math formulas, typing the LaTeX code directly or using a graphical math editor are possible. Formulas can be displayed either similar to the print-out or exactly using instant preview. Furthermore, re-structuring a document is easy: changing the nesting levels, and re-ordering paragraphs, subsections, sections, items of lists can be done with just a few key strokes (no copying and pasting needed).

Not possible in LyX: As mentioned LyX does not offer to edit the LaTeX code at an arbitrary position! Though injection of TeX code at some points is possible. Hence, one somehow depends on the options that are supplied by LyX and its loadable modules.

A general recommendation: If you have some time, learn the basics of LaTeX before learning LyX. That is, how to write and compile a simple document with some figures and tables, e.g., see first LaTeX doc or Best Way to Start Using LaTeX or Best Book to Start Learning LaTeX. Then you will get a glimpse of what LyX does behind the scenes, and you can turn to LyX. (Note that LyX - generating LaTeX - is quite different from other document processors like Microsoft Word or LibreOffice Writer.)

In my opinion,

  1. LyX can be a good option in terms of productivity and time (by visually editing tables, formulas, etc.).
  2. Not all used LaTeX packages might be supported but support can be added. Nevertheless, if too many of them are missing or one wants to do heavy LaTeX customizations then it might be better to start off with a LaTeX document directly.
  3. Finally, if you started writing a LyX document and later need many LaTeX customizations, you can still switch from LyX to LaTeX by exporting the document and continuing writing in LaTeX. The other way around, start a LaTeX document and importing it to LyX might not be so seamless yet.
  • 1
    +1 As long as we get more friends into latex'ing, Lyx is a very good tool for non-programmers and lowers the barrier. over time change though to emacs and vi category. Commented Apr 16, 2013 at 17:25
  • 8
    @texenthusiast: I have the exact opposite opinion, and sense that e-birk is hinting at the same stand as well. I first became comfortable with LaTeX, and then wholeheartedly switched to LyX. Why? In the middle of writing a complicated mathematical proof, the last thing I want to be bothered by is writing LaTeX markup. Sure, it gets simpler over time, but never to the point of being cognitively undemanding. Also, when I re-read the paragraph I just wrote, I want to read what I wrote, not markup. And I'm someone who's not too shabby at writing code myself. But I'm the oddball even in my own lab.
    – Anonymous
    Commented Jun 18, 2014 at 23:38
  • LaTeX and TeX's "cognitive demands" are one of its best features.
    – A Feldman
    Commented Jan 18, 2018 at 17:28
  • @AFeldman I'm interested to hear more about why you think "cognitive demands" are a good thing. I have the same feeling myself, but have been unable to coherently express why.
    – Thev
    Commented Oct 7, 2018 at 19:45
  • 1
    @AFeldman Well put! I was thinking about the "cognitive demands" of LaTeX after seeing this new font - Sans Forgetica - which is built on the concept of 'desirable difficulty'. Was wondering whether I should open a question on this site about whether people consider LaTeX to be desirably difficult.
    – Thev
    Commented Oct 19, 2018 at 10:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .