Docsity

Using Images in LaTeX: Syntax and Attributes, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Using Images in LaTeX: Syntax and Attributes and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Using graphics/images in LaTeX

Introduction

• How do you go about using graphics in LaTeX?

• What we’ll cover:

– Syntax

– Attributes

Key Concept

• The concept to understand is that the file

needs an area to be displayed in.

• This area is called the bounding box.

Syntax

• Example:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

…

\includegraphics[bb = 1 2 10 20, width = 4in]{file.eps}

…

\end{document}

Attributes

  • scale = xx

Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.

  • angle = xx

This option can rotate the image by xx degrees (anti-clockwise)

  • trim=l b r t

This option will crop the imported image by l from the left, b from the bottom, r from the right, and t from the top. Where l, b, r and t are lengths.

  • clip

For the trim option to work, you must set clip=true

Example

  • \documentclass{article}
  • \usepackage{graphicx}
  • \begin{document}
  • \begin{center}
  • \title{How to insert an image in LaTeX}
  • \fontsize{15pt}{22pt}\textbf{How to insert an image in LateX}
  • \end{center}
  • Well lets see how this works. What can you really do with this software, can we insert an image after a paragraph? Are we able to insert an image inline with the text. Are there other features to be had with inserting an image with LaTeX.
  • \par\bigskip
  • \includegraphics[bb = 0 0 100 150]{images.jpg}
  • \par
  • More text to see where it wraps to.
  • \end{document}

Example

  • \documentclass{article}
  • \usepackage{graphicx}
  • \begin{document}
  • \begin{center}
  • \title{How to insert an image in LaTeX}
  • \fontsize{15pt}{22pt}\textbf{How to insert an image in LateX}
  • \end{center}
  • Well lets see how this works. What can you really do with this software, can we insert an image after a paragraph? Are we able to insert an image inline with the text. Are there other features to be had with inserting an image with LaTeX.
  • \par\bigskip
  • \includegraphics[bb = 0 125 100 150, trim = 0 0 50 150, clip = true]{images.jpg}
  • \par
  • More text to see where it wraps to.
  • \end{document}

Example

• Output