What is the difference between LyX and LaTeX?
I always recommend that you learn the basics of LaTeX before you learn LyX. LyX will not save you from learning LaTeX so you might as well learn it well from the start. After you really understand what LyX is doing (through LaTeX), you might find you like it better than using LaTeX directly. This is the case for me. This is also why I don't think LyX is a software for newbies. I think it should be used by intermediate/advanced LaTeX users who understand what they're delegating to LyX and how to step in to take control when they want to. But many people disagree with me on that.
My main point: I don't think you should try to learn LyX instead of learning LaTeX. That would be a mistake in my opinion.
Q: What is the difference between LyX and LaTeX?
A: From the LyX website:
LyX is a document processor that encourages an approach to writing based on the structure of your documents (WYSIWYM) and not simply their appearance (WYSIWYG).
LyX combines the power and flexibility of TeX/LaTeX with the ease of use of a graphical interface. This results in world-class support for creation of mathematical content (via a fully integrated equation editor) and structured documents like academic articles, theses, and books. In addition, staples of scientific authoring such as reference list and index creation come standard. But you can also use LyX to create a letter or a novel or a theatre play or film script. A broad array of ready, well-designed document layouts are built in.
LyX is a document processor which merely acts as an interface to LaTeX. While it does strip the user from many LaTeX-related handles, it has its drawbacks, many of which can be solved via ERT-specific injections. That is, you insert LaTeX code where it's needed.
Q: Is there any difference between the PDF generated by LyX and LaTeX?
A: There shouldn't be, since LyX can be installed to use drivers from an existing TeX setup.
Q: Which one should I use between LyX and LaTeX?
A: Depends on your preference and experience. I would go with LaTeX since I'm okay with seeing code rather than the LyX display.
Here is, I think, a fairly objective distinction between using LyX and editing LaTeX directly:
- LyX is very good at exporting to LaTeX. If you create a document in LyX with sections and theorems and equations then the PDF you create will be just as if you wrote it in LaTeX, because that's exactly what LyX did for you.
- LyX is extremely bad at importing from LaTeX. Unlike what Herbet said, you cannot just edit any old LaTeX document with LyX and expect good results. So if you want to collaborate with an author that does not use LyX, or wish to edit a document and not spend the one-time cost of tidying up the result of an import, then LyX is not suitable.
I'm sure you'll have no shortage of people sharing their subjective opinions of LyX, but I'll add in mine:
- I agree with scottkosty that using LyX will not avoid having to learn LaTeX. You will end up needing to understand what LyX is doing under the covers. But, IMHO, this effort is worth it for the time saved in creating/editing the content of documents.
- However, writing and editing a document with LyX is MUCH quicker than editing LaTeX, even if you know what you're doing, for several reasons:
- There is so much visual clutter (\begin{theorem}, \emph etc) that you can focus on the content.
- Editing equations visually is much easier, especially with lots of super/subscripts. In LaTeX these less important elements dominate the equation's code. I find people deal with this by constantly LaTeXing their document and examining the PDF, which is a huge waste of time compared to editing the equation directly.
- You do not constantly need to run LaTeX to check that you have not missed a closing brace etc. Again, many LaTeX users (even those that claim they don't!) typeset their document very frequently to catch these quickly; I often spend days or even weeks editing a LyX document without typesetting to PDF.