General ⇒ How to Crop Pictures in Latex
How to Crop Pictures in Latex
Anyone got any idea on how to crop images in Latex?
Thanks in advance
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
How to Crop Pictures in Latex
when including images by \includegraphics there are optional parameters concerning viewport and cropping, see Documentation of the Graphics bundle 4.4 Including Graphics Files.
Btw. I've sometimes used the tool pdfcrop to crop pdf files externally before including them.
Stefan
Re: How to Crop Pictures in Latex
Thanks for referring to those pages. Will go through them soon.
btw i came across following commands for cropping an image at a site http://web.reed.edu/cis/help/latex/Graphics.html
\begin{figure}[htbp]
\begin{centering}
\caption{A Figure}
\includegraphics[clip=true, viewport=.0in .0in 1in 1in]{figure}
\label{subd3}
\end{centering}
\end{figure}
When i compile using these, i get an error like
! Package keyval Error: p undefined.
Anyidea on this?
n yeah pdfcrop seems to be an interesting thing.
Thanks
Pankaj
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: How to Crop Pictures in Latex
this code works for me. Perhaps the problem is caused by other code - could you show a complete example that produces this error?
Stefan