A few hints and tips on writing your thesis with latex.

B5 scaling

Most theses are printed in B5 format with width 17cm and height 24cm. Be carefull, there are different definitions of B5. The 17*24cm B5 format is about 81% of an A4 paper (21*29.7cm). It is useful to be aware of the format from the beginning. Otherwise you might end up with unreadable figures after the scaling.

You can use the Latex b5paper format from the beginning, but I choose to use A4 because it is the default format in our HP printers and it is a little bit more flexible, because you can use a larger font for the reviewing process. Your senior daily supervisor might be gratefull when you use a larger font. The result is:

\documentclass[twoside,a4paper,openright,12pt]{book}
The 12 points font will be a little more than 10 pt after scaling with 81%

To view result after scaling, add the lines (just after \documentclass..):

\input{comment.sty}
% \begin{comment}
% start the 81% scaling trick (comment out for full A4)

\addtolength{\oddsidemargin}{-0.2345679in} % magic number = 1 - 1/0.81
\addtolength{\evensidemargin}{-0.2345679in}% see documentation scale package
\addtolength{\topmargin}{-0.2345679in} % for explanation
\mag=810 % basic TeX command for 81% scaling
\usepackage[a4, center, frame]{crop}

% end of 81% scaling trick
% \end{comment}
The first three \addtolength commands adjust the offset for 81% scaling.
The \mag command is just a plain TeX command to scale with 81%.
The crop package centers the B5 textarea in a frame in the middle of the page.

You can switch between scaled and non scaled by removing the % before the \begin{comment} and \end{comment} lines.

When you use dvips for the 81% scaled version add the option -O0,2.75in to move the text area to the right position in the ps file, e.g.:

When you directly produces pdf using pdflatex, it may be necessary (depending on your latex installation) to add the 'nodriver' option to the crop package to get the page size correct (especially when using ghostscript/acrobat) because of the use of the tex mag register. See section 2 of the documentation of the crop package. Also problems in combination with the hyperref package have been reported.

dvips -O0,2.75in thesis.dvi

Pdf conversion

You can use pdflatex direct to create a pdf file. However, most of my images are .eps files and I use the 'ps route' to avoid making .pdf of all my .eps images (just a choice). You can also hack an intelligent Makefile to do these always automatically.

Warning
Do not use latex and pdf both on the same tex file because the .aux files that are generated by latex and pdflatex are incompatible. When you still want to run latex as well as pdflatex, you can easily solve this problem by making an softlink, e.g.

ln -s thesis.tex thesispdf.tex
and run pdflatex on the thesispdf.tex file.

Tell dvips to use the right fonts

The standard settings of dvips embeds sometimes bitmapped fonts (Type 3) while scaleble fonts (Type 1) are available. To avoid this problem use the options -Ppdf -updftex.map, e.g.:

dvips -Ppdf -updftex.map thesis.dvi
the switch -Pwww is also possible.

Conversion from ps to pdf

To convert a postscript file to a pdf file you can simple run ps2pdf, which is a perl script that uses ghostscript to convert from ps to pdf. However, the standard settings generate a modest quality intened for screen displaying. For a high quality for the final printing add the right options. Furthermore, it is useful to tell explicit which compatibility level of pdf is desired. An example is:
ps2pdf13 -r1800 -dPDFSETTINGS=/printer thesis.ps
ps2pdf13 is a shortcut to ps2pdf -dCompatibility=1.3 which produces PDF 1.3 output (Acrobat 4-and-later compatible). ps2pdf produces PDF 1.2 output, but this may change in the future. It is better to specify explicitely what you want to have.

-r 1800 sets the resolution for pattern fills and for fonts that must be converted to bitmaps to 1800 dpi.

-dPDFSETTINGS=/printer sets about 76 parameters used in the conversion process to the right values, e.g. to have an output with a high quality and to embed the fonts in your pdf file. You can also decide to change this parameters manually with -dparameter=value. You can find a list of parameters in the ps2pdf documentation

Check pdf fonts

The most common problem with pdf is missing fonts. To avoid this problem, fonts should be embedded during the creation process of a pdf. To check it afterwards you can use Acrobat Reader, File, Document properties, fonts or run:
pdffonts thesis.pdf

In our faculty pdffonts is standard installed on the system "demeter".

The Cover

A program like Coreldraw can be used to produce a cover for the thesis. However, it appeared that - even for a simple cover with only text - differences appear between my version and the version that I got returned from the printer. Therefore, is may be useful to supply a pdf to the printer. A postscript file can be generated by printing to a standard printer driver for a postscript printer and check the option "Print to file". Make sure that you use the right custom format.

The conversion to pdf can only be done for postscript files using a standard format such as A3, A4, letter and so on. Unfortunately, a cover uses most of the times a custom unusually format, e.g. 42x24cm. Therefore, this must be mentioned explicitely in the postscript file. Otherwise ps2pdf will choose the default format (e.g. letter). The size must be given in points. A point is 1/72 inch. An example for 42*24:

42 / 2.54 * 72 = 1190 points
24 / 2.54 * 72 = 680 points

Hack the following line in the beginning of your postscript file:

<< /PageSize [1190 680] >>

Convert the ps to pdf with the procedure described above.


L.T. Smit - December 2003