1###############################################################################
2# $Id: prefs.pm,v 1.7 2002/04/28 12:21:51 RRM Exp $
3#
4# prefs.pm
5#
6# This file contains the preferences for the configuration procedure
7# of LaTeX2HTML.
8# You may modify this file to achieve a correct configuration on your
9# system. UNIX users may also use the usual syntax conventioons of
10# GNU configure to pass configuration parameters.
11#
12# Author: Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>
13#
14# This software is part of LaTeX2HTML, originally by Nikos Drakos
15# It is published under the GNU Public License and comes without any
16# warranty.
17#
18
19###############################################################################
20# Changes History
21#
22# $Log: prefs.pm,v $
23# Revision 1.7  2002/04/28 12:21:51  RRM
24#      variables $DVIPSOPT and $ICONSERVER are now configurable via  prefs.pm
25#
26# Revision 1.5  1999/11/09 00:43:42  MRO
27#
28#
29# -- added some changes suggested on the mail list recently: mainly cleanup
30#    of -dir option
31# -- added installation support for latex2html styles
32#
33# Revision 1.4  1999/08/26 23:33:42  MRO
34#
35# -- added option to load l2hcfg.pm from previous installation
36# -- fixed a bunch of bugs reported by Stefan Klupsch (thanks!)
37#
38# Revision 1.3  1999/06/10 22:59:59  MRO
39#
40#
41# -- fixed an artifact in the *ball icons
42# -- cleanups
43# -- option documentation added
44# -- fixed bug in color perl (determining path to rgb/crayola)
45#
46# Revision 1.2  1999/06/01 06:55:34  MRO
47#
48#
49# - fixed small bug in L2hos/*
50# - added some test_mode related output to latex2html
51# - improved documentation
52# - fixed small bug in pstoimg wrt. OS2
53#
54# Revision 1.1  1999/05/11 06:09:58  MRO
55#
56#
57# - merged config stuff, did first tries on Linux. Simple document
58#   passes! More test required, have to ger rid of Warnings in texexpand
59#
60# Revision 1.9  1999/05/05 19:47:02  MRO
61#
62#
63# - many cosmetic changes
64# - final backup before merge
65#
66# Revision 1.8  1998/12/12 16:39:14  MRO
67#
68#
69# -- cosmetic changes, reworked catching of STDERR in config.pl (Win32)
70# -- new configure opt --disable-paths
71# -- major cleanups
72#
73# Revision 1.7  1998/10/31 14:13:04  MRO
74# -- changed OS-dependent module loading strategy: Modules are now located in
75#    different (OS-specific) directories nut have the same name: Easier to
76#    maintain and cleaner code
77# -- Cleaned up config procedure
78# -- Extended makefile functionality
79#
80# Revision 1.6  1998/08/09 20:45:19  MRO
81# -- some cleanup
82#
83# Revision 1.5  1998/06/30 23:12:13  MRO
84# -- Reworked os dependency setup, mainly for TeXlive integration.
85#    Started wrapper coding.
86#
87# Revision 1.4  1998/05/14 22:27:36  latex2html
88# -- more work on config procedure (Makefile, GS_LIB)
89# -- tested pstoimg in 98.1 environment successfully on Linux
90#
91# Revision 1.3  1998/05/06 22:31:09  latex2html
92# -- Enhancements to the config procedure: Added a "generic" target
93#    in the Makefile for the TeXlive CD (not perfect yet)
94# -- included test for kpsewhich / Web2C
95# -- included latest stuff from Override.pm into os_*.pm
96#
97# Revision 1.2  1998/03/16 23:31:56  latex2html
98# -- lots of cosmetic changes and bugfixes, thanks to Uli Wortmann
99#    for OS/2 testing
100# -- start of install procedure; checks for installation paths implemented
101#
102# Revision 1.1  1998/03/02 23:38:39  latex2html
103# Reworked configuration procedure substantially. Fixed some killing bugs.
104# Should now run on Win32, too.
105# The file prefs.pm contains user-configurable stuff for DOS platforms.
106# UNIX users can override the settings with the configure utility (preferred).
107#
108
109package prefs;
110require Exporter;
111@ISA = qw(Exporter);
112@EXPORT = qw(%prefs);
113
114%prefs = ();
115
116# When executables are specified, you may give either only the name of the
117# executable (e.g. 'dvips'), the configuration then searches your system for
118# the program. Or you may give a complete path.
119# On DOS/Windows platforms you need not specify the extension (e.g. '.exe').
120# You may specify multiple executable names, separated by commas ','.
121
122# PLEASE SET THE PERL EXECUTABLE NAME  ON THE COMMAND LINE OR IN
123# CONFIG.BAT IF IT DIFFERS FROM 'perl'!!!
124
125# Specify any additional search paths here, use `:' or `;� as delimiter
126$prefs{'EXTRAPATH'} = '';
127
128# This is where the installation will take place. On UNIXish systems
129# $prefs{'PREFIX'} = '/usr/local';
130# is preferred. On DOS/Win, you might say
131# $prefs{'PREFIX'} = 'C:\\progs\\latex2html';
132$prefs{'PREFIX'} = '/usr/local';
133
134# The following are derived from PREFIX if empty: BINDIR by adding /bin, and
135# LIBDIR by adding /lib or /lib/latex2html, depending on whether PREFIX
136# contains l2h or latex2html (case insensitive!), respectively.
137# But you may specify something completely different, of course :-)
138$prefs{'BINDIR'} = '';
139$prefs{'LIBDIR'} = '';
140$prefs{'SHLIBDIR'} = '';
141
142# If set, only a short wrapper script is build that is going to be installed
143# in BINDIR. This wrapper inludes the latex2html script, that is kept in
144# LIBDIR
145$prefs{'WRAPPER'} = 'no';
146
147# If set, a special configuration is used to build a LaTeX2HTML that fits
148# on the TeXlive cdrom. Only for experts :-)
149$prefs{'TEXLIVE'} = 'no';
150
151# This is how the LaTeX2HTML icons can be accessed from your HTTP server.
152# It must be a valid URL on the server you are going to put your converted
153# documents. Examples:
154#   Relative: /icons/latex2html
155#   Absolute: http://myserver.net/icons
156# Note that this setting should be consistent with the following
157# setting ICONSTORAGE.
158# If left empty, an appropriate file: URL is assumed. This will show
159# the icons o.k. on your local host, but won't work across the Web.
160$prefs{'ICONPATH'} = '';
161
162# This is the directory where the icons have to be copied so that they
163# can be accessed with the path given above. Keep this empty if you do
164# not want the icons to be installed in your Web server area.
165# However, the icons are installed in SHLIBDIR/icons, no matter what.
166$prefs{'ICONSTORAGE'} = '';
167
168# Set a URL here, as the place to access icons from across the Web.
169# This does not have to be on the local server, or at a related site.
170$prefs{'ICONSERVER'} = '';
171
172# set this to no if you do not want any image generation by LaTeX2HTML
173$prefs{'IMAGES'} = 'yes';
174
175# TeX and friends
176#
177# LaTeX and other executables of the TeX typesetting suite are needed to
178# render parts of the documents that cannot be translated to HTML in a
179# consistent way. If you don't have LaTeX, LaTeX2HTML will run anyway,
180# but with reduced capabilities.
181
182# the TeX executable
183$prefs{'TEX'} = 'tex';
184
185# the LaTeX executable
186# needed for image generation
187$prefs{'LATEX'} = 'latex';
188
189# the initex executable
190$prefs{'INITEX'} = 'initex';
191
192# the kpsewhich (part of Web2C) executable. If it is found, we have
193# Web2C
194$prefs{'KPSEWHICH'} = 'kpsewhich';
195$prefs{'WEB2C'} = 0;
196
197# the root directory for TeX include files, e.g.
198# /usr/lib/texmf/tex. If KPSEWHICH is found, this path is determined
199# automatically (using KPSEWHICH -p tex).
200# The LaTeX2HTML specific files are installed in
201# $TEXPATH(/latex)/latex2html ( /latex added only if it exists )
202# You may also specify this with the --with-texpath= configure option.
203# This setting overrides the automatic selection.
204$prefs{'TEXPATH'} = '';
205
206# the "mktexlsr" update utility. This is needed to build the TeX file
207# searching database (aka ls-R) after adding new style files
208# This tool is automatically invoked after successful installation of
209# the LaTeX2HTML style files (e.g. html.sty)
210$prefs{'MKTEXLSR'} = 'mktexlsr,texhash,MakeTeXlsR';
211
212# The dvips executable and its features. dvips32 added for OS/2
213$prefs{'DVIPS'} = 'dvips,dvi2ps,dvips32';
214
215# Many options can be used with dvips to produce better quality images
216# or speed-up other aspects of image-generation.
217# $prefs{'DVIPSOPT'} = ' -E';  # create encapsulated (EPS) images
218# $prefs{'DVIPSOPT'} = ' -Ppdf'; # use Type 1 fonts, as for PDF
219# $prefs{'DVIPSOPT'} = ' -Pcmz -Pamz'; # use CM and AMS Type 1 fonts
220$prefs{'DVIPSOPT'} = ' -Ppdf';
221
222# set this to 1 if you want dvips to create special fonts for better
223# image generation. You need to set the following two items to correct
224# values then, i.e. the driver with the given DPI must be available.
225# To enable this option, set it to 1.
226$prefs{'PK'} = 0;
227
228# The MetaFont mode to use and its resolution. Common settings are
229# toshiba(180), hppost(180)???
230$prefs{'METAMODE'} = 'toshiba';
231$prefs{'METADPI'} = 180;
232
233# Set this to 0 if you do not want dvips to create EPS files even if
234# it is capable to
235$prefs{'EPS'} = 1;
236
237# This must be set to 1 when your DVIPS reverses the order
238# of output pages. Rarely needed. Try 0 first.
239$prefs{'REVERSE'} = 0;
240
241# Try to implement GIF image support. Set to 0 if you want
242# to disable GIF support even if possible.
243$prefs{'GIF'} = 1;
244
245# Try to implement PNG image support. Set to 0 if you want
246# to disable PNG support even if possible.
247$prefs{'PNG'} = 1;
248
249# Ghostscript
250# this is one of the crucial points. Use the most recent version of gs
251# available. Versions known to work well are 3.33 and 4.03
252
253# the Ghostscript executable
254# set name depending on platform
255if($::newcfg{'plat'} eq 'os2') {
256  $prefs{'GS'} = 'gsos2';
257}
258elsif($::newcfg{'plat'} eq 'win32') {
259  $prefs{'GS'} = 'gswin32c';
260}
261else {
262  $prefs{'GS'} = 'gs';
263}
264
265# the Ghostscript device to use for regular conversion to portable
266# bitmap format. The recommended device is pnmraw. ppmraw is ok, too but
267# produces bigger intermediate files.
268# The most suitable and available device is chosen automatically.
269# Specify it here if you want to use a specific one.
270$prefs{'GSDEVICE'} = '';
271
272# the Ghostscript device to use for conversion of LaTeX images, e.g.
273# formulas. Anti-aliasing is used then to give better images. Therefore
274# a full color or full grey device is recommended (ppmraw, pgmraw)
275# The most suitable and available device is chosen automatically.
276# Specify it here if you want to use a specific one.
277$prefs{'GSALIASDEVICE'} = '';
278
279# the Netpbm utilities
280# most of them are needed badly to create images.
281
282# the pnmcrop executable needed for cropping of bitmaps
283$prefs{'PNMCROP'} = 'pnmcrop';
284
285# the pnmflip executable needed for flipping and rotating bitmaps
286$prefs{'PNMFLIP'} = 'pnmflip';
287
288# the ppmquant executable needed for limiting the number of colors
289$prefs{'PPMQUANT'} = 'ppmquant';
290
291# the pnmfile executable needed for determining bitmap properties
292$prefs{'PNMFILE'} = 'pnmfile';
293
294# the pnmcat executable needed for concatenating of bitmaps
295$prefs{'PNMCAT'} = 'pnmcat';
296
297# the pnmcut executable needed for extracting a portion of bitmaps
298$prefs{'PNMCUT'} = 'pnmcut';
299
300# the pnmpad extending bitmaps by padding with pixels of a fixed color
301$prefs{'PNMPAD'} = 'pnmpad';
302
303# the pbmrotate executable needed for rotating bitmaps
304$prefs{'PNMROTATE'} = 'pnmrotate';
305
306# the pbmscale executable needed for scaling bitmaps
307$prefs{'PNMSCALE'} = 'pnmscale';
308
309# the pbmmake executable needed for creation of alignment bitmaps
310$prefs{'PBMMAKE'} = 'pbmmake';
311
312# the ppmtogif executable needed for creation of GIF images
313$prefs{'PPMTOGIF'} = 'ppmtogif,ppm2gif';
314
315# the ppmtojpeg executable for constructing JPEG images from portable bitmaps
316$prefs{'PPMTOJPEG'} = 'ppmtojpeg';
317
318# the following is part of a separate package. Use at least
319# the one from pnmtopng-2.31
320
321# the pnmtopng executable needed for creation of PNG images
322$prefs{'PNMTOPNG'} = 'pnmtopng,pnm2png';
323
324# the giftopnm executable for converting GIF images to portable form
325$prefs{'GIFTOPNM'} = 'giftopnm';
326
327# the jpegtopnm executable for converting JPEG images to portable form
328$prefs{'JPEGTOPNM'} = 'jpegtopnm';
329
330# the pngtopnm executable for converting PNG images to portable form
331$prefs{'PNGTOPNM'} = 'pngtopnm';
332
333# the tifftopnm executable for converting TIFF images to portable form
334$prefs{'TIFFTOPNM'} = 'tifftopnm';
335
336# the picttoppm executable for converting PICT images to portable form
337$prefs{'PICTTOPPM'} = 'picttoppm';
338
339# the anytopnm executable for converting arbitrary images to portable form
340$prefs{'ANYTOPNM'} = 'anytopnm';
341
342# the bmptoppm executable for converting BMP images to portable form
343$prefs{'BMPTOPPM'} = 'bmptoppm';
344
345# the pcxtoppm executable for converting PCX images to portable form
346$prefs{'PCXTOPPM'} = 'pcxtoppm';
347
348# the sgitopnm executable for converting SGI images to portable form
349$prefs{'SGITOPNM'} = 'sgitopnm';
350
351# the xbmtopbm executable for converting PBM images to portable form
352$prefs{'XBMTOPBM'} = 'xbmtopbm';
353
354# the xwdtopnm executable for converting XWD images to portable form
355$prefs{'XWDTOPNM'} = 'xwdtopnm';
356
357# if the Netpbm utility ppmtogif lack certain features (the most
358# recent version of Netpbm is ok), the following utilities will
359# be useful:
360
361# the giftool executable needed for making GIFs interlaced and/or
362# transparent
363$prefs{'GIFTOOL'} = 'giftool';
364
365# the giftrans executable needed for making GIFs transparent
366$prefs{'GIFTRANS'} = 'giftrans';
367
368# to speed things up, pstoimg issues piped commands. This may fail on
369# some systems. On unsafe systems, this is automatically set to 0.
370# Say 1 for pipe usage and 0 for no pipes.
371$prefs{'PIPES'} = 1;
372
373# if this is true, then the config procedure saves the absolute pathnames
374# of the external programs in the perl scripts. This is necessary if
375# running in an environment where e.g. gs is not always in the PATH
376# environment. On the other hand, if this option is disabled, you can move
377# the external tools around your filesystems and LaTeX2HTML will keep
378# working without reconfiguration as long as the programs can be reached
379# through PATH.
380# The default is 1 for historical reasons. You can switch it of by saying
381# --disable-paths when using configure.
382$prefs{'ABSPATHS'} = 1;
383
384# this is the path to a temporary disk space area. If the area is a ram
385# drive, this setting may speed up image conversion. The following standard
386# paths are checked on the respective platforms:
387# UNIX        : /tmp /usr/tmp /var/tmp /usr/local/tmp
388# DOS/Windows : C:\TMP C:\TEMP C:\WINDOWS\TEMP
389$prefs{'TMPSPACE'} = '';
390
391# The location of the rgb.txt color definition file. If omitted, the
392# file that comes with the LaTeX2HTML distribution is used.
393$prefs{'RGB'} = '';
394
395# The location of the crayola.txt color definition file. If omitted, the
396# file that comes with the LaTeX2HTML distribution is used.
397$prefs{'CRAYOLA'} = '';
398
399# The names of HTML validators to look for on the system. Note: These
400# tools should accept a single HTML filename as argument.
401$prefs{'HTML_VALIDATOR'} = 'html4-check';
402
403###########################################
404# no need to edit anything below this line
405
406sub get_preferences {
407  return %prefs;
408  }
409
4101; # make require happy. DO NOT DELETE THIS LAST LINE!
411