Dissertation and Thesis Guide

Last revised January 2014
Last web update January 2014

This guide was prepared by the Office of the Dean of Graduate Studies. Questions concerning these guidelines or any aspect of manuscript preparation for the thesis, dissertation, or report should be directed to the Assistant Graduate Dean in the Office of the Dean of Graduate Studies, FA3.104, 972-883-2234.

This page was written by Dr. Cantrell and last updated here February 01, 2007. The original version may be more up to date than this copy.

How to produce PDF documents that display well on-screen, starting from TeX or LaTeX

What does TeX do, and how does it work?

Professor Donald Knuth's TeX is a program for producing typeset technical documents of the best possible quality. You can read a short history of TeX on the site of the TeX Users' Group. Many computer scientists, electrical engineers, and physicists use TeX (or the TeX-derived macro language LaTeX) for typesetting articles and books that contain mathematical expressions, or graphics, or both. Many professional journals accept manuscripts formatted in TeX or LaTeX. I have used LaTeX to write a book and to make thousands of slides for courses such as Computer Organization and Design, Nonlinear Optics, and Broadband Packet Networks.

TeX or LaTeX reads an ASCII input file such as this example, which typesets a simple equation. For touch typists, the effort involved in typing the LaTeX commands in the example is much smaller than the effort that one must expend to produce the same equation in the equation editor in a certain widely used word processor. Also, the TeX result looks better than the other result (to me :).

TeX and LaTeX source files are conventionally named with the extension .tex. Any text processor can be used to create a .tex file. It is best to refrain from using commercial word processors, because these applications have a nasty habit of embedding unprintable bytes, even in files that are nominally plain text. There are good text processors that colorize TeX syntax, such as BBEdit (for Macintosh) and GWD Text Editor (for Windows).

The result of processing a .tex file is a binary "device-independent file" (conventionally named with the extension .dvi) that describes every element of a typeset document. The hexadecimal values of the 614 bytes of the .dvi binary file produced from the .tex example given above are mostly greater than 0x80, which illustrates that a .dvi file is not printable.

What is PostScript, and how is a PostScript file created?

Adobe PostScript is a document description language that is used to describe precisely where every typographic element is to be placed. Postscript also provides highly sophisticated vector graphics capabilities, which can be used to render fonts and illustrations. A PostScript file can be interpreted and rendered by a PostScript-enabled printer, by a viewing program such as GhostView, or by vector graphics programs such as Macromedia Freehand or Adobe Illustrator.

PostScript files, which may be in ASCII or binary format, can be created by printer drivers or by illustration programs. An ASCII PostScript file can be read and edited in a text processor. It is possible for a programmer to create a PostScript file without using illustration software. For example, one of my Ph.D. graduates, Dr. Paul Quinn, created figures of electromagnetic fields in a dielectric sphere directly in PostScript.

A TeX .dvi file can be post-processed to produce a PostScript (.ps) file. On UNIX or linux systems, the application dvips is often used to create .ps files from .dvi files. The dvips application has many options, some of which are quite important for the appearance of the document.

How can one create a PDF file?

Adobe's Portable Document Format (PDF) is the successor to PostScript as the leading document description format. PDF remedies many of PostScript's disadvantages, such as the large size of some PostScript files, and the requirement that all fonts that are not completely defined in a PostScript file (in order to save space, perhaps :) have to be installed in the system on which the file is viewed or rendered. PDF files can be read with Adobe Acrobat Reader, which is available at no charge for nearly all modern computing platforms. Many companies have put their documentation on the Web in PDF format.

Instead of being sent to a printer, a PostScript file can be processed by Adobe Acrobat Distiller (which is packaged with Adobe Acrobat) to produce a Portable Document Format (.pdf) file. One can also create a .pdf file directly with a pseudo-printer driver that comes with Adobe Acrobat, or with the PDFTeX package, but the .pdf files created in these ways may have problems. My advice is to create .pdf files only with Distiller.

For faculty and students, the full Acrobat package, including Distiller, costs around $90 US. One can obtain Acrobat and other Adobe software from one's campus bookstore, or, after establishing one's academic credentials, from online vendors such as Software Showcase. Neither I nor any member of my family has any financial relation with Adobe Systems, Macromedia or Software Showcase.

How do PostScript and PDF render fonts?

The PostScript language supports Bezier curves. A curve can be "stroked" (meaning that the curve is drawn with a finite width) or "filled" (meaning that the area inside the curve is painted with some color). An outline font is defined mathematically as a set of Bezier curves for each character in the font, as in this example of the letter "A" in the Palatino Bold typeface. The default PostScript behavior is to fill, but not to stroke, the curves that define the characters of an outline font. One of the characteristics of outline fonts is that the edges of characters appear smooth at all resolutions, up to the limitations of the rendering technology.

