Solution for Latex Error: "Cannot determine size of graphic"

Source: Internet
Author: User

I ' m trying to include the graphics in my latex-file, which I compiled with latex+dvipdf on OS X. Latex however returns this ER ROR: "Cannot determine size of graphic"

My graphic is exported from PowerPoint, so I has tried both. pdf and. png. I get the same errors for both.

Sample Code:

\begin{figure}[htb]\begin{center}\leavevmode\includegraphics[width=0.8\textwidth]{ Graph.png}\end{center}\end{figure}

Error:

Answers:

the DVI producing  latex  doesn ' t support reading the size of PNG, JPG or PDF images. you need to use  Pdflatex  for this .

actually  latex  is  Pdflatex  in DVI mode in modern distributions, but it can read the sizes only in PDF mode for some reason.

you is however able to state the natural size of the images using  natwidth  and < Code>natheight  which would make  latex  compile without error.

< Span class= "PLN" >< Span class= "KWD" >< Span class= "PLN" >< Span class= "KWD" >< Span class= "pun" >the produced DVI file would only link to the PDF and the Dvi-to-pdf Co Nverter'll need to include it in the final PDF.

< Span class= "PLN" >< Span class= "KWD" >< Span class= "PLN" >< Span class= "KWD" >< Span class= "pun" >afaik  dvpdf  doesn ' t support this but   dvipdfm  does.

do it like the picture ' s method:

Solution for Latex Error: "Cannot determine size of graphic"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.