Archives for December 2003

Word Up

07 December 2003

Reading this:

Did I feel [it] was looking down at me? Or that I was smarter than it was? Was it too clingy? Unobjectionable but unexciting? Simply put: Did it make me look forward to spending more time with it?

you probably wouldn't guess that the author is talking about dictionaries. Of course, if you already did, and you're anything like me, you would know exactly what she's talking about. Which is why I was pleasantly surprised to find my dictionary ranked second of seven. Especially because I got it for free from the UA office (thanks Peter).

Now, the article only considers college-type dictionaries, leaving out the shelf-filling OED and others like it. But if you're looking to actually buy a dictionary, and you're not my brother, you might find it useful.

A4 vs. Letter

04 December 2003

Ever had a LaTeX document print off-center or with missing the top inch or so? I've had this problem every time I run LaTeX on a Linux box, and I only just figured out why.

By default, LaTeX formats documents for a standard U.S. letter page (8.5 by 11 inches). Unfortunately, some or all Linux installations of dvips default to A4 paper (210 by 297 millimeters or 8.27 by 11.69 inches). Thus, your text block is sized to fit one type of page, but placed (electronically at least) on another. This gives a bigger bottom margin and smaller right margin. When you print your postscript file, the bottom of your document is aligned with the bottom of the paper, cutting off the top. The left sides are also aligned, giving the correct margin on the right even though the postscript was wrong. The documents generated with pdflatex also default to A4, giving a PDF of the wrong size. Adobe Acrobat, however, usually centers your document on the page and shrinks it to fit your paper, so the printout looks reasonable.

To fix dvips, edit /usr/share/texmf/dvips/config/config.ps and comment out the following lines:

@ A4size 210mm 297mm
@+ %%PaperSize: A4

That is, add a % to the start of each line, so that they read:

% @ A4size 210mm 297mm
% @+ %%PaperSize: A4

Alternatively you can run dvips -t letter.

For pdflatex, edit /usr/share/texmf/pdftex/config/pdftex.cfg and change:

page_width 210truemm
page_height 297truemm

to:

page_width 8.5truein
page_height 11truein

Alternatively, you can add these lines to your document:

\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}

but this only works when running pdflatex, as latex will complain that pdfpagewidht and pdfpagelength are undefined.

Also, you might wonder why the standard U.S. paper size is 8.5 by 11 inches. Or why A4 paper has the ratio it does (1 to the square root of 2).