3

I think I am trying nothing unusual: I just want to use \includegraphics to include .png and .jpg files. But for some reason all my figures are in grayscale, which is not what I want.

MWE:

\documentclass[12pt,A4,final]{report}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}   
\usepackage{amsfonts}    
\usepackage{amssymb}    
\usepackage{bmpsize}    
\usepackage{grffile}    
\usepackage{graphicx}    
\usepackage{setspace}    
\usepackage{float}    
\usepackage[nottoc]{tocbibind}
\usepackage[]{mcode}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

\begin{document}

\begin{figure}[H]
   \begin{center}
      \includegraphics[width=0.7\textwidth,natwidth=931bp,natheight=502bp]{Construction.png}
   \end{center}
   \caption[Components of setup ]{Components of setup. .... }
   \label{fig: Model: RealSetup}
\end{figure}

\end{document}

Any ideas? (.m-Code is colored appropriately)

 *File List*   
  report.cls    2007/10/19 v1.4h Standard LaTeX document class  
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)  
inputenc.sty    2008/03/30 v1.1d Input encoding file  
  latin1.def    2008/03/30 v1.1d Input encoding file  
 amsmath.sty    2000/07/18 v2.13 AMS math features  
 amstext.sty    2000/06/29 v2.01  
  amsgen.sty    1999/11/30 v2.0  
  amsbsy.sty    1999/11/29 v1.2d  
  amsopn.sty    1999/12/14 v2.01 operator names  
amsfonts.sty    2009/06/22 v3.00 Basic AMSFonts support  
 amssymb.sty    2009/06/22 v3.00  
 bmpsize.sty    2009/09/04 v1.6 Extract size and resolution data from bitmap fi
les (HO)  
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)  
pdftexcmds.sty    2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)  
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)  
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)  
 ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)  
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)  
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)  
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive  
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)  
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)  
bmpsize-base.sty    2009/09/04 v1.6 Basic part of bmpsize (HO)  
fp-basic.sty    1996/05/13  
 fp-snap.sty    1995/04/05  
bmpsize-dvips.def    2009/09/04 v1.6 Graphics bitmap driver for dvips (HO)  
 grffile.sty    2010/12/09 v1.13 Extended file name support for graphics (HO)  
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional  
kvoptions.sty    2010/12/23 v3.10 Keyval support for LaTeX options (HO)  
kvsetkeys.sty    2011/04/07 v1.13 Key value parser (HO)  
etexcmds.sty    2011/02/16 v1.5 Prefix for e-TeX command names (HO)  
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)  
setspace.sty    2011/12/19 v6.7a set line spacing  
   float.sty    2001/11/08 v1.3d Float enhancements (AL)  
tocbibind.sty    2010/10/13 v1.5k extra ToC listings  
egreg
  • 1,121,712
  • Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Tobi Oct 23 '14 at 22:14
  • And a side note: It is recommended to use \centering instead of {center} for figures (e.g.) because the latter add vertical space. See When should we use \begin{center} instead of \centering?. PS: I removed the blank lines form your MWE ;-) – Tobi Oct 23 '14 at 22:15
  • Do you have gray figures if you comment out the mcode package? – Peter Grill Oct 23 '14 at 22:24
  • Yes, it's the same problem – br41ivbug Oct 23 '14 at 22:24
  • Forgot to mention that the reason I asked if you get the same problem without mcode is that I don't have mcode, and commenting out that package results in the images being displayed in color in the PDF for me. Perhaps one of your package needs updating. I suggest adding \listfiles before \begin{document} and adding the version numbers of the various packages that are listed in the log file to the question here. – Peter Grill Oct 23 '14 at 22:37
  • There are no changes with or without activated mcode. \listfiles seems to do nothing for me. The help menu says: TeXstudio 2.5.2 (SVN 3661) Using Qt Version 4.8.1, compiled with Qt 4.8.1 R – br41ivbug Oct 23 '14 at 22:42
  • \listfiles won't change the PDF. Look at the console output or the log file for the list of files used and their versions. It doesn't matter what version of TeXstudio you have (so long as it works which it obviously does) as that is just an editor. – cfr Oct 23 '14 at 22:57
  • Mmh, is there a convenient way to post the whole output without breaking it down into 5 different comments? – br41ivbug Oct 23 '14 at 23:04

1 Answers1

1

I stumbled upon Why aren't my included graphics properly colored?. After changing the "Build&View"-Option to "PDF Chain" (in MikeTex) I have my much needed colors.