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.

Picture boxes—rectangles<br />

13.1. The picture environment 291<br />

The box comm<strong>and</strong>s \framebox, \makebox, <strong>and</strong> \savebox (Section 4.7.1)<br />

are available in the picture environment but with an extended syntax. In<br />

addition, there is another box comm<strong>and</strong> \dashbox:<br />

\makebox(x dimen,y dimen)[pos]{text}<br />

\framebox(x dimen,y dimen)[pos]{text}<br />

\dashbox{dash len}(x dimen,y dimen)[pos]{text}<br />

The dimensional pair (x dimen, y dimen) defines the width <strong>and</strong> height<br />

of the rectangular box in units of \unitlength. The positioning argument<br />

pos determines how the text is located within the box. It may take on<br />

values:<br />

[t] <strong>to</strong>p The input text appears—centered horizontally—below the upper<br />

edge of the box.<br />

[b] bot<strong>to</strong>m The input text appears—centered horizontally—above the<br />

lower edge of the box.<br />

[l] left The input text begins—centered vertically—at the left edge of<br />

the box.<br />

[r] right The input text ends—centered vertically—at the right edge of<br />

the box.<br />

[s] stretch The input text is stretched horizontally <strong>to</strong> fill up the box,<br />

<strong>and</strong> centered vertically.<br />

Without the optional argument pos, the input text is centered vertically<br />

<strong>and</strong> horizontally within the box.<br />

These positional values may be combined two at a time:<br />

[tl] <strong>to</strong>p left The text appears at the upper left.<br />

[tr] <strong>to</strong>p right The text appears at the upper right.<br />

[bl] bot<strong>to</strong>m left The text appears at the lower left.<br />

[br] bot<strong>to</strong>m right The text appears at the lower right.<br />

The order of the values is unimportant: tl has the same effect as lt.<br />

These box comm<strong>and</strong>s are <strong>to</strong> be used as pic elem in the placement<br />

comm<strong>and</strong>s \put <strong>and</strong> \multiput. The box is so placed that its lower left<br />

corner is at the position given by the coordinate pair in the placement<br />

comm<strong>and</strong>.<br />

\put(1.5,1.2){\framebox(2.5,1.2){center}}

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

Saved successfully!

Ooh no, something went wrong!