Linux Setup Notes

name and address
created nov 19, 2008

LaTeX Tips

Preventing dvipdf from creating files with A4 paper size

Problem

The LaTeX-related program dvips often creates PostScript files with 'A4' paper size instead of 'letter'. This causes several problems:

  1. The document won't print because your printer doesn't have A4 paper.
  2. The margins are messed up.
  3. If you convert the document to MS-Word format, Word creates an even bigger mess of it than usual when you change the paper size back to 'letter'.
Solution

The usual causes are incorrect settings in your config.ps file or bad PostScript files embedded in your document (that is, in the 'picture' environment). Some applications embed the paper size in the PostScript file that they create. The PostScript file will contain a line like:

 %%PaperSize: A4 

This causes dvips to set the main file to A4 as well. Re-create (or edit) the graphics files and re-run LaTeX on your document. This should eliminate all references to PaperSize in the resulting PostScript file, which is as it should be.

If this doesn't work, your configuration file might be wrong. Edit the file /etc/texmf/config.ps or /var/lib/texmf/dvips/config/config.ps (depending on the system) and change the paper size settings so the 'letter' settings appear before the A4 settings. The first '@' in this file is used as the default. Better yet, delete the A4 settings.

Unfortunately, this doesn't always work. The second thing to try is to edit or remove ~/.dvipsrc .

The next step is to run texconfig. There are two ways of running this program. One way is to type a command line like texconfig dvips paper letter. The other way is to use the text-based menu system that allows you to interactively configure LaTeX.

If this doesn't work, edit the file /usr/bin/ps2pdf (which is just a short script) and add the option -sPAPERSIZE=letter. This will force it to create letter size files. Alternatively, you can enter the paper size on the command line each time using the command dvips -l letter.

Preventing dvips and xdvi from printing

Problem

dvips and xdvi sometimes try to print something instead of creating a PostScript file.

Solution

Edit /usr/lib/teTeX/texmf/dvips/config/config.ps or /etc/texmf/config.ps and remove the ``|lpr'' line.

Installing LaTeX fonts

See Installing LaTeX fonts

Converting LaTeX documents to MS Word

The best way to do this is to convert the LaTeX file to a PDF and use a commercial program like Able2Convert or Nuance. See Converting LaTeX documents to MS Word

Creating high-quality PDF files from LaTeX documents

When you create a PDF file, the default output often contains jagged edges. See Creating high-quality PDF files from LaTeX documents


Back