Graphics, Figures & TablesText color changes when inserting figure as graphic

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
james1015
Posts: 2
Joined: Tue Feb 23, 2010 2:16 am

Text color changes when inserting figure as graphic

Post by james1015 »

Hi All,

I'm new to the board and to LaTeX, but I've decided to use it to write my thesis. So far everything is great, but when I insert a figure as a graphic, the text on that page is distorted compared to the text on a page without any graphics. From the graphicx documentation, it seems there may be a problem using color (these are color figures), but I can't seem to figure out how to fix this. I have included a MWE with one of the graphic files I am attempting to use. If anyone has a suggestion, I would really appreciate it.

Thanks

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\begin{document}  

\begin{figure}[tbp]
	\centering
		\includegraphics{C:/pressure-wo-extension.png}
		\caption{Mean pressure values}
	\label{fig:pressure}
\end{figure}

Notice the text in the caption and other text on the same page as this figure.

\pagebreak

It will be different from the text on a page with no figure inserted.
\end{document}
Attachments
graphicMWE.zip
This is the .zip file with the MWE and the graphic
(33.94 KiB) Downloaded 102 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Text color changes when inserting figure as graphic

Post by gmedina »

Hi,

I compiled your code and couldn't reproduce the problem mentioned. What LaTeX distribution are you using? (I ask because I can only suspect that you could be using outdated packages).

Add \listfiles just before the \documentclass command in your code, compile it and attach to your next post the .log file obtained.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
james1015
Posts: 2
Joined: Tue Feb 23, 2010 2:16 am

Text color changes when inserting figure as graphic

Post by james1015 »

gmedina wrote:Hi,

I compiled your code and couldn't reproduce the problem mentioned. What LaTeX distribution are you using? (I ask because I can only suspect that you could be using outdated packages).

Add \listfiles just before the \documentclass command in your code, compile it and attach to your next post the .log file obtained.
Thanks,

It seems silly, but now when I run the MWE I created and my main file I don't get the problem anymore. Not sure what could have caused that. I'm running MiXTeX 2.8. Anyways, here is the .log file. Thanks for your help.
Attachments
graphicMWE.log
(4.61 KiB) Downloaded 141 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Text color changes when inserting figure as graphic

Post by localghost »

The concerned graphics file has an alpha channel for transparency. Remove this channel with an image manipulation software. Current versions of the pdfTeX engine are more capable in this regard and should be able to handle this kind of graphics.


Best regards and welcome to the board
Thorsten
Post Reply