Access Keys:
Skip to content (Access Key - 0)
 
More about this article
Created: 11/07/2008 10:33
Modified: 02/25/2009 10:41

How can I get good PDF output from LaTeX?

If you're trying to generate a pdf file from a .tex file, the ideal method is to use pdflatex on your .tex file:

       athena% pdflatex filename.tex

This will use postscript versions of the Computer Modern fonts, so that the text looks good at various resolutions. This also skips the DVI and Postscript step, so you don't have to generate a .dvi file at all.

If your latex file includes postscript files (such as in figures), then pdflatex will not be able to generate a proper pdf file. In this case you have two options: You can convert your Postscript graphics to PDF graphics, or you can use dvips and convert the output to PDF.

Ugly PDF output

If you try to convert Postscript generated by the normal "dvips -o" command to PDF, everything will look very pixelated and ugly on the screen, even though a printed copy will look fine. This is because dvips, by default, uses an assortment of bitmapped fonts. The procedure described below will generate the correct output.

In order to get nicer-looking PDF output, you can use Type 1 Postscript fonts instead of the standard bitmap fonts, by doing the following:

athena% latex file.tex
athena% dvips file.dvi -Ppdf

Rather than send the file to the nonexistent printer "pdf", this creates a .ps file using Type 1 postscript fonts. Then, to create the pdf file from this ps file, you can run:

athena% add ghostscript
athena% ps2pdf file.ps

Users of Sun Solaris machines may be able to use Acrobat Distiller, which can generate nicer PDF output:

athena% add acro
athena% distill file.ps

Note that distill is only available on Sun Solaris machines.

Note that distill is not available on the SGIs at the present time; if
you're logged onto an SGI, you can telnet to athena.dialup.mit.edu to
run distill. Alternately, you can use ps2pdf instead (though our
experience is that distill produces better pdf).

athena% add ghostscript
athena% ps2pdf file.ps

If you get an error when you run dvips saying something like:

   dvips: warning: no config file for `pdf'
   dvipsk 5.66a Copyright 1986-97 Radical Eye Software (www.radicaleye.com)
   ' TeX output 2002.10.15:1606' -> | lpr -Ppdf
   <texc.pro>. [1] Status Information:
    sending job 'username@machine+24' to pdf@localhost
    connecting to 'localhost', attempt 1
    cannot open connection to localhost - Connection refused
   Make sure LPD server is running on the server
    job 'username@machine+24' transfer to pdf@localhost failed

then the problem is that you're using the dvips in the newtex locker. Run:

     athena% add -r newtex

to "un-add" newtex from your path, and try again.

Your Rating: Results: PatheticBadOKGoodOutstanding! 1 rates

Adaptavist Theme Builder Powered by Atlassian Confluence