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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DPictures<strong>The</strong>re are many freely available L A TEX introductions on CTAN and other places. One thingthat these apparently are not covering is the traditional picture environment. It can bevery handy in many applications, though for more complex drawings the reader might bebetter of with TiKz/pgf or PSTricks. For the benefit of the general reader we here providea lesson in the standard picture environment.Writers comment: <strong>The</strong>re are many extensions to the stock picture environment providedby the L A TEX kernel. We have chosen not to deal with them in this chapter but insteadconcentrate on what you get as is from the kernel. But there are a few handy packages thatthe reader might want to explore: picture (by Heiko Oberdiek) which extends the \putsyntax to include arbitrary lengths, like 50mm; pict2e which is mentioned in [GM + 07] butjust recently was released; eepic. All packages are available from CTAN.This chapter describes how to draw diagrams and pictures using La<strong>TeX</strong>. Pictures aredrawn in the picture environment. You can draw straight lines, arrows and circles; youcan also put text into your pictures.Most often pictures are drawn within a figure environment, but they may also bedrawn as part of the normal text.D.1 BASIC PRINCIPLES<strong>The</strong> positions of picture elements are specified in terms of a two-dimensional cartesiancoordinate system. A coordinate is a number, such as 7, -21 or 1.78. In the cartesiancoordinate system, a pair of coordinates (i.e., a pair of numbers) specifies a position relativeto the position designated as (0,0). This special position is called the origin. <strong>The</strong> firstof the coordinate pair gives the value of the horizontal distance from the origin to theposition. A positive coordinate is an offset to the right and a negative number is an offsetto the left. <strong>The</strong> first value of a coordinate pair is called the x coordinate. <strong>The</strong> second valueof a coordinate pair is called the y coordinate and gives the vertical offset from the origin(positive upwards and negative downwards).\unitlengthTo draw a picture we also need to specify the units of measurement. By default, La<strong>TeX</strong>takes the printer’s point (there are 72.27 points to an inch) as the measurement of length.<strong>The</strong> value of the unit of length measurement within a picture environment is actuallygiven by the value of the \unitlength length declaration. This can be changed to anylength that you like via the \setlength command. For example,409Chapter last updated 2013/04/24 (revision 442)

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

Saved successfully!

Ooh no, something went wrong!