2

All my jpg images in LaTeX are coming out in black and white. Similar question here, but it doesn't seem to answer my question. I am using Texmaker and latex + dvips + sp2pdf + ViewPDF

Here is an example of my code:

 \documentclass[12pt,oneside,openany,a4paper,%..... Layout
           afrikaans, english,%.............. Global language selection
           ]{memoir}
 \usepackage{babel}%.............................. Language setup
\usepackage{graphicx}%........................... Graphicx loaded in usthesis


\begin{document}
\begin{figure}[!htb]
\centering
\includegraphics[width=0.8\textwidth,natwidth=831,natheight=812]{FourHeliostatsTry3.jpg}
\caption{Intersection and transformation of four heliostats}
\label{Ffourheliostats}
\end{figure}
\end{document}
Seb
  • 121
  • 2
  • Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – ChrisS Jul 26 '13 at 11:29
  • 1
    Do you have a particular reason for using latex -> dvips -> ps2pdf instead of just compiling with pdflatex? – Jake Jul 26 '13 at 11:37
  • @Jake - No. Thanks for reminding me. I had a problem a while back and blindly fiddling with the configuration settings helped. Just forgot to change it back. pdflatex also doesn't work – Seb Jul 26 '13 at 12:09
  • Hm, I can't reproduce that. Just to be sure, if you remove the afrikaans option, the problem persists? Also, what happens if you call pdflatex <document> from a console instead of through your editor? – Jake Jul 26 '13 at 12:40
  • I haven't got a high enough rep yet to post images. But I tried a couple of jpegs including ones I pulled form the net. note could it be the order of latex + dvips + sp2pdf + ViewPDF It seems to be the only thing that works. I also use MiKteX 2.9 and Windows 7 – Seb Jul 26 '13 at 12:59
  • @Seb: What editor are you using? Could you edit your question to include the .log file that's produced when you compile the document using pdflatex? – Jake Jul 26 '13 at 13:05
  • If I try pdflatex with the MWE and a JPG of my own [https://www.facebook.com/photo.php?fbid=10200702207178160&l=248b7fce92] FWIW, I get colour as expected. If I do latex -> dvips the ps is greyscale. If I do latex ->dvipdfm the pdf is in colour - so I suggest avoiding dvi2ps unless you really want ps – Chris H Jul 26 '13 at 13:18
  • Something similar has been asked before: Why aren't my included graphics properly colored? with similar issues around going through .ps, but I can't really believe that LaTeX -> DVI -> ps can't handle colour – Chris H Jul 26 '13 at 13:53
  • @ChrisH - That seems to sort it out latex->dvipdfm. I have no why idea LaTeX->DVI->PS doesn't work, but apparently it doesn't. Thank for the help! – Seb Jul 26 '13 at 14:42
  • @Seb: If the problem only appears with dvips, it's very likely that you need to use dvips -I c <filename> instead of just dvips <filename> (see http://www.win.tue.nl/latex/faq.html#q16). That wouldn't explain why it happens with pdflatex, though. – Jake Jul 26 '13 at 15:35

0 Answers0