LaTeX forum ⇒ Graphics, Figures & Tablesinserted image is somehow invisible Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am

inserted image is somehow invisible

Postby mkrlatex » Wed Oct 12, 2016 4:22 pm

I inserted an image using the following code, but the image doesn't show up.
  1. %somehow the image doesn't show up!
  2. \begin{figure}[h!]
  3. \begin{center}
  4. \includegraphics[width=7cm,natwidth=610,natheight=642]{flowchart.pdf}
  5. \caption{G2P Flowchart}
  6. \label{flowchart}
  7. \end{center}
  8. \end{figure}

Please help.
Attachments
invisible image.JPG
it looks like it's there, but can't see it.
invisible image.JPG (11.82 KiB) Viewed 2816 times

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Oct 12, 2016 6:12 pm

Please test the following.

  1. \documentclass{article}
  2. \usepackage{graphicx}
  3. \begin{document}
  4. \begin{figure}%[h!]% Don't make your text ugly please.
  5. \centering% JB: Never use the center environment in a figure
  6. \includegraphics[width=7cm]{example-image.pdf}
  7. \caption{G2P Flowchart}
  8. \label{flowchart}
  9. \end{figure}
  10. \end{document}


What result do you get? Please also upload the log file.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am

Postby mkrlatex » Wed Oct 12, 2016 6:34 pm

It is my very first time to use MikTeX, and it is all by myself, so please bear with me.

Still got errors, please see the log file attached.

P.S. I am using a template created by others, and this error occurs.
Attachments
invisible image error log.txt
the correct log file
(9.67 KiB) Downloaded 175 times

User avatar
Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Oct 13, 2016 8:26 am

Sems like something in your document just allows eps files. Please check with the editors of the journal.
Are you allowed to distribute the template? If so, please and i can tell you which is the compromising part. But this won't help if the journal just allows eps images to be included.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am

Postby mkrlatex » Thu Oct 13, 2016 8:36 am

I have tried with all image formats (jpg, png, pdf, and even eps), but still the image never shows up. Only the caption appears.

User avatar
Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Oct 13, 2016 8:42 am

Please post a minimal working example.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am

Postby mkrlatex » Thu Oct 13, 2016 9:48 am

Thanks a lot, Johannes_B.

Fixed.

The problem was with the userpackage (\usepackage[dvipdfm]{color,graphicx} % for dvipdfm(x)). By removing [dvipdfm] and change the includegraphics line to \includegraphics[width=7cm]{flowchartthen.pdf}, the image shows up nicely.

Thanks a lot for your help, :)
Makara

User avatar
Stefan Kottwitz
Site Admin
Posts: 9563
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Oct 13, 2016 11:33 am

Hi Makara,

welcome to the forum!

Indeed, it's very recommendable to not give a driver option, so the graphicx package chooses the correct driver option by itself automatically.

Stefan
LaTeX.org admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests