[OS X TeX] dvipng color trouble

"mitcho (Michael 芳貴 Erlewine)" mitcho at mitcho.com
Wed May 23 07:07:25 CEST 2007


Hi all,

I've recently run into what I believe is a rare bug in dvipng: here's  
the setup. (To play along, you can get my test files: http://mitcho.com/discolor.zip 
  .) I am using MacTeX... in fact, it's today's release.

The LaTeX source file (discolored.tex) loads just two packages: color  
and graphicx. The body does two things: an \includegraphics with a  
local PNG file (with the bb option to specify the BoundingBox  
explicitly) and a \textcolor command introducing some green text,  
using the green defined there.

pdflatex produces the expected result: the figure and the green text.  
But when you run the following commands...

latex discolored.tex
dvipng -D 200 discolored.tex

you get a PNG (discolored1.png) which shows the text in a brownish  
color... the green is gone!!

There are two quick ways to fix this that I've found: one is to not  
include the image... if you comment the \includegraphics command out,  
the color comes out fine. The second is to not specify a -D (output  
resolution) parameter in the dvipng... this also gives you the  
expected output. However, in my current project, neither of these are  
available options...

I am frankly not very familiar with the inner workings of dvipng...  
does anyone have any thoughts? Can this bug be reproduced?

Any hints or suggestions are welcome!

mitcho

--
mitcho (Michael 芳貴 Erlewine)
The Academic Approach, theacademicapproach.com
University of Chicago, Departments of Linguistics and Mathematics
mitcho at mitcho.com
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list