Graphics, Figures & Tables'LaTeX -> PS' turns Images into b&w

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
DanP
Posts: 5
Joined: Sun Jun 19, 2011 8:17 pm

'LaTeX -> PS' turns Images into b&w

Post by DanP »

Hi,

I'm using TexnicCenter to write my thesis. Everything is working fine when I use the Latex -> DVI profile, but when I use Latex -> PS, all the figures turn black and white (they are all PNG images). I want to use the Latex -> PS profile because eventually I will want my thesis in pdf format, and I have issues running Latex -> PDF from TexnicCenter when using the graphicx package.

The same thing happens with a MWE as well, which I will include here.

Code: Select all

\documentclass[a4paper,oneside,12pt]{report}
\usepackage{graphicx}

\begin{document}

\begin{figure}
	\centering
		\includegraphics[bb = 0 0 407 300,width=0.4\textwidth]{../Images/JonesMAV.PNG}
		%\includegraphics[width=0.4\textwidth]{../Images/JonesMAV.PNG}
	\caption{Hybrid flapping-fixed wing MAV}
	\label{fig:JonesMAV}
\end{figure}

\end{document}

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: 'LaTeX -> PS' turns Images into b&w

Post by Stefan Kottwitz »

Hi Dan,

welcome to the board!
LaTeX -> PS doesn't directly support PNG images, you should use pdfLaTeX which supports that. This means using the LaTeX -> PDF output profile. If there are any problems with it, we could help you to solve that.

Stefan
LaTeX.org admin
DanP
Posts: 5
Joined: Sun Jun 19, 2011 8:17 pm

'LaTeX -> PS' turns Images into b&w

Post by DanP »

Stefan_K wrote:Hi Dan,

welcome to the board!
LaTeX -> PS doesn't directly support PNG images, you should use pdfLaTeX which supports that. This means using the LaTeX -> PDF output profile. If there are any problems with it, we could help you to solve that.

Stefan
Okay, thanks.

I had tried that but was hoping to avoid it because pdflatex doesn't seem to like the bounding box arguments in figures, whereas Latex -> DVI requires it. This just means whenever I create a figure I put in an extra \includegraphics line without the bb but comment it out. Then I'll go through at the end when I want to create a pdf and switch the comments to the other line. I was trying to avoid this difficulty by going Latex -> PS -> PDF.

Dan
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

'LaTeX -> PS' turns Images into b&w

Post by localghost »

DanP wrote:
Stefan_K wrote:[…] I had tried that but was hoping to avoid it because pdflatex doesn't seem to like the bounding box arguments in figures, whereas Latex -> DVI requires it. This just means whenever I create a figure I put in an extra \includegraphics line without the bb but comment it out. Then I'll go through at the end when I want to create a pdf and switch the comments to the other line. I was trying to avoid this difficulty by going Latex -> PS -> PDF. […]
Why do you need the bounding box at all? If you want to show only a particular area of the figure, take a look at the »clip« or »viewpoint« option. They are described in the graphicx manual.


Best regards and welcome to the board
Thorsten
DanP
Posts: 5
Joined: Sun Jun 19, 2011 8:17 pm

'LaTeX -> PS' turns Images into b&w

Post by DanP »

localghost wrote: Why do you need the bounding box at all? If you want to show only a particular area of the figure, take a look at the »clip« or »viewpoint« option. They are described in the graphicx manual.


Best regards and welcome to the board
Thorsten
When I use the Latex -> DVI output, if I don't include the bounding box with the PNG images I get errors. I just put [bb = 0 0 resx resy]. I guess I could just skip the DVI output altogether, but it's convenient because it's the only one that actually seems to work well within TeXnicCenter.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

'LaTeX -> PS' turns Images into b&w

Post by localghost »

I occasionally use TeXnicCenter (TXC) for testing purposes (Wind0ws is not my primary OS). All my profiles work flawlessly. You should not only tell us that you get errors. That is not helpful. Be precise and tell us exactly which errors occur. Build a complete minimal example that reproduces the error. Include an according PNG file to the source (*.tex) as well as the log (*.log). Put all together in a RAR or ZIP archive and upload it to the forum server (note the file size limit). As Stefan already mentioned, "LaTeX → DVI" usually doesn't accept the PNG format for external graphics files.


Thorsten
DanP
Posts: 5
Joined: Sun Jun 19, 2011 8:17 pm

'LaTeX -> PS' turns Images into b&w

Post by DanP »

localghost wrote:I occasionally use TeXnicCenter (TXC) for testing purposes (Wind0ws is not my primary OS). All my profiles work flawlessly. You should not only tell us that you get errors. That is not helpful. Be precise and tell us exactly which errors occur. Build a complete minimal example that reproduces the error. Include an according PNG file to the source (*.tex) as well as the log (*.log). Put all together in a RAR or ZIP archive and upload it to the forum server (note the file size limit). As Stefan already mentioned, "LaTeX → DVI" usually doesn't accept the PNG format for external graphics files.


Thorsten
Thank you for your help. I will probably do that, if I get a chance. For now I am happy enough, since it does work, it just takes a little more manual labor than I was hoping to get a proper DVI output and a proper PDF output.

Dan
Post Reply