6
$\begingroup$

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.

$\endgroup$
8
  • $\begingroup$ Could you please clarify what you mean by label placement inside of figures? $\endgroup$ Apr 15, 2010 at 13:43
  • 17
    $\begingroup$ Have you tried pdflatex? $\endgroup$
    – S. Carnahan
    Apr 15, 2010 at 15:22
  • $\begingroup$ As SC says, on any modern machine, pdfLaTeX is preferable to LaTeX -> dvips -> ps2pdf. In fact, postscript is rapidly becoming an unsupported format, so I think you should at the least use dvipdf directly, unless you're using eps images. $\endgroup$ Apr 15, 2010 at 16:36
  • 3
    $\begingroup$ @Theo: Do you have any references supporting your claim that PS is becoming unsupported? $\endgroup$ May 9, 2010 at 10:11
  • 5
    $\begingroup$ You misspelled "\emph{you}" in the title. $\endgroup$
    – JeffE
    Apr 14, 2012 at 9:13

7 Answers 7

8
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ The really big observable benefit with microtypography is less hyphenation. $\endgroup$ Jun 25, 2013 at 13:46
4
$\begingroup$

I recommend using the dvipdfm program, the analog of dvips for PDF. It supports EPS images and other special DVI commands. Files produced by ps2pdf or pdfTeX are known to cause problems.

$\endgroup$
4
$\begingroup$

I almost always use pdflatex and I "draw" my figures using tikz and pgf. This is a pure latex solution, and the quality of the figures is proportional to the amount of time you are willing to put into them, but by default, the quality is generally quite good.

$\endgroup$
1
  • $\begingroup$ Same here. Tikz is awesome (if somewhat daunting). $\endgroup$ Aug 12, 2010 at 0:02
3
$\begingroup$

Taking the title, "How do you convert ..." literally [emphasis added], the Mac program TeXShop does this for me.

In a unix environment, I have used dvips followed by ps2pdf and experienced some problems but these were long ago. Someone once told me how to embed LaTeX code into xfig files, but I never used it. If you place figures in the tex via a picture environment, then you just have to continue to adjust stuff, or print on graph paper and use coordinates.

If you are lazy with xfig and have to label stuff, then always place your labels at magnification 1. Otherwise character placement will be wrong. I found that a 24 point font for characters with an 18 point font for subscripts works about the best in terms of scales. Even so, I have noticed that in published versions of stuff we have written the fonts in figures are too small for my tastes.

Then again, I think that figures are meant to communicate an idea instantly, and often a plethora of notation within a figure can be a distraction on first reading.

$\endgroup$
1
  • 1
    $\begingroup$ Labels with Xfig: make sure that you have the "special" tag selected for text input with xfig. But better still: use TikZ! $\endgroup$ Apr 15, 2010 at 14:01
3
$\begingroup$

One package that that I like to use (when quasi-wysiwyg LaTeX in figures seems desirable) is: IPE. It is extremely simple to use, extensible too (I think), and works directly with PDF. If you don't feel like programming Tikz, pgf, etc. in detail, then IPE might prove to be very useful (also easy to install, as it comes as a package for Ubuntu). A link to the IPE Wiki is here and the Wikipedia article is here.

$\endgroup$
2
$\begingroup$

For the graphics in TeX, I use mpgraphics package which with only one run of LaTeX, I can see my metapost graphics in the output.

For maths, I think breqn package is very useful because it does automatic line breaking for equations and unlike align environment from amsmath package, you do not need to break and align equations manually.

$\endgroup$
0
$\begingroup$

I'm not sure if this works on a PC, but on a Mac, you can save any file as a PDF within the Print screen. Select the Print option for your document and you should see a pull-down menu titled PDF at the bottom of the print options screen. From there you can select "Save as PDF." Your document, as a PDF, will look exactly like it looked in the application where you created it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.