GNU Info

Info Node: (latex.info)picture

(latex.info)picture


Next: quotation Prev: minipage Up: Environments
Enter node , (file) or (file)node

picture
-------

      \begin{picture}(width,height)(x offset,y offset)
       .
       .
       picture commands
       .
       .
      \end{picture}

   The `picture' environment allows you to create just about any kind
of picture you want containing text, lines, arrows and circles.  You
tell LaTeX where to put things in the picture by specifying their
coordinates.  A coordinate is a number that may have a decimal point and
a minus sign -- a number like `5', `2.3' or `-3.1416'.  A coordinate
specifies a length in multiples of the unit length `\unitlength', so if
`\unitlength' has been set to `1cm', then the coordinate 2.54 specifies
a length of 2.54 centimetres.  You can change the value of
`\unitlength' anywhere you want, using the `\setlength' command, but
strange things will happen if you try changing it inside the picture
environment.

   A position is a pair of coordinates, such as `(2.4,-5)', specifying
the point with x-coordinate `2.4' and y-coordinate `-5'.  Coordinates
are specified in the usual way with respect to an origin, which is
normally at the lower-left corner of the picture.  Note that when a
position appears as an argument, it is not enclosed in braces; the
parentheses serve to delimit the argument.

   The `picture' environment has one mandatory argument, which is a
`position'.  It specifies the size of the picture.  The environment
produces a rectangular box with width and height determined by this
argument's x- and y-coordinates.

   The `picture' environment also has an optional `position' argument,
following the `size' argument, that can change the origin.  (Unlike
ordinary optional arguments, this argument is not contained in square
brackets.) The optional argument gives the coordinates of the point at
the lower-left corner of the picture (thereby determining the origin).
For example, if `\unitlength' has been set to `1mm', the command
        \begin{picture}(100,200)(10,20)
   produces a picture of width 100 millimetres and height 200
millimetres, whose lower-left corner is the point (10,20) and whose
upper-right corner is therefore the point (110,220).  When you first
draw a picture, you will omit the optional argument, leaving the origin
at the lower-left corner.  If you then want to modify your picture by
shifting everything, you just add the appropriate optional argument.

   The environment's mandatory argument determines the nominal size of
the picture.  This need bear no relation to how large the picture
really is; LaTeX will happily allow you to put things outside the
picture, or even off the page.  The picture's nominal size is used by
LaTeX in determining how much room to leave for it.

   Everything that appears in a picture is drawn by the `\put' command.
The command
        \put (11.3,-.3){...}
   puts the object specified by `...' in the picture, with its
reference point at coordinates (11.3,-.3).  The reference points for
various objects will be described below.

   The `\put' command creates an "LR box".  You can put anything in the
text argument of the `\put' command that you'd put into the argument of
an `\mbox' and related commands.  When you do this, the reference point
will be the lower left corner of the box.

   Picture commands:

\circle
Draw a circle.
\dashbox
Draw a dashed box.
\frame
Draw a frame around an object.
\framebox (picture)
Draw a box with a frame around it.
\line
Draw a straight line.
\linethickness
Set the line thickness.
\makebox (picture)
Draw a box of the specified size.
\multiput
Draw multiple instances of an object.
\oval
Draw an ellipse.
\put
Place an object at a specified place.
\shortstack
Make a pile of objects.
\vector
Draw a line with an arrow.

automatically generated by info2www version 1.2.2.9