[l2h] Cannot convert images in test sample file
Till A. Heilmann
Till A. Heilmann" <Till.Heilmann@stud.unibas.ch
Wed, 28 Nov 2001 14:22:40 +0100 (MET)
Hi everybody!
I feel kinda stupid because I asked the exact same
question a couple of weeks ago and still I can't solve
the problem.
My installation of LaTeX2HTML cannot convert images.
My specs are:
Windows NT 4.0 (SP6) in c:\winnt\
MiKTeX 2.1 in c:\programs\texmf\
Netpbm 9.20 in c:\programs\netpbm\bin\
Ghostscript 7.03 in c:\programs\gs\gs7.03
GSview 4.0 in c:\programs\gsview\
LaTeX2HTML-2K.1beta in c:\l2h\
Configuration (with prefs.pm and configure.bat) went
fine (see contents of config.log below), but the
processing of the test sample keeps
failing (see contents of test.log below).
When I first encountered the problem it was suggested
to either up- or downgrade netpbm as its version 9.19
was considered to be at the core of all the trouble. I
tried both, neither worked.
So I guess that netpbm isn't the bad guy in itself.
Obviously the problem is that pstoimg.bat cannot run
the netpbm executables:
content of test.log
========================================================
AFPL Ghostscript 7.03 (2001-10-20)
Copyright (C) 2001 artofcode LLC, Benicia, CA. All
rights reserved.
This software comes with NO WARRANTY: see the file
PUBLIC for details.
GS>GS>>>showpage, press <return> to continue<<
GS>>>showpage, press <return> to continue<<
GS>Running "\programs\netpbm\bin\pnmcrop.exe -verbose
< C:\TEMP\l2h173\p158.pnm > C:\TEMP\l2h173\p158.t01"
pstoimg.bat: Error: "\programs\netpbm\bin\pnmcrop.exe -
verbose < C:\TEMP\l2h173\p158.pnm > C:\TEMP\l2h173
\p158.t01" failed: No such file or directory
Error while converting image
Error: Cannot read 'img2.png': No such file or directory
========================================================
Running the command
\programs\netpbm\bin\pnmcrop.exe -verbose <
C:\TEMP\l2h173\p158.pnm > C:\TEMP\l2h173\p158.t01
manually on the console works fine. It's the
combination of pstoimg.bat, Ghostscript and netpbm that
doesn't.
Well, any ideas how to solve this?
Thanks to all of you in advance,
Till Andreas Heilmann.
prefs.pm
========================================================
========
package prefs;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(%prefs);
%prefs = ();
# When executables are specified, you may give either
only the name of the
# executable (e.g. 'dvips'), the configuration then
searches your system for
# the program. Or you may give a complete path.
# On DOS/Windows platforms you need not specify the
extension (e.g. '.exe').
# You may specify multiple executable names, separated
by commas ','.
# PLEASE SET THE PERL EXECUTABLE NAME ON THE COMMAND
LINE OR IN
# CONFIG.BAT IF IT DIFFERS FROM 'perl'!!!
# Specify any additional search paths here, use `:' or
`;´ as delimiter
$prefs{'EXTRAPATH'}
= '\\programs\\netpbm\\bin;\\programs\\texmf\\miktex\\bi
n';
# This is where the installation will take place. On
UNIXish systems
# $prefs{'PREFIX'} = '/usr/local';
# is preferred. On DOS/Win, you might say;
$prefs{'PREFIX'} = '\\programs\\latex2html';
# $prefs{'PREFIX'} = '/usr/local';
# The following are derived from PREFIX if empty:
BINDIR by adding /bin, and
# LIBDIR by adding /lib or /lib/latex2html, depending
on whether PREFIX
# contains l2h or latex2html (case insensitive!),
respectively.
# But you may specify something completely different,
of course :-)
$prefs{'BINDIR'} = '';
$prefs{'LIBDIR'} = '';
# If set, only a short wrapper script is build that is
going to be installed
# in BINDIR. This wrapper inludes the latex2html
script, that is kept in
# LIBDIR
$prefs{'WRAPPER'} = 'no';
# If set, a special configuration is used to build a
LaTeX2HTML that fits
# on the TeXlive cdrom. Only for experts :-)
$prefs{'TEXLIVE'} = 'no';
# This is how the LaTeX2HTML icons can be accessed from
your HTTP server.
# It must be a valid URL on the server you are going to
put your converted
# documents. Examples:
# Relative: /icons/latex2html
# Absolute: http://myserver.net/icons
# Note that this setting should be consistent with the
following
# setting ICONSTORAGE.
# If left empty, an appropriate file: URL is assumed.
This will show
# the icons o.k. on your local host, but won't work
across the Web.
$prefs{'ICONPATH'} = '';
# This is the directory where the icons have to be
copied so that they
# can be accessed with the path given above. Keep this
empty if you do
# not want the icons to be installed in your Web server
area.
# However, the icons are installed in LIBDIR/icons, no
matter what.
$prefs{'ICONSTORAGE'} = '';
# set this to no if you do not want any image
generation by LaTeX2HTML
$prefs{'IMAGES'} = 'yes';
# TeX and friends
#
# LaTeX and other executables of the TeX typesetting
suite are needed to
# render parts of the documents that cannot be
translated to HTML in a
# consistent way. If you don't have LaTeX, LaTeX2HTML
will run anyway,
# but with reduced capabilities.
# the TeX executable
$prefs{'TEX'} = 'tex';
# the LaTeX executable
# needed for image generation
$prefs{'LATEX'} = 'latex';
# the initex executable
$prefs{'INITEX'} = 'initex';
# the kpsewhich (part of Web2C) executable. If it is
found, we have
# Web2C
$prefs{'KPSEWHICH'} = 'kpsewhich';
$prefs{'WEB2C'} = 0;
# the root directory for TeX include files, e.g.
# /usr/lib/texmf/tex. If KPSEWHICH is found, this path
is determined
# automatically (using KPSEWHICH -p tex).
# The LaTeX2HTML specific files are installed in
# $TEXPATH(/latex)/latex2html ( /latex added only if it
exists )
# You may also specify this with the --with-texpath=
configure option.
# This setting overrides the automatic selection.
$prefs{'TEXPATH'} = '\\programs\\texmf\\tex';
# the "mktexlsr" update utility. This is needed to
build the TeX file
# searching database (aka ls-R) after adding new style
files
# This tool is automatically invoked after successful
installation of
# the LaTeX2HTML style files (e.g. html.sty)
$prefs{'MKTEXLSR'}
= '\\programs\\texmf\\miktex\\bin\\initexmf -u';
# The dvips executable and its features. dvips32 added
for OS/2
$prefs{'DVIPS'} = 'dvips,dvi2ps,dvips32';
# set this to 1 if you want dvips to create special
fonts for better
# image generation. You need to set the following two
items to correct
# values then, i.e. the driver with the given DPI must
be available.
# To enable this option, set it to 1.
$prefs{'PK'} = 0;
# The MetaFont mode to use and its resolution. Common
settings are
# toshiba(180), hppost(180)???
$prefs{'METAMODE'} = 'toshiba';
$prefs{'METADPI'} = 180;
# Set this to 0 if you do not want dvips to create EPS
files even if
# it is capable to
$prefs{'EPS'} = 1;
# This must be set to 1 when your DVIPS reverses the
order
# of output pages. Rarely needed. Try 0 first.
$prefs{'REVERSE'} = 0;
# Try to implement GIF image support. Set to 0 if you
want
# to disable GIF support even if possible.
$prefs{'GIF'} = 1;
# Try to implement PNG image support. Set to 0 if you
want
# to disable PNG support even if possible.
$prefs{'PNG'} = 1;
# Ghostscript
# this is one of the crucial points. Use the most
recent version of gs
# available. Versions known to work well are 3.33 and
4.03
# the Ghostscript executable
# set name depending on platform
if($::newcfg{'plat'} eq 'os2') {
$prefs{'GS'} = 'gsos2';
}
elsif($::newcfg{'plat'} eq 'win32') {
$prefs{'GS'} = '\\programs\\gs\\gs7.03
\\bin\\gswin32c';
}
else {
$prefs{'GS'} = 'gs';
}
# the Ghostscript device to use for regular conversion
to portable
# bitmap format. The recommended device is pnmraw.
ppmraw is ok, too but
# produces bigger intermediate files.
# The most suitable and available device is chosen
automatically.
# Specify it here if you want to use a specific one.
$prefs{'GSDEVICE'} = '';
# the Ghostscript device to use for conversion of LaTeX
images, e.g.
# formulas. Anti-aliasing is used then to give better
images. Therefore
# a full color or full grey device is recommended
(ppmraw, pgmraw)
# The most suitable and available device is chosen
automatically.
# Specify it here if you want to use a specific one.
$prefs{'GSALIASDEVICE'} = '';
# the Netpbm utilities
# most of them are needed badly to create images.
# the pnmcrop executable needed for cropping of bitmaps
$prefs{'PNMCROP'} = 'pnmcrop';
# the pnmflip executable needed for flipping and
rotating bitmaps
$prefs{'PNMFLIP'} = 'pnmflip';
# the ppmquant executable needed for limiting the
number of colors
$prefs{'PPMQUANT'} = 'ppmquant';
# the pnmfile executable needed for determining bitmap
properties
$prefs{'PNMFILE'} = 'pnmfile';
# the pnmcat executable needed for concatenating of
bitmaps
$prefs{'PNMCAT'} = 'pnmcat';
# the pbmmake executable needed for creation of
alignment bitmaps
$prefs{'PBMMAKE'} = 'pbmmake';
# the ppmtogif executable needed for creation of GIF
images
$prefs{'PPMTOGIF'} = 'ppmtogif,ppm2gif';
# the following is part of a separate package. Use at
least
# the one from pnmtopng-2.31
# the pnmtopng executable needed for creation of PNG
images
$prefs{'PNMTOPNG'} = 'pnmtopng,pnm2png';
# if the Netpbm utility ppmtogif lack certain features
(the most
# recent version of Netpbm is ok), the following
utilities will
# be useful:
# the giftool executable needed for making GIFs
interlaced and/or
# transparent
$prefs{'GIFTOOL'} = 'giftool';
# the giftrans executable needed for making GIFs
transparent
$prefs{'GIFTRANS'} = 'giftrans';
# to speed things up, pstoimg issues piped commands.
This may fail on
# some systems. On unsafe systems, this is
automatically set to 0.
# Say 1 for pipe usage and 0 for no pipes.
$prefs{'PIPES'} = 1;
# if this is true, then the config procedure saves the
absolute pathnames
# of the external programs in the perl scripts. This is
necessary if
# running in an environment where e.g. gs is not always
in the PATH
# environment. On the other hand, if this option is
disabled, you can move
# the external tools around your filesystems and
LaTeX2HTML will keep
# working without reconfiguration as long as the
programs can be reached
# through PATH.
# The default is 1 for historical reasons. You can
switch it of by saying
# --disable-paths when using configure.
$prefs{'ABSPATHS'} = 1;
# this is the path to a temporary disk space area. If
the area is a ram
# drive, this setting may speed up image conversion.
The following standard
# paths are checked on the respective platforms:
# UNIX : /tmp /usr/tmp /var/tmp /usr/local/tmp
# DOS/Windows : C:\TMP C:\TEMP C:\WINDOWS\TEMP
$prefs{'TMPSPACE'} = '';
# The location of the rgb.txt color definition file. If
omitted, the
# file that comes with the LaTeX2HTML distribution is
used.
$prefs{'RGB'} = '';
# The location of the crayola.txt color definition
file. If omitted, the
# file that comes with the LaTeX2HTML distribution is
used.
$prefs{'CRAYOLA'} = '';
# The names of HTML validators to look for on the
system. Note: These
# tools should accept a single HTML filename as
argument.
$prefs{'HTML_VALIDATOR'} = 'html4-check';
###########################################
# no need to edit anything below this line
sub get_preferences {
return %prefs;
}
1; # make require happy. DO NOT DELETE THIS LAST LINE!
config.log
========================================================
========
config.pl, Release 2K.1beta (Revision 1.36)
Accompanies LaTeX2HTML, (C) 1999 GNU Public License.
checking for old config file (cfgcache.pm)... not found
(ok)
checking for platform... MSWin32 (Windows 32 bit)
checking for C:\Programs\Perl\bin\Perl.exe...
C:\Programs\Perl\bin\Perl.exe
checking perl version... 5.006001
checking if perl supports some dbm... yes
checking if perl globbing works... yes
checking for tex... \programs\texmf\miktex\bin\tex.exe
checking for latex...
\programs\texmf\miktex\bin\latex.exe
checking for initex...
\programs\texmf\miktex\bin\initex.exe
checking for kpsewhich...
\programs\texmf\miktex\bin\kpsewhich.exe
checking for kpsewhich syntax... ok (style=1)
checking for TeX include path... \programs\texmf\tex
checking for \programs\texmf\miktex\bin\initexmf...
\programs\texmf\miktex\bin\initexmf.exe
checking for dvips...
\programs\texmf\miktex\bin\dvips.exe
checking dvips version... 5.86
checking if dvips supports the combination of -E and -
i -S 1... yes
checking for html4-check... no
checking for \programs\gs\gs7.03\bin\gswin32c...
\programs\gs\gs7.03\bin\gswin32c.exe
checking for ghostscript version... 7.03
checking for ghostscript portable bitmap device...
pnmraw
checking for full color device for anti-aliasing...
ppmraw
checking for ghostscript library and font paths...
built-in paths are correct
checking for pnmcrop... \programs\netpbm\bin\pnmcrop.exe
yes
checking for pnmflip... \programs\netpbm\bin\pnmflip.exe
checking for ppmquant...
\programs\netpbm\bin\ppmquant.exe
checking for pnmfile... \programs\netpbm\bin\pnmfile.exe
checking for pnmcat... \programs\netpbm\bin\pnmcat.exe
checking for pbmmake... \programs\netpbm\bin\pbmmake.exe
checking for ppmtogif...
\programs\netpbm\bin\ppmtogif.exe
yes
checking if ppmtogif can make interlaced GIFs... yes
checking for pnmtopng...
\programs\netpbm\bin\pnmtopng.exe
checking if multiple pipes work... no
Unfortunately multiple pipes are not reliable on this
OS.
checking for temporary disk space... C:\TEMP
creating cfgcache.pm
creating test.bat
creating install.bat
Note: Will install...
... executables to : C:\programs\latex2html\bin
... library items to : C:\programs\latex2html
test.log
========================================================
========
... checking latex2html
... checking texexpand
... checking pstoimg
*** Running C:\l2h\latex2html.bat -test_mode
l2htest.tex
This is LaTeX2HTML Version 2K.1beta (1.56)
by Nikos Drakos, Computer Based Learning Unit,
University of Leeds.
Revised and extended by:
Marcus Hennecke, Ross Moore, Herb Swan and others
...producing markup for HTML version 3.2
Loading C:\l2h\versions\html3_2.pl
*** processing declarations ***
Loading C:\l2h\versions\latin1.plStarting at 1006951882
seconds
OPENING C:\l2h\tests\l2htest.tex
Note: Working directory is C:\l2h\tests\l2htest
Note: Images will be generated in C:\TEMP\l2h173
Loading C:\l2h\styles\texdefs.perl...
Loading C:\l2h\styles\article.perl
Reading ...
++
@@@
Doing .\basic.tex
%%%
*** opening brace #27 is unmatched ***
preceding: \Large Large and {\bf boldface
*** opening brace #28 is unmatched ***
preceding: \bf boldface
Processing macros ...++
@@@@@@@@@@@@@@@@@@@@
Doing .\basicinc.tex
%%%
*** matching brace #28 found ***
*** matching brace #27 found ***
Processing macros ...++
@@@@@@@@@@@
Doing .\formulas.tex
%%
Processing macros ...++
@@@
Translating ...
0/6:top of l2htest:"LaTeX2HTML Test Document" for
l2htest.html
*** translating preamble ***
....
*** preamble done ***
;;.
1/6:section:.."Some basic stuff" for node1.html
;..;
2/6:subsection:..."Fonts" for node2.html
;.......................;..
3/6:subsection:..."Lists" for node3.html
;.,..,..;.
4/6:subsection:..."Table" for node4.html
;..,..;.
5/6:section:.."Mathematic formulas" for node5.html
;.,.,;..
6/6:sectionstar:.."About this document ..." for
node6.html
;;.
Writing image file ...
\programs\texmf\miktex\bin\latex.exe ./images.tex
This is TeX, Version 3.14159 (MiKTeX 2.1)
(./images.tex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for english,
french, german, ngerman, du
mylang, nohyphenation, loaded.
(C:\Programs\texmf\tex\latex\base\article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX
document class
(C:\Programs\texmf\tex\latex\base\size10.clo))
(C:\Programs\texmf\tex\latex\base\ifthen.sty)
(C:\Programs\texmf\tex\latex\graphics\color.sty
(C:\Programs\texmf\tex\latex\00miktex\color.cfg)
(C:\Programs\texmf\tex\latex\graphics\dvips.def)
(C:\Programs\texmf\tex\latex\graphics\dvipsnam.def))
(C:\Programs\texmf\tex\latex\base\inputenc.sty)
No file images.aux.
latex2htmlLength hsize=349.0pt
latex2htmlLength vsize=633.0pt
latex2htmlLength hoffset=0.0pt
latex2htmlLength voffset=0.0pt
latex2htmlLength topmargin=0.0pt
latex2htmlLength topskip=0.00003pt
latex2htmlLength headheight=0.0pt
latex2htmlLength headsep=0.0pt
latex2htmlLength parskip=0.0pt plus 1.0pt
latex2htmlLength oddsidemargin=62.0pt
latex2htmlLength evensidemargin=62.0pt
l2hSize :displaymath105:13.77855pt::0.0pt::349.0pt.
[1]
l2hSize :tex2html_wrap_inline107:10.59451pt::10.59451pt:
:85.6146pt.
[2] (images.aux) )
Output written on images.dvi (2 pages, 880 bytes).
Transcript written on images.log.
*** processing 2 images ***
Generating postscript images using dvips ...
\programs\texmf\miktex\bin\dvips.exe -S1 -i -E -
oC:\TEMP\l2h173\image .\images.dvi
Converting image #1
pstoimg.bat V2K.1beta (Revision 1.15, Perl 5.006001)
pstoimg.bat: Temporary directory is C:\TEMP\l2h173
pstoimg.bat: Processing C:\TEMP\l2h173\image001.ps
pstoimg.bat: EPSF dimensions are 211x19
pstoimg.bat: Running \programs\gs\gs7.03
\bin\gswin32c.exe -sDEVICE=ppmraw -g338x31 -r115 -
dTextAlphaBits=4 -sOutputFile=C:\TEMP\l2h173\p160.pnm
GS>-133 -702 translate
GS>(C:/TEMP/l2h173/image001.ps) run
GS>showpage
GS>quit
AFPL Ghostscript 7.03 (2001-10-20)
Copyright (C) 2001 artofcode LLC, Benicia, CA. All
rights reserved.
This software comes with NO WARRANTY: see the file
PUBLIC for details.
GS>GS>>>showpage, press <return> to continue<<
GS>>>showpage, press <return> to continue<<
GS>Running "\programs\netpbm\bin\pnmcrop.exe -verbose
< C:\TEMP\l2h173\p160.pnm > C:\TEMP\l2h173\p160.t01"
pstoimg.bat: Error: "\programs\netpbm\bin\pnmcrop.exe -
verbose < C:\TEMP\l2h173\p160.pnm > C:\TEMP\l2h173
\p160.t01" failed: No such file or directory
Error while converting image
Error: Cannot read 'img1.png': No such file or directory
Converting image #2
pstoimg.bat V2K.1beta (Revision 1.15, Perl 5.006001)
pstoimg.bat: Temporary directory is C:\TEMP\l2h173
pstoimg.bat: Processing C:\TEMP\l2h173\image002.ps
pstoimg.bat: EPSF dimensions are 90x28
pstoimg.bat: Running \programs\gs\gs7.03
\bin\gswin32c.exe -sDEVICE=ppmraw -g144x45 -r115 -
dTextAlphaBits=4 -sOutputFile=C:\TEMP\l2h173\p158.pnm
GS>-133 -693 translate
GS>(C:/TEMP/l2h173/image002.ps) run
GS>showpage
GS>quit
AFPL Ghostscript 7.03 (2001-10-20)
Copyright (C) 2001 artofcode LLC, Benicia, CA. All
rights reserved.
This software comes with NO WARRANTY: see the file
PUBLIC for details.
GS>GS>>>showpage, press <return> to continue<<
GS>>>showpage, press <return> to continue<<
GS>Running "\programs\netpbm\bin\pnmcrop.exe -verbose
< C:\TEMP\l2h173\p158.pnm > C:\TEMP\l2h173\p158.t01"
pstoimg.bat: Error: "\programs\netpbm\bin\pnmcrop.exe -
verbose < C:\TEMP\l2h173\p158.pnm > C:\TEMP\l2h173
\p158.t01" failed: No such file or directory
Error while converting image
Error: Cannot read 'img2.png': No such file or directory
Doing section links ................
*** Adding document-specific styles ***
*********** WARNINGS ***********
Failed to convert image C:\TEMP\l2h173\image001.ps
Failed to convert image C:\TEMP\l2h173\image002.ps
To resolve the image conversion problems please consult
the "Troubleshooting" section of your local User Manual
or follow the links to it at
http://www-
math.mpce.mq.edu.au/texdev/LaTeX2HTML/docs/manual/
Unknown commands: basicinc formulas
Done.
To view the results, point your browser at:
file:///C|/l2h/tests/l2htest/index.html
Timing: 11 seconds