Title: LATEX
1LATEX
- Graphics
- Inclusion
- Techniques
2The Idea of the Bounding Box is the key to
understanding graphical displays in LATEX, or any
derivative (i.e. pdfTEX).The box will set the
size displayed and control what the viewport
(cropped image) will access.
3 Graphics Pictures, Images and graphs JPEG
PNG PDF METAPOST EPS (encapsulated PS)
Import Library \usepackagegraphicx Import
Directive \includegraphicsoptionsfilename E
xample \includegraphicswidth3infile.png The
result of this call sets the width of the
graphic to 3inches
4Available Options height sets height of
graphic( height2cm ) totalheight total height
of graphic (height depth) width sets width
of graphic angle sets rotation in degrees
about the origin, clockwiseneg origin
originc, indicates center graphic for
rotation. bb bounding box. bb 10 20 100
200, sets 2 points, (10,20) represents
lower-left corner of graphic, (100,200) is the
upper right. Cropping viewport respect to
the bb, viewport 10 20 50 50,clip true,
sets view area of graphic and clips it. trim
trim 1 2 3 4, cliptrue removes 1bp _at_left, 2bp
_at_top
5\documentclassa4paper,12ptarticle \usepackage
graphicx \begindocument \beginfigure \beginc
enter \includegraphicsbb 0 0 273
400tim.jpg \captionthis is a cat on a guy
\labelfiggraph \endcenter \endfigure \begin
figure \includegraphicsbb20 20 273 400,
viewport 0 200 273 375, cliptruetim.jpg \end
figure \enddocument
6\usepackagegraphicx \begindocument \beginfigu
re \begincenter \includegraphicsbb 0 0 273
400tim.jpg \captionthis is a cat on a
guy \labelfiggraph \endcenter \endfigure \
beginfigure \includegraphicsbb20 20 273 400,
viewport 0 200 273 375, cliptruetim.jpg \capt
ionthis is a cat -- sans guy \endfigure \endd
ocument
7If you substitute Tim.jpg with any picture, in
the above example, you will see an initial full
image, and a secondary (2nd page probably) of
the cropped image of the top portion of the
image. The use of \beginfigure will allow the
technical writer (you) to indirectly refer to a
previously defined figure by number every time
a \beginfigure is encountered LATEX
automatically increments the index of the
figure. Additionally, the figure reference allows
for arbitrary page referencing by employing the
\labelreference info to tag the graphic. This
allows reference by illustrated by the
graphic \refreference info -- name refered.
on page \pagerefreference info reference
info figgraph usual form
8Floating placement of Graphics
LATEXs automated placement of figures will place
according to accepted default behavior topnumbe
r The max of float figures at the top of page
(default 2). bottomnumber The max of float
figures at the bottom page (default
1). totalnumber The max of float figures on any
page (default 3).
9Wide Figures
- 1 sided documents
- The following code uses this narrow environment
to make the figure extend 1 inch into the left
margin - \beginfigure
- \beginnarrow-1in0in
- \includegraphicswidth\linewidthwide
- \captionThis is a wide figure
- \endnarrow
- \endfigure
A Very, Very Wide Graphic
10Notes Links Software Providers
Graphics info Source http//www.tex.ac.uk/tex-arc
hive/info/epslatex.pdf