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.

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?

share|improve this question
3  
"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. –  Martin Scharrer Sep 18 '11 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. –  Herbert Sep 18 '11 at 19:02
2  
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 Sep 19 '11 at 3:49
1  
@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. –  ShreevatsaR Dec 2 '11 at 11:54
add comment

2 Answers

up vote 24 down vote accepted

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.

share|improve this answer
add comment

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.
share|improve this answer
    
+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. –  texenthusiast Apr 16 '13 at 17:25
add comment

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.