28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13.1. The picture environment 301<br />

This example may not seem very practical, since the \savebox <strong>and</strong><br />

\usebox comm<strong>and</strong>s could have been replaced by a \framebox <strong>to</strong>gether<br />

with \multiput <strong>to</strong> achieve the same result with even less effort. However,<br />

the main advantage of these two comm<strong>and</strong>s is not for multiple setting of<br />

text, but rather for more complex sub pic compositions.<br />

It should be pointed out that a \savebox comm<strong>and</strong> may be given<br />

outside of the picture environment, <strong>and</strong> even within the preamble. Such<br />

a sub-picture is then available in all picture environments throughout<br />

the document. However, if a \savebox is defined within an environment,<br />

it keeps its contents only until that environment comes <strong>to</strong> an end.<br />

The picture elements inside a \savebox will be sized according <strong>to</strong> the<br />

value of \unitlength in effect at the time that the box is constructed. It<br />

will not be rescaled by a later change in \unitlength.<br />

13.1.5 Making graph paper<br />

Package:<br />

graphpap<br />

The package graphpap adds a new comm<strong>and</strong> for drawing gridded paper:<br />

\graphpaper[num](x,y)(lx,ly)<br />

which places a grid with its lower left corner at (x,y), which is lx units<br />

wide <strong>and</strong> ly units high. Grid lines are drawn for every num units, with<br />

every fifth one thicker <strong>and</strong> labeled. If num is not specified, it is assumed<br />

<strong>to</strong> be 10. All arguments must be integers, not decimal fractions. For<br />

example, \graphpaper(50,50)(200,100) produces<br />

150<br />

100<br />

(50,50)<br />

❅<br />

50❅❘<br />

50 100 150 200 250<br />

UL=0.3 mm<br />

Exercise 13.7: Produce a sheet of graph paper 10 cm by 15 cm with 2 mm<br />

separation between the lines. This sheet may be used <strong>to</strong> determine the positioning<br />

of picture elements when planning a new diagram.<br />

13.1.6 Shifting a picture environment<br />

The generalized syntax of the picture environment contains a further<br />

coordinate pair as an optional argument

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!