The scale package^{∗}

Søren Sandmann

                  sandmann@daimi.aau.dk

1996/10/09

Abstract

This package scales an entire document by \sqrt{2}. It is useful if you are writing a document on e.g. A5 paper and want to print it on A4 paper to achieve better resolution.

1 Introduction and usage

It is sometimes a good idea to scale a document by \sqrt{2}. This is the case if the output is to be photographically reduced. By scaling the document, you will achieve a resolution that is approximately \sqrt{2} times better.

Example: You are preparing a document for A5 paper, and your printer has a resolution that is 300 dpi and uses A4 paper. If you use this package, your document will be scaled by \sqrt{2}. After photographical reduction, the resolution will be \sqrt{2} · 300 dpi ≈ 424 dpi. The package is not restricted to A5 paper; it will work with any paper format, simply scaling the document by \sqrt{2}.

To use use the package, just include it in a \usepackage{...} statement. Your system must be able to scale your fonts arbitrarily, e.g. by making them on the fly or by using PostScript fonts.

2 The implementation

All we need to do is to add a certain length to every margin and set \mag=1414:

1 ⟨∗package⟩

 2 \def\do@scale{%
 3  \addtolength\oddsidemargin{0.292893219in}
 4  \addtolength\evensidemargin{0.292893219in}
 5  \addtolength\topmargin{0.292893219in}
 6  \mag=1414}

The “magic” number 0.292893219 is calculated the following way (using \oddsidemargin as example. Let o be the old \oddsidemargin, let h be the \hoffset, let i be the initial offset (this is always 1 in, and let m be the real margin (the one we see on the paper). By the primed versions of the variables we mean the “new” one; i.e., o′ is the new \oddsidemargin. We define a function f to stand for the application of \mag=1414. This function does not change the initial offset i.

∗This file has version number v1.0, last revised 1996/10/09.

The real margin m is calculated as:

m = i + h + o

We want our new margin to be \sqrt{2} times longer than the old one:

m′ = \sqrt{2} m = f(i + h′ + o′),

This implies (since f doesn’t change i) that

\sqrt{2} m = i + \sqrt{2} h′ + \sqrt{2} o′
⟹ o′ = \frac{\sqrt{2} m − \sqrt{2} h′ − i}{\sqrt{2}} = m − h′ − \frac{1}{\sqrt{2}}i = i + o + h − h′ − \frac{1}{\sqrt{2}}i

We can just take h′ to be the same as h and get

o′ = o + i − \frac{1}{\sqrt{2}}i ≈ o + 0.292893219 in.

All we need to do now is to execute \do@scale at the beginning of the document:

 7 \AtBeginDocument{\do@scale}

8 ⟨/package⟩