About Me | Site Map | Contact Me

LaTeX

Microsoft Word is excellent at authoring short documents, but it's generally much easier to handle very long documents (e.g., several hundred pages) with LateX. (LateX is not a replacement for Word. They are designed for very different purposes.)

Getting Tex / LaTeX System

Most Unix/Linux systems include some TeX / LaTeX distribution. If you are on Windows platform, MikTeX is highly recommended. Of course, there are other respectable free distributions you might want to check out.

TeX / LaTeX Editor

I use TeXnicCenter, an open source editor. Though it's still in beta as of this writing, it's very stable. I used it almost every day for half a year when writing my dissertation, it has only crashed twice, but no content loss.

If TeXnicCenter is used together with MikTeX, it enables some sort of round-trip editing. When you click the preview button in TeXnicCenter, Yap (Yet Another Previewer, which comes with MikTeX) is launched to view the dvi file. When you double click some lines in Yap, you will find yourself back in TeXnicCenter at the source code of the line you are clicking.

Generating the PDF File

1. tex -> dvi -> ps -> pdf

This is the more traditional way to generate pdf file. You use "latex" command to generate dvi file, use "dvips" command to generate ps file, and then use "ps2pdf" or "distill" command to generate the pdf file.

"Latex" command only supports "eps" file. Therefore, if you want to include graphics, they have to be in "eps" format. "Eps" file can contain both bitmap and vector graphs. Generally, I don't like "eps" files, because they tend to be big, and there are lots of problems, such as incorrect bounding box and unrecognized format.

Following are some relatively trouble-free ways to generate "eps" files.

  • If you have bitmap graph in "png" or "jpeg" format, you can use "bmeps" to convert them to "eps" format. MikTeX includes "bmeps". For bitmap graphs, a resolution above 300 x 300 DPI is recommended if you want to have high-quality print out.
  • For vector graphs, I only have successful experience with Adobe Illustrator. It recognizes many graph formats, and can save files in many formats as well, including "eps".
  • If you have Adobe Acrobat (not Acrobat reader), you can print your graph with the pdf writer driver. The output is a pdf file containing the graph, either vector or bitmap depending on your original format. But, usually, the graph has too much margin than desired, you can use "pdfcrop" to crop it. "Pdfcrop" comes with MikTeX. When you have the desired pdf graph, you can save it (in Acrobat) in "eps" format.

2. tex -> pdf

If you use "PdfLatex" command, you can generate pdf file directly. This is my favorite way to generate pdf file, especially when you are using "hyperef" latex package (the pdf file will even contain bookmarks!).

"PdfLatex" command only recognizes "pdf" file. Therefore, if you want to include graphics, they have to be in "pdf" format. If you have a pdf driver installed (it either comes with Adobe Acrobat, or you can download some free pdf driver), you can print your graphs (either vector or bitmap) to a pdf file, and then use "pdfcrop" to crop it.

Vector Graphs

Whenever you create vector graphs, either in "ps", "eps", or "pdf" format, always remember to embed all fonts used in the graph, otherwise the graphs may not be displayed correctly on other systems. Not all fonts can be embedded due to license restrictions. In such case, you can choose to convert fonts to outlines (Adobe Illustrator has such function).

However, I don't recommend you convert all fonts to outlines, because font has hinting but outline does not. Font hinting is absolutely necessary if you want to resize your vector graph and if you care about output quality.

PDF Files

Always try to embed all fonts in your PDF file. Always try to use "Type 1", "True Type", or "Open Type" vector fonts. Always try to use vector graphs. If you have to use bitmaps, make sure the resolution is at least 300 X 300 DPI. These are very important tips if you want to have high-quality printouts. These tips are not suitable if your pdf is primary for online reading.

Some very early TeX / LaTeX system uses "Type 3" fonts (bitmap fonts), they are very ugly to read. Still there are some not so early TeX distribution that does not embed any font in generated pdf files by default. Watch out for those systems. My recommendation is to install a recent version of TeX system, such as MikTeX.

If you do not embed fonts in your pdf file, and if a particular font is not available on other user's system, then Acrobat or Acrobat Reader will replace them with some available font. The result may not be what you want. You can check font embedding status in Acrobat or Acrobat Reader file property dialog.

Pdf files have versions. To minimize compatibility issues when other users are reading your file, I recommend using PDF 1.3 (Acrobat 4.x) or PDF 1.4 (Acrobat 5.x) format.


Last Updated: March 1, 2006
(Cedric) Qin Zhang CSDL, ICS, UHM