[Math] Typesetting mathematics: how do {\em you} convert text into pdf

latexmathematical-writingsoft-question

Prompted by this question I would like to ask the community how they convert their mathematics into pdf files. In any given procedure for converting mathematics into pdf I am interested in two issues: first typographical quality of text and of mathematical formulas and second production and placement of figures and labels within figures.

As a concrete example my current procedure is: latex and bibtex until the references settle down, dvips -o to produce postscript, and then ps2pdf to produce pdf files. I go through postscript in order to make psfrag labels work. I've never been fully happy with the output – in particular label placement inside of figures is difficult.

As a final issue, in the question referenced, Tilman suggests that pdftex has typographical improvements over latex. I've looked around on-line and these seem to be margin kerning (hanging punctuation) and glyph scaling (font expansion). How does one use these features? Do they make a difference in practice?

EDIT: After a bit of pain, I've managed to switch from my previous procedure (described above) to the much simpler procedure of using pdflatex. Instead of psfrag I now use Colin Rourke's pinlabel package. I am very happy with pinlabel — the fonts are exactly what I expect them to be, and the job of labelling is much easier than it used to be. It is still possible to align labels inside of a figure, and they virtually always show up where I intended.

I started using the microtype package, which turns on margin kerning and glyph scaling. I can see that these change the output, but I honestly can't say that the output is better – I guess my eyes aren't that sensitive. One thing to watch out for – pdftex 1.20 threw show-stopping errors when typesetting figure captions. I updated to 1.40 and the problem went away.

Thanks for your suggestions – if other people have other latexing procedures I'd be interested to hear about them.

Best Answer

You can do margin kerning (aka “protrusion”) and font expansion in pdfLaTeX simply by loading the package microtype (i.e., by adding

\usepackage{microtype}

to the preamble). I also suggest using the tracking option for small-caps, which increases the space between letters (which is typographically correct, but only for small-caps and all-caps text):

\usepackage[tracking=smallcaps]{microtype}

For further information (and for several fine-tuning options) you can consult the microtype manual.

Edit: Yes, in my opinion and (I think) in a typographer’s opinion, these features do make a lot of difference. Margin kerning and font expansion help pdfLaTeX typeset the text, producing a lot less over/underfull hboxes. Letterspaced small-caps are also more legible and much more aesthetically pleasing.