Saturday, August 19, 2006


Ah my friend, preparing papers for OOPSLA can be quite interesting. In particular, how about this? You get the OOPSLA-sanctioned style file and template, you fill in all your content, you generate the required .ps and .pdf files without touching anything, and you think you are done.

Emphasize think. Because you are not. You get back a notice telling you "hey, you gave us files formatted for A4 paper, and we need letter size". Ah yes, there are differences in size, and thus margins will get broken.

But how did this happen, you think? You didn't touch anything. Didn't the style file set the paper size to letter? Scratching your head a bit, you go over OOPSLA's FAQ and find that the european TeX distributions, while very good, default their configuration to A4 paper. MiKTeX, in particular, comes configured for A4 paper instead of letter. You use MiKTeX, there's the problem.

Ok, so how to fix it? The .ps file is easily fixed by adding "-t letter" to dvips.exe's command line. But pdflatex.exe knows nothing about the -t switch, so your .pdf file is still in A4. What to do now?

Fortunately, you notice one of those rarely-used programs is called dvipdfm.exe. From .dvi to .pdf, sounds good! So you try "-t letter" with dvipdfm.exe thinking it should work, but instead you get an error and a screenful of help text. Examining this, you find that with dvipdfm you have to use "-p letter" instead of "-t letter". Hmmm.

And thus, finally the files are produced.

1 comment:

Frank McCown said...

An easier fix for pdflatex is to use the following:


where you adjust the width and textheight parameters for your specific requirements.