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.

302 Chapter 13. Drawing with L AT E X<br />

\begin{picture}(x dimen,y dimen)(x offset,y offset)<br />

picture comm<strong>and</strong>s \end{picture}<br />

In this form, (x offset,y offset) specifies the coordinates of the lower<br />

left corner. This means that for all \put comm<strong>and</strong>s in the environment,<br />

the amounts x offset <strong>and</strong> y offset are effectively subtracted from the placement<br />

coordinates, so that the entire picture is shifted by x offset <strong>to</strong> the<br />

left <strong>and</strong> by y offset downwards.<br />

13.2 Extended pictures<br />

13.2.1 The epic package<br />

Package: With the intention of adding some higher level comm<strong>and</strong>s <strong>and</strong> creating<br />

epic a more user-friendly interface <strong>to</strong> the picture environment, Sunil Podar<br />

released his epic package, adding new features <strong>and</strong> enhancements. One<br />

idea is <strong>to</strong> be able <strong>to</strong> draw multiple objects relative <strong>to</strong> each other, with<br />

only a limited number of absolute coordinates, making reuse <strong>and</strong> shifting<br />

much easier. Another goal is <strong>to</strong> simplify the drawing of lines.<br />

This code was originally written for LAT EX 2.09, but functions just as<br />

well as a LAT EX 2ε package. Thus it is implemented with<br />

\usepackage{epic}<br />

It makes the following new comm<strong>and</strong>s available <strong>to</strong> the user:<br />

\multiputlist \matrixput \grid<br />

\dottedline \dashline \drawline<br />

\jput \picsquare \putfile<br />

as well as the environments:<br />

dottedjoin dashjoin drawjoin<br />

The \multiputlist comm<strong>and</strong> is a variation on the regular \multiput<br />

comm<strong>and</strong>; rather than placing the same element in several locations, it<br />

puts different elements at regularly spaced intervals.<br />

\multiputlist(x,y)(∆x,∆y)[pos]{Obj1, Obj2, . . . , ObjN }<br />

places the N picture elements Obj1, . . . , ObjN at (x,y), (x+∆x,y+∆y),<br />

<strong>and</strong> so on. They are actually put in<strong>to</strong> a series of \makebox(0,0)[pos]{},<br />

so that the optional pos argument specifies the location of the element<br />

relative <strong>to</strong> the plotted point (Section 13.1.4). The elements in the list are<br />

separated by commas, so they must be enclosed in {} if they themselves<br />

contain commas.<br />

The \matrixput comm<strong>and</strong> is the 2-D equivalent of \multiput, creating<br />

an array of a single picture element. Its syntax is:

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

Saved successfully!

Ooh no, something went wrong!