Go to the Main Scientific Document Preparation Webpage

LYX

What is LyX?

LyX is an excellent tool for writing scientific papers. LyX is an almost-WYSIWYG editor which serves as a front-end for LaTeX. To put it simply, you create your paper in LyX much as you would in Word. LyX, however, will automatically create the LaTeX code for you, based on your input. It allows you to embed and visually format pictures (including but not limited to png, bmp, jpg, and eps (encapsulated PostScript) figures) in your document.

LyX gives you all the advantages of LaTeX without the drawbacks. You do not need to know LaTeX at all since LyX can generate the LaTeX code automatically (although knowledge of LaTeX can allow you to type your document faster in some cases). You do not need to spend time debugging LaTeX code. The learning curve for LyX is similar to that of Word. You can insert advanced LaTeX code by hand in the LyX editor if desired, and LyX will show you what the output would look like.

Where is it?

LyX is available for free from www.lyx.org. Although originally wirtten for Unix-like platforms (such as Linux), it is available for a number of platforms including IBM OS/2, Macintosh OSX, and Windows. The LyX download page contains links to information about installation on various platforms.

Making PDF Files with LyX

If you want to use LyX to make PDF documents, there are a couple of tricks you will want to know. First, you should look at the PDF in Linux and/or PDF in Windows pages.

The current version of LyX (1.2.3) can use pdflatex to write a PDF file directly. You can do this by going to the File menu, clicking on Export, and selecting PDF.

LyX uses font settings which, by default, will put Type 3 fonts into PDF files. The problem is that LyX uses font encoding which is designed for maximum compatibility with international languages. Even if you have Type 1 versions of the Computer Modern fonts, you can't use them by default because LyX normally points to the international set of fonts. Linux distributions don't (yet) come with Type 1 versions of this set of international fonts.

The Easy Fix

The easiest fix is to change the document font encoding to use the default Computer Modern fonts. In LyX, go to the Layout menu and select Document. Select the Language tab. Change the Encoding from ``auto'' to ``default.''

Save your file. Now when you can export a dvi file which is compatible with the above instructions to make postscript and PDF files, or export a PDF file directly with Type 1 font encoding. Note, however, that this method isn't the best for the special accents of European languages, because this option tells LyX not to use the international font set.

The ae Hack

If you use European languages, you can still make PDF files with Type 1 font embedding without downloading new Type 1 fonts. This method uses the ``ae'' package, which is a hack that translates European characters into combinations of the American Computer Modern characters. This is completely transparent to the user.

There are two equivalent ways to implement this package. The first is to go to the Layout menu in LyX, select select Document. Under the Document tab, change the Fonts selection to ``ae.''

The second method is to go to the Layout menu in LyX, select Latex Preamble... and add the line

\usepackage{ae,aecompl}

and save it.

Then you can use the standard latex, dvips -Ppdf, gs.... sequence to build a nice PDF file or export a PDF file directly.

The Pslatex Package

The pslatex package instructs LaTeX to use Type 1 fonts which Acrobat has internal support for. This means no computer modern fonts. This also means that few fonts need to be embedded in the PDF file, so it will generally be smaller. There are two equivalent ways to implement this package. The first is to go to the Layout menu in LyX, select select Document. Under the Document tab, change the Fonts selection to ``pslatex.''

The second method is to go to the Layout menu in LyX, select Latex Preamble... and add the line

\usepackage{pslatex}

The Best Fix

The best fix is to add a set of Type 1 fonts with international font encoding, called the Computer Modern Super fontset. Download and install this font set from CTAN or one of its many mirrors.

Thanks go to Matej Cepl for giving me a much better understanding of the Type 1 font options for LyX! He is the one who told me about the Computer Modern Super Type 1 fontset.


Return to the Main Page