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 293<br />

The positioning argument of a picture box has the same effect on the<br />

enclosed vertical box as it does on a line of text, in that the whole box is<br />

treated as a single unit.<br />

Exercise 13.3: Reproduce the organization table below with the boxes <strong>and</strong><br />

included text but without the horizontal <strong>and</strong> vertical lines <strong>and</strong> arrows. These<br />

will be part of the next exercise.<br />

Hint: first draw the boxes on a piece of squared paper so that the edges of the<br />

boxes lie on the printed rules. Select the unit of length <strong>to</strong> be the rule spacing<br />

of the paper. Take as the origin the lower left corner of an imaginary frame<br />

surrounding the entire diagram.<br />

Scientific<br />

Advisors<br />

✻<br />

Direc<strong>to</strong>rate<br />

Managing Direc<strong>to</strong>r<br />

Trustees<br />

Science Administration Technical Head<br />

Project planning <strong>and</strong><br />

managing<br />

Projects Services S<strong>to</strong>res Phys. Plant Workshops Labs<br />

Development<br />

Analysis<br />

Theory<br />

Straight lines<br />

✛<br />

✛<br />

Library<br />

Computer<br />

facilities<br />

✛ ✲ ✛ ✲<br />

Orders<br />

Receiving<br />

Cus<strong>to</strong>ms<br />

Personnel<br />

Bookkeeping<br />

including<br />

general<br />

services<br />

✛ ✲<br />

Staff planning<br />

Drafting<br />

Project<br />

hardware<br />

construction<br />

Project<br />

working<br />

groups<br />

In the picture environment, L AT E X can draw straight lines of any length,<br />

horizontally <strong>and</strong> vertically as well as at a limited number of angles. The<br />

syntax for this picture element reads<br />

\line(∆x,∆y){length}<br />

For horizontal <strong>and</strong> vertical lines, length specifies how long the line is <strong>to</strong> be<br />

in length units. For lines at an angle, it has a somewhat more complicated<br />

meaning, as is explained below. The line begins at that spot given by the<br />

placement coordinates in the \put or \multiput comm<strong>and</strong>.<br />

<br />

✠<br />

(0,0)<br />

(7.5,0)<br />

❅<br />

❅❘<br />

\thicklines<br />

\put(0,0){\line(1,0){6}}<br />

\put(0,0){\line(0,1){1}}<br />

\put(6,0){\line(0,1){0.5}}<br />

The angle at which the line is drawn is given by the slope pair (∆x,∆y).<br />

The slope pair (1,0), in which ∆x = 1 <strong>and</strong> ∆y = 0, produces a horizontal<br />

line, while the pair (0,1) leads <strong>to</strong> a vertical line. This is illustrated in the<br />

above example.<br />

In general (∆x,∆y) has the following meaning:

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

Saved successfully!

Ooh no, something went wrong!