english webpage  german webpage

Mini-HOWTO on electronic publication of a LaTeX document (PhD thesis)

This document describes how to prepare a PDF file from LaTeX document that is appropriate for electronic publishing. A Linux environment with TeTeX is assumed.

Problem
When an ordinary LaTeX document is simply converted to PS format (via latex and dvips) and subsequently to PDF (via ps2pdf) the resulting PDF file is not very readable on a computer screen: since the PDF does not contain scalable fonts, the letters are quite unreadable. Moreover, there are no hyperlinks in the document which would allow a quick navigation through the electronic document. The following steps describe a solution that worked for my PhD thesis.

Prerequesites
You need rather recent versions of latex and dvipdfm (0.13.2c or newer) on your computer. The solution has been successfully tested on a RedHat 6.2 machine with tetex-1.0.6, ghostscript 6.50 (Aladdin) and dvipdfm-0.13.2c-RPMs installed on it. It also worked on SuSE Linux 8.1 with the RPMs te_latex-beta.20020207-231, ghostscript-x11-7.05.3-41 and dvipdfm-0.13.2c-242. In SuSE 8.2 the dvipdfm driver is already contained in the tetex-2.0.1-22 RPM.

Creating the LaTeX document
You should use scalable Postscript Type 1 fonts. Moreover, you should use the hyperref package with some useful settings in order to obtain hyperlinks in your PDF document.This is accomplished easiest by adding the following lines to the header of your LaTeX file:

\usepackage{times}
\usepackage[usenames,dvipsnames]{color}
\usepackage[pdfborder= 0 0 0,
citebordercolor= 0 0 0,
filebordercolor= 0 0 0,
pagebordercolor= 0 0 0,
urlbordercolor= 0 0 0,
anchorcolor=blue,
filecolor=blue,
citecolor=blue,
pagecolor=blue,
urlcolor=blue,

General information on the PDF document (as obtained with Acrobat Reader in the menu: File->Document properties->Summary) is placed with a latex special command right at the beginning of the LaTex document:

\begin{document}
\special{pdf: docinfo << /Subject (Dissertation)
/Author (Johannes Weber)
/Title (Elektronisch Angeregte Zustände von Para-Benzochinon)
/Keywords (PBQ, CASSCF, CASPT2, DFT,
Kraftfeldskalierung, vibronische Spektren,
Franck-Condon-Faktoren) >>}
\special{pdf: docview << /PageMode /UseOutlines >> }
...

The last line activates bookmarks/thumbnails when opening the document with Acrobat Reader which allow convenient navigation through the document. A PDF bookmark entry is created with a latex special command. Lets assume you want to create a bookmark that directs to the beginning of chapter 1 of your thesis called ''Introduction''. Therefore, add the following line right behind \chapter{Introduction} in your LaTeX document:

\special{pdf: out 1 << /Title (1 Introduction) /Dest [ @thispage /FitH @ypos ] >>}

Unfortunately, I didn't manage set the chapter number automatically. Therefore, the chapter number has to be given manually with the chapter name in parenthesis behind /Title. The number behind ''out'' gives the hierarchy of the entry in the bookmark list. Entries beginning with ''out 1'' are on top of the hierarchy, entries with ''out 2'' and higher numbers are subordinated bookmarks. For example, the entry for a subsection in my thesis looks like:

\subsection{Classical solution of the equation of motion}
\special{pdf: out 3 << /Title (2.5.1 Classical solution of the equation of motion ) /Dest [ @thispage /FitH @ypos ] >>}

Here are some other tricks for a proper formatting, that I used in my PhD thesis:

I used a self-defined document style named jobook.cls , which is essentially the same as the document style book.cls with a few specific adjustments. Add the following line to the header of your LaTeX file:

\documentclass[12pt,a4paper,german,twoside]{jobook}

Nastily, LaTeX places a head line also on the last, even page of a chapter, even if it is empty. It can be removed with the command

\clearpage{\pagestyle{empty}\cleardoublepage}

which I put at the end of each chapter by default. For a proper formatting of the Literature section and an entry in the table of contents I placed the following lines in my thesis:

\renewcommand{\rightmark}{\scshape{Literature}}
\renewcommand{\leftmark}{\scshape{Literature}}
\special{pdf: out 1 << /Title (Literature) /Dest [ @thispage /FitH @ypos>>}
\bibliography{liter_pbq}
\bibliographystyle{johannes_deutsch_final.bst}

I used a self-defined Bibstyle johannes_deutsch_final.bst , which allows chemical-abstracts-like abbreviations for journal names in the *.bib file (e.g. journal = CPL instead of journal = {Chem. Phys. Lett.} ) and which formats the references like:

 [5] J. M. Bruce, in: Photochemistry of quinones (Eds. S. Patai, Z. Rappoport), Bd. 1, Kap. 9, 465, John Wiley & Sons, London (1974). [13] T. E. Sharp, H. M. Rosenstock, J. Chem. Phys. 41, 3453 (1964).

Creating the PDF file
Type at the command line
latex doktorarbeit.tex
dvipdfm doktorarbeit.dvi

You can generate a PS file from the same sources
latex doktorarbeit.tex
dvips -Ppdf doktorarbeit.dvi

Note: Using the package hyperref nullifies the effect of the package cite, because reference to literature are also hyperlinked. hyperref also modifies the space between the caption and the body in table.

 Questions, suggestions and criticism may be sent to : Johannes.Weber@uni-koeln.de, last change: 05.04.04