12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

D.2. Picture objectsTypeset example D.7: Picture: saved boxesSAVEDSAVED✒✒Source for example D.7\setlength{\unitlength}{1pc}\begin{picture}(18,5)\put(0,0){\framebox(18,5){}}\newsavebox{\Mybox}\savebox{\Mybox}(6,3)[tr]{$\mathcal{SAVED}$}\thicklines\put(1,1){\frame{\usebox{\Mybox}}}\put(11,1){\frame{\usebox{\Mybox}}}\put(1,1){\vector(1,1){0}}\put(11,1){\vector(1,1){0}}\end{picture}\setlength{\unitlength}{1pt}It can take La<strong>TeX</strong> a long time to draw something. When a box is saved it actuallycontains the typeset contents, which then just get printed out when the box is used. It cansave processing time if something which appears several times is saved and then used asand where required. On the other hand, a saved box can use up a significant amount ofLa<strong>TeX</strong>’s internal storage space. <strong>The</strong> \sbox command with an empty text argument can beused to delete the contents of a bin. For example,\sbox{\Mybox}{}will empty the \Mybox box. Note that this does not delete the storage box itself.D.2.3LinesLa<strong>TeX</strong> can draw straight lines, but the range of slopes for lines is somewhat restricted.Further, very short lines cannot be drawn.\line(〈i, j〉){〈distance〉}<strong>The</strong> pair (〈i, j〉) specifies the slope of the line, and 〈distance〉 is a value that controls thelength of the line. <strong>The</strong> line starts at its reference point (i.e., the place where it is \put). <strong>The</strong>slope of the line is such that if a point on the line is slid along the line, then for every i units417

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

Saved successfully!

Ooh no, something went wrong!