Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295012 - media-libs/netpbm: pnmtopng fails without X11 rgb.txt file (was: dev-tex/latex2html-2008 fails when creating images from math formulas)
Summary: media-libs/netpbm: pnmtopng fails without X11 rgb.txt file (was: dev-tex/late...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor with 1 vote (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-29 01:27 UTC by Merlijn Wajer
Modified: 2010-07-09 11:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Merlijn Wajer 2009-11-29 01:27:06 UTC
dex-tex/latex2html fails to create (png) images from math formula's in \LaTeX.
For example: $a = 2$

I have a fix, see Additional Information.

Reproducible: Always

Steps to Reproduce:
1. Call latex2html on a .tex file that contains math formulas
2. Math formula images are not produced.
Actual Results:  
Image is not produced

Expected Results:  
Image is produced correctly

This was all tested on ARM, Sheevaplug Developers edition. But I think it also applies to other architectures.

Fix is quite simple. I ran latex2html with -debug, and it printed this error:
-------------
pnmtopng: can't open color names dictionary file named /usr/lib/X11/rgb.txt, /usr/share/X11/rgb.txt, or /usr/X11R6/lib/X11/rgb.txt and Environment variable RGBDEF not set.  Set RGBDEF to the pathname of your rgb.txt file or don't use color names.
-------------

I located rgb.tex, and used ``export'' to temporarily set RGBDEF to the right path; (export RGBDEF="/usr/lib/latex2html/styles/rgb.txt")

This fixed the issue. But only temporarily ofcourse.

On another note, I have no X installed, so this may also be the source of the problem, as their debug message suggests, it only searches in X11 folders.

$ locate rgb.txt
/usr/lib/latex2html/styles/rgb.txt
/usr/share/netpbm/rgb.txt


So I have found a workaround/fix, but I don't know what the best way would be to apply it.
Comment 1 Alexis Ballier gentoo-dev 2010-06-12 16:29:42 UTC
nothing to do with latex2html; pnmtopng belongs to netbpm

could you please check this still happens with latest netpbm?
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-07-08 03:16:13 UTC
x11-apps/rgb provides this file, and it doesn't depend on X11, only x11-proto/xproto package which is basically just headers

perhaps netpbm should simply depend on x11-apps/rgb ?
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-07-09 11:11:12 UTC
media-libs/netpbm-10.49.00 (/usr/share/netpbm/rgb.txt)

and in netpbm sources:

pm_config.in.h:"/usr/share/netpbm/rgb.txt:" \

and tested pngtopnm & pnmtopng -> works great