Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latex, display a long image in multiple page?

Tags:

image

tex

(Please don't move my post to Tex, I can't post image there.) I have a long UML diagram, I use the following code. The figure is about two and a half page long, but only the first page is showing, and the lower part of the figure is missing. How do I display the whole diagram in multiple page?

Exactly what code should I add?

\usepackage{graphicx} 
......
\includegraphics[height= 81.3cm, width=18cm]{myImage.png}
\captionof{figure}{Sequence Diagram}

Screenshot: Screenshot

like image 747
Jing Avatar asked Sep 23 '11 23:09

Jing


1 Answers

You can use the viewport option of \includegraphics to display a specific portion of the image. By using this command three times you can display your image in three portions.

The viewport option takes 4 arguments:

  • The first two values are the (x,y) coordinates (in pixels) of the lower left corner of the portion of the image file you want to include.
  • The second two values are the coordinates of the upper right corner.

For example, the command \includegraphics*[viewport=0 0 100 100]{myImage.png} would display the bottom-left corner of the image. Note that you need the * in order to actually crop the image; otherwise it will only be shifted.

like image 79
Smi Avatar answered Sep 29 '22 19:09

Smi