1 / 10

LATEX

LATEX. Graphics Inclusion Techniques. The 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. Graphics – Pictures, Images and graphs

vaughn
Download Presentation

LATEX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LATEX Graphics Inclusion Techniques

  2. The 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: \usepackage{graphicx} Import Directive: \includegraphics[options]{filename} Example: \includegraphics[width=3in]{file.png} The result of this call sets the width of the graphic to 3inches

  4. Available Options: height – sets height of graphic( height=2cm ) totalheight – total height of graphic (height + depth) width – sets width of graphic angle – sets rotation in degrees about the origin, clockwise=neg origin – [origin=c], 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, clip=true] removes 1bp @left, 2bp @top…

  5. \documentclass[a4paper,12pt]{article} \usepackage{graphicx} \begin{document} \begin{figure} \begin{center} \includegraphics[bb = 0 0 273 400]{tim.jpg} \caption{this is a cat on a guy} \label{fig:graph} \end{center} \end{figure} \begin{figure} \includegraphics[bb=20 20 273 400, viewport= 0 200 273 375, clip=true]{tim.jpg} \end{figure} \end{document}

  6. \usepackage{graphicx} \begin{document} \begin{figure} \begin{center} \includegraphics[bb = 0 0 273 400]{tim.jpg} \caption{this is a cat on a guy} \label{fig:graph} \end{center} \end{figure} \begin{figure} \includegraphics[bb=20 20 273 400, viewport= 0 200 273 375, clip=true]{tim.jpg} \caption{this is a cat -- sans guy} \end{figure} \end{document}

  7. If 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 “\begin{figure}” will allow the technical writer (you) to indirectly refer to a previously defined figure by number; every time a \begin{figure} is encountered LATEX automatically increments the index of the figure. Additionally, the figure reference allows for arbitrary page referencing by employing the \label{reference info} to tag the graphic. This allows reference by: “illustrated by the graphic” \ref{reference info} -- name refered. on page \pageref{reference info} reference info – {fig:graph} usual form

  8. Floating placement of Graphics LATEX’s automated placement of figures will place according to accepted default behavior: topnumber 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).

  9. Wide Figures • 1 sided documents: The following code uses this narrow environment to make the figure extend 1 inch into the left margin \begin{figure} \begin{narrow}{-1in}{0in} \includegraphics[width=\linewidth]{wide} \caption{This is a wide figure} \end{narrow} \end{figure} A Very, Very Wide Graphic

  10. Notes – Links – Software Providers Graphics info Source: http://www.tex.ac.uk/tex-archive/info/epslatex.pdf

More Related