An Idiosyncratic Review of LyX

I tried LyX some years ago but I didn’t really ‘get’ the program, it just seemed like a needlessly complex word processor, and it wasn’t WYSIWYG. But since that time I have been using ConnectedText which definateley isn’t WYSIWYG and have gradually become accustomed to working in different modes. I was reminded of LyX recently and so have given it another go.

LyX is a free and open source document processor running on Windows, Mac OS X and Linux/Unix. Its proponents call it a ‘document processor’ rather than a ‘word processor’ because unlike a standard word processor, LyX encourages an approach to writing based on the content and structure of the document, not it’s appearance.The writers of LyX have adopted the term WYSIWYM to describe the approach.

It is a graphical front end for a LaTeX typesetting engine (MiKTeX) so the final output can be quite good if you manage to get a font you like.

Using LyX you are expected to concentrate on writing, leaving the typesetting to the software. This is a similar approach to using styles in a conventional word processor but instead of styles being optional they are mandatory, you may override them if you wish but that takes extra effort.

LyX is a bit overkill for short notes or letters. But for long and complex documents LyX can save a lot of time and effort. There are many pre defined document templates which make it easier to make a document which conforms to a particular set of requirements. For instance there are templates for writing articles in the format required by academic journals, there is a book template, there is another template for writing a film/play script.

LyX automates the formatting according to a predefined set of rules, this gives consistency throughout the document. For example, you can have all your headings in the size and font you want but when you make this change it will affect all the headings, you don’t have to go through your document changing them all individually.

LyX has a concept called ‘environments’. These are just like styles in a conventional word processor. Each piece of text in your document has to be put in the correct environment, if no environment is set then it will be in the default body text environment of ‘Standard’. No text exists without being in an environment. The environment sets the font, the size, the indent and everything else about the text is defined by its environment. There are environments for headings, subheadings, sub-subheadings, bulleted lists, numbered lists, tables, bibliographies, footnotes, references, etc..

There is also some intelligent automation, by default all headings (at whatever level) get placed in a table of contents, if you want a table of contents then you need do nothing, but if you don’t want a table of contents then you can delete it. References are also intelligent, if you refer in your text to ‘figure 1 on page 7’ and then you add more figures and text before the target of the reference it automatically changes the number to refer to the same figure on whatever page it ends up on.

One thing which I thought was quite neat, usually the reference would be something like ‘refer to Section 3.7 on page xx‘ where xx is the page number but if the target is within one page of the reference then it changes to ‘refer to Section 3.7 on the previous page’ or ‘refer to Section 3.7 on the next page’.

The types of environment available is different for different document types.

And of course you can insert tables, graphics, bitmap images and even SVG files which are good for drawing diagrams in Inkscape but which Microsoft Word has great difficulty with. There is an excellent equation editor. The equations have a particular LaTeX styling which sets them apart from the main text, but that is not a bad thing. The equations can be numbered to make it easier to refer to them from the text.

When you install LyX you get a lot of other programs installed as well, Ghostscript, Perl, Awk and MiKTeX amongst others. MiKTeX is an open source implementation of LaTeX, this is the program which produces the output. With the default settings the output produced looks exactly like all the Linux DocBook documentation files along with that thin ugly anaemic looking font they use.

Fonts are a problem, LyX uses postscript type 1 fonts, you can use true type fonts in your documents but you then limit the options for the rendering of your document. If you use the postscript fonts then there are only a few supplied with LyX, most of them are not very pleasing to the eye, there are a couple which are OK but the default serif font is perhaps the worst of the lot.

This is very frustrating for me because I have many postscript type 1 fonts available but installing these in MiKTeX is a hideously complex task and so far I have been unsuccessful. The task of installing a font should not be that difficult, it should at least be documented somewhere.

LyX Badfont

An example of the hideous postscript font used by default if you don’t choose another, but the choice is very limited.

At first sight LyX looks like a conventional word processor, it is not until you start typing that you realise how different it really is, you have no control of spacing. Hitting return many times inserts one carriage return, hitting space many times inserts one space, hitting TAB does nothing. All the content is typeset and rendered by LyX, you don’t have to think about the spacing and the layout. Someone who only has experience of Microsoft Word will find this disconcerting at first.

LyX Main Screen

LyX main screen with the manual opened for editing.

You can control all the aspects of the layout, the spacing between paragraphs, the margins and all the rest but you do it for the whole document. You have to get used to working at a higher level of abstraction.

LyX has no problem with handling very large documents. The table of contents which is continuously updated can be viewed as a panel at the side of the text. This acts as an excellent outline, you can jump to whatever section or subsection you want just by clicking on it and sections can also be moved about, promoted and demoted just like in an outlining program.

In some ways the separation of edit mode from output mode can be more convenient than a conventional word processor. You can enlarge the screen fonts to suit your needs but the text wraps so it is all still on the screen, but this does not affect the formatting of the final output.

There are many manuals supplied with LyX, all in LyX format. They are a very comprehensive reference for LyX. They can be printed out to PDF format to read and if you use the default settings with postscript fonts everything will work as expected, however if you typeset them with true type fonts sometimes they will cause errors or crash the program when you try to export them.

LyX has very limited import facilities, it can import LaTeX or plain ASCII text from the clipboard or from a file, it can also import various spreadsheet files or a CSV file into a table. It also lists LyX files as an import option but to me importing files in the format of the program is not an import, I think what they mean is inserting one LyX file into another.

The export facilities are a little more extensive, you can send the output to DVI, EPS, HTML, LaTeX, Open Document Format, PDF (various flavours), plain text, postscript and even to a printer.

Will LyX become my main word processor?

Probably not.

For short documents, notes and organisational stuff I use ConnectedText. For longer documents Scrivener is hard to beat. But LyX is free and Scrivener costs $40.  I can see that LyX could be very useful if I were writing something like a book or a doctoral thesis and I didn’t want to spend any money.

LyX is a very powerful and quirky program but it still has some rough edges.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s