There are two common kinds of outline fonts: PostScript Type 1 fonts, and TrueType fonts. Originally PostScript Type 1 fonts were available only from Adobe. TrueType fonts were developed by an unlikely alliance including Apple and Microsoft at a time when Adobe was trying to keep secret the details of rendering Type 1 fonts. Nowadays PostScript Type 1 fonts are available from many independent type foundries as well as from Adobe. PostScript Type 1 Computer Modern fonts for TeX and LaTeX are available in the BaKoMa font collection created by Basil K. Malyshev. (Another source for the BaKoMa fonts is the CTAN site.)

Before there were outline fonts, there were bitmapped fonts. Each character in a bitmapped font is defined as a raster in which each pixel has its own color, as in this 1-bit-deep example of the letter "A" in the Palatino Bold typeface. (Since each pixel is either black or white, the color of each pixel can be described with a binary "1", if the pixel is white, or a binary "0", if the pixel is black. Hence each pixel is 1 bit deep.) It is interesting to compare how the same letter in the same font is defined using outline technology and bitmap technology.

PostScript and PDF both allow the use of bitmapped fonts instead of outline fonts. If a bitmapped font is embedded in a .ps or .pdf file, each character is stored as a bitmapped graphics object, not as a vector object. Adobe calls embedded bitmapped fonts "Type 3 fonts". If you use Acrobat (full version) to examine the fonts in a PDF document that contains embedded Type 3 fonts, you will see names such as T3 and T7 instead of the fonts' real names.

How do TeX and LaTeX interact with PostScript and PDF?

In order to display TeX-typeset documents, Professor Knuth developed an entire family of typefaces (the Computer Modern family). Because he developed TeX before outline fonts could be interpreted by printers, he also developed Metafont, a utility program which works internally with outline fonts, but which produces printable bitmapped fonts at a wide variety of resolutions. There is a language called MetaPost that produces outline fonts instead of bitmapped fonts. However, MetaPost is not installed with TeX by default, while Metafont is present in every TeX installation.

Because dvips uses bitmapped fonts by default, instead of outline fonts, PDF files that are created from PostScript files that were written using the dvips defaults render poorly when viewed on a computer screen, but render clearly on a printer with a resolution that matches the resolution for which the bitmapped fonts were created. In contrast, PDF files that are viewed on-screen on a system on which the Type 1 Computer Modern fonts are installed, and PDF files in which the necessary subsets of the Type 1 Computer Modern fonts have been embedded, render clearly at all screen resolutions.

In order to eliminate the problem of rendering bitmapped fonts at inappropriate resolutions, one has to configure dvips not to embed bitmapped fonts, and (if one chooses) to embed Type 1 (outline) fonts. (Please be aware of the copyright issues associated with embedding entire fonts. One can avoid these issues by embedding only the subset of each font that you actually need. The best tool for this purpose is the full version of Acrobat.)

To create a .ps file from a .dvi file in which Type 1 fonts are embedded instead of bitmapped fonts, one types

dvips -z -P psout <your_dvi_file_name>
where the file config.psout contains the line
p +fontmap.map
and the file fontmap.map contains all of the font mappings, the first few of which are
cmb10    </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmb10.pfb
cmbsy10  </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbsy10.pfb
cmbsy6   </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbsy6.pfb
cmbsy7   </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbsy7.pfb
cmbsy8   </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbsy8.pfb
cmbsy9   </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbsy9.pfb
cmbx10   </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbx10.pfb
cmbx12   </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbx12.pfb
cmbx5    </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbx5.pfb
cmbx6    </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbx6.pfb
cmbx7    </home/ec/your_username/tex/fonts/cm/ps-type1/bakoma/pfb/cmbx7.pfb
(The above description comes from Professor Ivor Page. Thanks, Ivor!)

Of course, you must first obtain the BaKoMa fonts and install them in some subdirectory of your home directory. We are working on installing the BaKoMa fonts in our TeX directory tree, so that all users can have access to them without installing them in everyone's home directory.

Other descriptions of the TeX/LaTeX/dvips bitmapped font problem, along with more or less detailed explanations of how to get dvips to refrain from embedding Type 3 bitmapped fonts, are available from both the ACM and Adobe. (If the Adobe page is broken, as it was the last time I tried to access it, please use the locally cached copy.)

This page was written by Dr. Cantrell and last updated here February 01, 2007. The original version may be more up to date than this copy.