Graphics, Figures & Tablesinserted image is somehow invisible

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

inserted image is somehow invisible

Post by mkrlatex »

I inserted an image using the following code, but the image doesn't show up.

Code: Select all

%somehow the image doesn't show up!
\begin{figure}[h!]
\begin{center}
\includegraphics[width=7cm,natwidth=610,natheight=642]{flowchart.pdf}
\caption{G2P Flowchart} 
\label{flowchart}
\end{center}
\end{figure}
Please help.
Attachments
it looks like it's there, but can't see it.
it looks like it's there, but can't see it.
invisible image.JPG (11.82 KiB) Viewed 6559 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

inserted image is somehow invisible

Post by Johannes_B »

Please test the following.

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}%[h!]% Don't make your text ugly please.
	\centering% JB: Never use the center environment in a figure
		\includegraphics[width=7cm]{example-image.pdf}
		\caption{G2P Flowchart}
		\label{flowchart}
\end{figure}
\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

Re: inserted image is somehow invisible

Post by mkrlatex »

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 542 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: inserted image is somehow invisible

Post by Johannes_B »

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

Re: inserted image is somehow invisible

Post by mkrlatex »

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: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: inserted image is somehow invisible

Post by Johannes_B »

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

inserted image is somehow invisible

Post by mkrlatex »

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: 10316
Joined: Mon Mar 10, 2008 9:44 pm

Re: inserted image is somehow invisible

Post by Stefan Kottwitz »

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
Post Reply