LaTeX2HTML(1)
๐ latex2html โ the manual, but make it make sense ๐
okay so bestie, welcome to the LaTeX2HTML(1) page โ Debian GNU/Linux manual edition, and yes it's that one, the long one. Buckle up, we're doing this in parts. ๐
๐ธ NAME ๐ธ
latex2html โ translate LaTeX files to HTML (HyperText Markup Language)
โจ SYNOPSIS โจ
latex2html [options] [target [target ...]]
๐ฆ DESCRIPTION ๐ฆ
So this whole page is about the LaTeX2HTML utility, which is a Perl program that takes a LaTeX document and translates it into HTML format. Iconic behaviour, honestly. ๐
For each source file you hand it as an argument, the translator will make a directory containing the corresponding HTML files. It justโฆ does that. No cap.
If you want the actual details and examples, go read the online html documentation, a copy of which should be chilling at/usr/share/doc/latex2html/manual.ps.gzor/usr/share/doc/latex2html/html/๐
๐ญ CAVEAT ๐ญ
Heads up bestie: this documentation has been derived from the TeX manual, and may not be uptodate. Please refer to the online manual for authoritative documentation. This one is giving "vintage", not "verified". ๐
๐ Options controlling Titles, File-Names and Sectioning ๐
Every single one, no skipping, we don't do that here. ๐
-t <top-page-title>โ Same as setting:$TITLE = <top-page-title>; name the document using this title. Naming your baby, basically. ๐ผ-short_extnโ Same as setting:$SHORTEXTN = 1; use a filename prefix of.htmfor the produced HTML files. This is particularly useful for creating pages to be stored on CD-ROM or other media, to be used with operating systems that require a 3-character extension. Retro-tech slay. ๐พ-long_titles <num>โ Same as setting:$LONG_TITLES = <num>; instead of the standard names:node1.html,node2.html,... the filenames for each HTML page are constructed from the first<num>words of the section heading for that page, separated by the'_'character. Commas and common short words (a an to by of and for the) are omitted from both title and word-count.
Warning: use this switch with great caution. Currently there are no checks for uniqueness of names or overall length. Very long names can easily result from using this feature. It's giving chaos, and not the cute kind. ๐
-custom_titlesโ Same as setting:$CUSTOM_TITLES = 1; instead of the standard names:node1.html,node2.html, ... the filenames for each HTML page are constructed using a Perl subroutine namedcustom_title_hook. The user may define his/her own version of this subroutine, within a.latex2html-initfile say, to override the default (which uses the standard names). This subroutine takes the section-heading as a parameter and must return the required name, or the empty string (default). DIY queen behaviour. โจ-dir <output-directory>โ Same as setting:$DESTDIR = <output-directory>; redirect the output to the specified directory. The default behaviour is to create (or reuse) a directory having the same name as the prefix of the document being processed. ๐-no_subdirโ Same as setting:$NO_SUBDIR = 1; place the generated HTML files into the current directory. This overrides any$DESTDIRsetting. We're staying right here, thanks. ๐-prefix <filename-prefix>โ Same as setting:$PREFIX = <filename-prefix>; the<filename-prefix>will be prepended to all.gif,.pland.htmlfiles produced, except for the top-level.htmlfile; it may include a (relative) directory path. This will enable multiple products of LaTeX2HTML to peacefully coexist in the same directory. However, do not attempt to simultaneously run multiple instances of LaTeX2HTML using the same output directory, else various temporary files will overwrite each other. Sharing is caring, but this is not sharing, this is a collision. ๐ฅ-auto_prefixโ Same as setting:$AUTO_PREFIX = 1; constructs the prefix as`<title>-'to be prepended to all the files produced, where<title>is the name of the LaTeX file being processed. (Note the'-'in this prefix.) This overrides any$PREFIXsetting. Automatic? We love her. ๐ค-no_auto_linkโ Same as setting:$NO_AUTO_LINK = 1; if$NO_AUTO_LINKis empty and variables$LINKPOINTand$LINKNAMEare defined appropriately (as is the default in thelatex2html.configfile), then a hard link to the main HTML page is produced, using the name supplied in$LINKNAME. Typically this isindex.html; on many systems a file of this name will be used, if it exists, when a browser tries to view a URL which points to a directory. On other systems a different value for$LINKNAMEmay be appropriate. Typically$LINKPOINThas value$FILE.html, but this may also be changed to match whichever HTML page is to become the target of the automatic link. Use of the-no_auto_linkswitch cancels this automatic linking facility, when not required for a particular document. ๐-split <num>โ Same as setting:$MAX_SPLIT_DEPTH = <num>; (default is8) stop splitting sections into separate files at this depth. Specifying-split 0will put the entire document into a single HTML file. See below for the different levels of sectioning. Also see the next item for how to set a ``relative'' depth for splitting. โ๏ธ-split +<num>โ Same as setting:$MAX_SPLIT_DEPTH = -<num>; (default is8) the level at which to stop splitting sections is calculated ``relative to'' the shallowest level of sectioning that occurs within the document. For example, if the document contains\sectioncommands, but no\partor\chaptercommands, then-split +1will cause splitting at each\sectionbut not at any deeper level; whereas-split +2or-split +3also split down to\subsectionand\subsubsectioncommands respectively. Specifying-split +0puts the entire document into a single HTML file. Math but make it โจvibesโจ-link <num>โ Same as setting:$MAX_LINK_DEPTH = <num>; (default is4) for each node, create links to child nodes down to this much deeper than the node's sectioning-level. Specifying-link 0will show no links to child nodes from that page,-link 1will show only the immediate descendents, etc. A value at least as big as that of the-split <num>depth will produce a mini table-of-contents (when not empty) on each page, for the tree structure rooted at that node. When the page has a sectioning-level less than the-splitdepth, so that the a mini table-of-contents has links to other HTML pages, this table is located at the bottom of the page, unless placed elsewhere using the\tableofchildlinkscommand. On pages having a sectioning-level just less than the-splitdepth the mini table-of-contents contains links to subsections etc. occurring on the same HTML page. Now the table is located at the top of this page, unless placed elsewhere using the\tableofchildlinkscommand. Location drama, but make it navigation. ๐งญ-toc_depth <num>โ Same as setting:$TOC_DEPTH = <num>; (default is4) sectioning levels down to<num>are to be included within the Table-of-Contents tree. ๐-toc_starsโ Same as setting:$TOC_STARS = 1; sections created using the starred-form of sectioning commands are included within the Table-of-Contents. As with LaTeX, normally such sections are not listed. Starred content finally getting its moment. โญ-show_section_numbersโ Same as setting:$SHOW_SECTION_NUMBERS = 1; show section numbers. By default section numbers are not shown, so as to encourage the use of particular sections as stand-alone documents. In order to be shown, section titles must be unique and must not contain inlined graphics. Numbered and unbothered. ๐ข-unsegmentโ Same as setting:$UNSEGMENT = 1; treat a segmented document (see the section about document segmentation) like it were not segmented. This will cause the translator to concatenate all segments and process them as a whole. You might find this useful to check a segmented document for consistency. For all documents the sectioning levels referred to above are:
0 document
1 part
2 chapter
3 section
4 subsection
5 subsubsection
6 paragraph
7 subparagraph
8 subsubparagraph
These levels apply even when the document contains no sectioning for the shallower levels; e.g. no \part or \chapter commands is most common, especially when using LaTeX's article document-class. It's giving "levels are levels". ๐ช
โจ Options controlling Extensions and Special Features โจ
okay bestie, this next batch of switches is all about what kind of HTML you're allowed to make and how to pick between strategies when LaTeX code could go more than one way. let's go ๐
-html_version (2.0|3.0|3.2)[,(math|i18n|table)]*โ literally the same as setting:$HTML_VERSION = ...; This one tells the translator which HTML version to generate plus any extra (non-standard) HTML features you might need. The version number lines up with a published DTD for an HTML standard (though ngl, 3.0 was never accepted and got withdrawn later ๐). A matching Perl file gets loaded from theversions/subdirectory, and those files are namedhtml<num>.pl. After the version number you can drop a comma-separated list of extensions, and each one maps to a file<name>.plthat also lives inversions/. The moment one of those files loads, you can no longer expect the HTML to validate against the DTD you picked โ no cap, validation is gone. The one exception is math when you also use-no_math, which should still validate โจ. Right now versions 2.0, 3.2 and 4.0 are available (plus 2.1, 2.2, 3.0 and 3.1, for historical reasons). The extensions i18n, tables and math roughly correspond to what used to be called versions2.1,2.2and3.1respectively, back in LaTeX2HTML releases up to 1996. Now you can load those extensions with any of2.0,3.2or4.0as your specified standard. The default version is usually set to3.2, insidelatex2html.config.-no_tex_defsโ same as setting:$TEXDEFS = 0;(default is 1). When$TEXDEFSis set (which it is by default) the filetexdefs.perlgets read, and that hands you code so common TEX commands like\def,\newbox,\newdimenand friends get recognised, especially inside the document preamble. For\defspecifically, the definition might even get fully interpreted โ but only if the pattern-matching isn't too complicated, so don't push it ๐. If$TEXDEFSis0or empty, thentexdefs.perlwon't load at all, and the translator makes zero attempt to interpret any raw TEX commands. This feature exists so sophisticated authors can sneak arbitrary TEX commands into environments that are headed to LaTeX anyway; e.g. figures, theorems, pictures, etc. But honestly it should rarely be needed now, because there's better support for those kinds of environments these days. There are also other methods now for specifying which chunks of code get passed to LaTeX for explicit image-generation โ go read the discussion of themakeimageenvironment ๐-external_file <filename>โ same as setting:$EXTERNAL_FILE = <filename> ;This sets the prefix of the.auxfile that this document should read. The.auxextension gets appended to that prefix to build the complete filename, with a directory path if you need one. That file could hold necessary information about citations, figure, table and section numbers from LaTeX โ and maybe other stuff too. Using this switch is vital for document segments that get processed separately and linked so they appear as if they were generated from one single LaTeX document ๐ซถ-font_size <size>โ same as setting:$FONT_SIZE = <size> ;This gives you better control over the font size of environments that get made into images using LaTeX.<size>has to be one of the font sizes LaTeX recognises; i.e.10pt,11pt,12pt, etc. Default is10pt, or whatever option may have been specified on the\documentclassor\documentstyleline. Whatever size you pick, it gets magnified by the installation variables$MATH_SCALE_FACTOR,$FIGURE_SCALE_FACTORand$DISP_SCALE_FACTORas appropriate. Note tho: this switch gives you no control at all over the size of text on the HTML pages โ that's entirely up to whatever the user chose for their browser windows ๐-scalable_fontsโ same as setting:$SCALABLE_FONTS = 1;You use this when scalable fonts are available for image-generation, like PostScript versions of the TEX fonts. Its effect is setting$PK_GENERATIONto1, and$DVIPS_MODEto be empty โ and it overrides any previous settings for those variables ๐-no_mathโ same as setting:$NO_SIMPLE_MATH = 1;So normally, simple mathematical expressions get set using the ordinary text font, just italicised. When some part of the expression can't be represented that way, an image is made of the whole formula. That's what's called "simple math". When$NO_SIMPLE_MATHis set, then all mathematics gets made into images, simple or not. BUT โ plot twist โ if the math extension is loaded using the-html_versionswitch we talked about earlier, then specifying-no_mathdoes something completely different. In that case it's the special<MATH>tags and entities that get cancelled. In their place there's a sophisticated scheme for parsing mathematical expressions, and images get made of just those sub-parts of a formula that can't be adequately expressed using (italicised) text characters plus<SUB>and<SUP>tags. See the subsection on mathematics for the full tea โ-local_iconsโ same as setting:$LOCAL_ICONS = 1;A copy of every icon actually used inside the document gets placed in the directory alongside the HTML files and generated images. This lets the whole document be fully self-contained inside that directory; otherwise the icons have to be retrieved from a (maybe remote) server. The icons normally get copied from a subdirectory of$LATEX2HTMLDIR, set insidelatex2html.config. You can use an alternative set of icons by specifying a (relative) directory path in$ALTERNATIVE_ICONSpointing to where your customised images can be found ๐-init_file <file>โ loads the initialisation file you name. This Perl file gets loaded after loading$HOME/.latex2html-init, or.latex2html-initin the local directory, if either of those files exists. It's read at the time the switch is processed, so the contents of the file can change any of the values of any of the variables that were previously established, plus any default options. You can read in more than one initialisation file this way. ([change_begin]98.1)-no_forkโ same as setting:$NOFORK = 1;When set, this disables a feature in the early part of the processing where some memory-intensive operations get performed byforkedchild processes. Some single-task operating systems, such as DOS, don't support this at all. Having$NOFORKset then makes sure the unnecessary file-handles that are needed with the forked processes don't get consumed unnecessarily โ which could otherwise land you with a fatal Perl error ๐-iso_language <type>โ this enables you to specify a different language type than'EN'to be used in the DTD entries of the HTML document, e.g.'EN.US'. ([change_end] 98.1)-short_indexโ same as setting:$SHORT_INDEX = 1;Creates shorter Index listings, using codified links; this is fully compatible with themakeidxpackage โจ-no_footnodeโ same as setting:$NO_FOOTNODE = 1;Suppresses using a separate file for footnotes; instead these get placed at the bottom of the HTML pages where the references occur. When this option is used, it's frequently desirable to change the style of the marker used to indicate the presence of a footnote. You do that as in LaTeX, using code such as the following:
\renewcommand{\thefootnote}{\arabic{footnote}}
All the styles \arabic, \alph, \roman, \Alph and \Roman are available. ([change_begin]98.1)
-numbered_footnotesโ same as setting:$NUMBERED_FOOTNOTES = 1;If this is set, every footnote gets applied with a subsequent number, to ease readability. ([change_end] 98.1)-address <author-address>โ same as setting:$ADDRESS = <author-address> ;Signs each page with this address. Peeplatex2html.configfor an example using Perl code to automatically include the date. A user-defined Perl subroutine called&custom_addresscan be used instead, if it's defined; it takes the value of$ADDRESSas a parameter, which you may use or ignore as you like. At the time when this subroutine gets called, the variables$depth,$titleand$filehold the sectioning-level, title and filename of the HTML page being produced;$FILEholds the name of the filename for the title-page of the whole document ๐-info <string>โ same as setting:$INFO = <string> ;Generates a new section "About this document" containing information about the document being translated. The default is to generate such a section with information on the original document, the date, the user and the translator. An empty string (or the value0) disables the creation of this extra section. If a non-empty string is given, it gets placed as the contents of the "About this document" page instead of the default information ๐
๐ผ๏ธ Switches controlling Image Generation โจ
These switches are the ones deciding whether images even happen at all, whether we recycle the old ones on later runs or make fresh ones, and whether anti-aliasing is in the mix. It's giving "image pipeline management", bestie. ๐
-ascii_modeโ same as setting:$ASCII_MODE = $EXTERNAL_IMAGES = 1;Use only ASCII characters and do not include any images in the final output. With-ascii_modethe output of the translator can be used on character-based browsers, such aslynx, which do not support inlined images (via the<IMG>tag).-nolatexโ same as setting:$NOLATEX = 1;Disable the mechanism for passing unknown environments to LaTeX for processing. Think of it as "draft mode" which allows faster translation of the basic document structure and text, without fancy figures, equations or tables. (This option has been superseded by the-no_imagesoption, see below. ๐)-external_imagesโ same as setting:$EXTERNAL_IMAGES = 1;Instead of including any generated images inside the document, leave them outside the document and provide hypertext links to them.-ps_imagesโ same as setting:$PS_IMAGES = $EXTERNAL_IMAGES = 1;Use links to external PostScript files rather than inlined images in the chosen graphics format.-discardโ same as setting:$DISCARD_PS = 1;The temporary PostScript files are discarded immediately after they have been used to create the image in the desired graphics format.-no_imagesโ same as setting:$NO_IMAGES = 1;Do not attempt to produce any inlined images. The missing images can be generated "off-line" by restarting LaTeX2HTML with the option-images_only.-images_onlyโ same as setting:$IMAGES_ONLY = 1;Try to convert any inlined images that were left over from previous runs of LaTeX2HTML.-reuse<reuse_option>โ same as setting:$REUSE = <reuse_option>;This switch specifies the extent to which image files are to be shared or recycled. There are three valid options:[*]0โ Do not ever share or recycle image files. This choice also invokes an interactive session prompting the user about what to do about a pre-existing HTML directory, if it exists.[*]1โ Recycle image files from a previous run if they are available, but do not share identical images that must be created in this run.[*]2โ Recycle image files from a previous run and share identical images from this run. This is the default. ๐
A later section provides additional information about image-reuse. (iykyk ๐)
-no_reuseโ same as setting:$REUSE = 0;Do not share or recycle images generated during previous translations. This is equivalent to-reuse 0. (This will enable the initial interactive session during which the user is asked whether to reuse the old directory, delete its contents or quit. ๐)-antialiasโ same as setting:$ANTI_ALIAS = 1;(Default is0.) Generated images of figure environments and external PostScript files should use anti-aliasing. By default anti-aliasing is not used with these images, since this may interfere with the contents of the images themselves.-antialias_textโ same as setting:$ANTI_ALIAS_TEXT = 1;(Default is1.) Generated images of typeset material such as text, mathematical formulas, tables and the content ofmakeimageenvironments, should use anti-aliasing effects. The default is normally to use anti-aliasing for text, since the resulting images are much clearer on-screen. However the default may have been changed locally. โจ-no_antialiasโ same as setting:$ANTI_ALIAS = 0;(Default is0.) Generated images of figure environments and external PostScript files should not use anti-aliasing with images, though the local default may have been changed to use it.-no_antialias_textโ same as setting:$ANTI_ALIAS_TEXT = 0;(Default is1.) Generated images of typeset material should not use anti-aliasing effects. Although on-screen images of text are definitely improved using anti-aliasing, printed images can be badly blurred, even at 300dpi. Higher resolution printers do a much better job with the resulting grey-scale images.[change_begin]98.1
Lowkey important: anti-aliasing on printed text can go blurry-mode at 300dpi, so if you're printing, bestie, keep that in mind. ๐จ๏ธ๐ญ
-whiteโ same as setting:$WHITE_BACKGROUND = 1;(Default is1.) Ensures that images of figure environments have a white background. Otherwise transparency effects may not work correctly.-no_whiteโ same as setting:$WHITE_BACKGROUND = '';(Default is1.) Cancels the requirement that figure environments have a white background.-ldumpโ same as setting:$LATEX_DUMP = 1;(Default is0.) Use this if you want to speed up image processing during the 2nd and subsequent runs of LaTeX2HTML on the same document. The translator now produces a LaTeX format-dump of the preamble toimages.texwhich is used on subsequent runs. This significantly reduces the startup time when LaTeX reads theimages.texfile for image-generation. This process actually consumes additional time on the first run, since LaTeX is called twice โ once to create the format-dump, then again to load and use it. The pay-off comes with the faster loading on subsequent runs. Approximately 1 Meg of disk space is consumed by the dump file.[change_end]98.1
๐งญ Switches controlling Navigation Panels ๐
The following switches govern whether to include one or more navigation panels on each HTML page, and also which buttons to include within such a panel. Obsessed with a good nav bar, fr fr. ๐
-no_navigationโ same as setting:$NO_NAVIGATION = 1;Disable the mechanism for putting navigation links in each page. This overrides any settings of the$TOP_NAVIGATION,$BOTTOM_NAVIGATIONand$AUTO_NAVIGATIONvariables.-top_navigationโ same as setting:$TOP_NAVIGATION = 1;Put navigation links at the top of each page.-bottom_navigationโ same as setting:$BOTTOM_NAVIGATION = 1;Put navigation links at the bottom of each page as well as the top.-auto_navigationโ same as setting:$AUTO_NAVIGATION = 1;Put navigation links at the top of each page. Also put one at the bottom of the page, if the page exceeds$WORDS_IN_PAGEnumber of words (default =450).-next_page_in_navigationโ same as setting:$NEXT_PAGE_IN_NAVIGATION = 1;Put a link to the next logical page in the navigation panel.-previous_page_in_navigationโ same as setting:$PREVIOUS_PAGE_IN_NAVIGATION = 1;Put a link to the previous logical page in the navigation panel.-contents_in_navigationโ same as setting:$CONTENTS_IN_NAVIGATION = 1;Put a link to the table-of-contents in the navigation panel if there is one.-index_in_navigationโ same as setting:$INDEX_IN_NAVIGATION = 1;Put a link to the index-page in the navigation panel if there is an index.
๐ Switches for Linking to other documents ๐ฆ
When processing a single stand-alone document, the switches described in this section should not be needed at all, since the automatically generated navigation panels, described on the previous page, should generate all the required navigation links. However if a document is to be regarded as part of a much larger document, then links from its first and final pages, to locations in other parts of the larger (virtual) document, need to be provided explicitly for some of the buttons in the navigation panel. The following switches allow for such links to other documents, by providing the title and URL for navigation panel hyperlinks. In particular, the "Document Segmentation" feature necessarily makes great use of these switches. It is usual for the text and targets of these navigation hyperlinks to be recorded in a Makefile, to avoid tedious typing of long command-lines having many switches. ๐ซถ
-up_url<URL>โ same as setting:$EXTERNAL_UP_LINK = <URL>; Specifies a universal resource locator (URL) to associate with the "UP" button in the navigation panel(s).-up_title<string>โ same as setting:$EXTERNAL_UP_TITLE = <string>; Specifies a title associated with this URL.-prev_url<URL>โ same as setting:$EXTERNAL_PREV_LINK = <URL>; Specifies a URL to associate with the "PREVIOUS" button in the navigation panel(s).-prev_title<string>โ same as setting:$EXTERNAL_PREV_TITLE = <string>; Specifies a title associated with this URL.-down_url<URL>โ same as setting:$EXTERNAL_DOWN_LINK = <URL>; Specifies a URL for the "NEXT" button in the navigation panel(s).-down_title<string>โ same as setting:$EXTERNAL_DOWN_TITLE = <string>; Specifies a title associated with this URL.-contents<URL>โ same as setting:$EXTERNAL_CONTENTS = <URL>; Specifies a URL for the "CONTENTS" button, for document segments that would not otherwise have one.-index<URL>โ same as setting:$EXTERNAL_INDEX = <URL>; Specifies a URL for the "INDEX" button, for document segments that otherwise would not have an index.-biblio<URL>โ same as setting:$EXTERNAL_BIBLIO = <URL>; Specifies the URL for the bibliography page to be used, when not explicitly part of the document itself.
โ ๏ธ Warning: On some systems it is difficult to give text-strings<string>containing space characters, on the command-line or via aMakefile. One way to overcome this is to use the corresponding variable. Another way is to replace the spaces with underscores (_).
No cap, that's a lot of URLs, but you got this. ๐
Switches for Help and Tracing ๐
The first two switches down here are literally self-explanatory, bestie. And when a document starts acting up mid-process, -debug and -verbosity both make LaTeX2HTML spill more output onto your screen. Those extra messages are there to help you hunt down the cause of the problem. iykyk.
-tmp <path>โ tells it which temporary directory to use for image generation. If<path>is0, then the standard temp dir/tmpgets used instead.-h(elp)โ prints out the whole list of every command-line option. yes, all of them. go off.-vโ prints the current version of LaTeX2HTML.-debugโ same as setting$DEBUG = 1;๐ Runs in debug-mode, showing messages and/or diagnostic info about the files it reads and the utilities LaTeX2HTML calls. It shows any messages those calls produce. Want even more extensive diagnostics, straight from the Perl debugger? Then append the string-w-to the 1st line of thelatex2html(and other) Perl script(s).-verbosity <num>โ same as setting$VERBOSITY = <num>;It displays messages revealing certain aspects of the processing LaTeX2HTML does on the input file(s) you gave it. The<num>parameter can be an integer in the range0to8, and each higher value adds more messages on top of the ones below it.
- No special tracing; same as for versions of LaTeX2HTML prior to V97.1.
- (This is the default.) Show section-headings and the corresponding HTML file names, plus indicators that the major stages of processing have been completed.
- Print environment names and identifier numbers, and new theorem-types. Show warnings as they occur, plus indicators for more stages of processing. Print names of files for storing auxiliary data arrays.
- Print command names as they're encountered and processed; also any unknown commands encountered while pre-processing. Show names of new commands, environments, theorems, counters and counter-dependencies, for each document partition.
- Indicate command-substitution in the pre-process of math-environments. Print the contents of unknown environments for processing in LaTeX, both before and after reverting to LaTeX source. Show all operations affecting the values of counters. Also show links, labels and sectioning keys, at the stages of processing.
- Detail the processing in the document preamble. Show substitutions of new environments. Show the contents of all recognised environments, both before and after processing. Show the cached/encoded information for the image keys, letting two images be tested for equality.
- Show replacements of new commands, accents and wrapped commands.
- Trace the processing of commands in math mode; both before and after.
- Trace the processing of all commands, both before and after.
The command-line option sets an initial value only, bestie. During processing, the value of $VERBOSITY can be set dynamically using the \htmltracing{...} command, whose argument is the desired value, or by using the more general \HTMLset command like this:
\HTMLset{VERBOSITY}{<num>}
๐ธ Other Configuration Variables, without switches ๐ธ
The configuration variables described right here don't warrant having a command-line switch to assign values to them. Either they represent aspects of LaTeX2HTML that are specific to your local site, or they govern properties that should apply to all documents, rather than something that typically would change for different documents inside a particular sub-directory.
Normally these variables get their value set inside the latex2html.config file. In the listing below, the defaults are shown as the lines of Perl code used to establish those values. And if you need a different value? You can assign these from a local .latex2html-init initialisation file, without affecting the defaults for other users, or for documents processed from other directories. considerate queen behavior ๐ซถ
$dd
Holds the string used in file-names to delimit directories. It's set internally to /, unless the variable has already been given a value inside latex2html.config.
Heads up: this value cannot be set inside a .latex2html-init initialisation file, because its value needs to be known in order to find such a file. chicken-and-egg moment fr ๐
$LATEX2HTMLDIR
Read by the install-test script from latex2html.config. Its value is inserted into the latex2html Perl script as part of the installation process.
$LATEX2HTMLSTYLES
$LATEX2HTMLSTYLES = $LATEX2HTMLDIR/styles ;
Read from the latex2html.config file by install-test, and its value is checked to locate the styles/ directory.
$LATEX2HTMLVERSIONS
$LATEX2HTMLVERSIONS = $LATEX2HTMLDIR/versions ;
The value of this variable should be set within latex2html.config to specify the directory path where the version and extension files can be found.
$ALTERNATIVE_ICONS
$ALTERNATIVE_ICONS = '';
This may contain the (relative) directory path to a set of customised icons, to be used together with the -local_icons switch.
$TEXEXPAND
$TEXEXPAND = $LATEX2HTMLDIR/texexpand ;
Read by the install-test Perl script from latex2html.config, and its value is used to locate the texexpand Perl script.
$PSTOIMG
$PSTOIMG = $LATEX2HTMLDIR/pstoimg ;
Read by the install-test Perl script from latex2html.config, and its value is used to locate the pstoimg Perl script.
$IMAGE_TYPE
$IMAGE_TYPE = '<image-type>';
Set in latex2html.config. The currently supported <image-type>s are: gif and png.
$DVIPS
$DVIPS = 'dvips';
Read from latex2html.config by install-test, and its value is checked to locate the dvips program or script.
There could be several reasons to change the value here:
- add a switch
-P<printer>to load a specific configuration-file; e.g. to use a specific set of PostScript fonts, for improved image-generation. - to prepend a path to a different version of
dvipsthan normally available as the system default (e.g. the printing requirements are different). - to append debugging switches, in case of poor quality images; you can then see which paths are being searched for fonts and other resources.
- to prepend commands for setting path variables that
dvipsmay need in order to locate fonts or other resources.
If automatic generation of fonts is required, using Metafont, the following configuration variables are important. ๐
$PK_GENERATION
$PK_GENERATION = 1;
This variable must be set to initiate font-generation; otherwise fonts will be scaled from existing resources on the local system. In particular, this variable must not be set if you wish to use PostScript fonts or other scalable font resources (see the -scalable_fonts switch).
$DVIPS_MODE
$DVIPS_MODE = 'toshiba';
The mode given here must be available in the modes.mf file, located with the Metafont resource files, perhaps in the misc/ subdirectory.
$METAFONT_DPI
$METAFONT_DPI = 180;
The required resolution, in dots-per-inch, should be listed specifically within the MakeTeXPK script, which is called by dvips to invoke Metafont with the correct parameters for the required fonts.
$LATEX
$LATEX = 'latex';
Read from latex2html.config by install-test, and its value is checked to locate the latex program or script.
If LaTeX is having trouble finding style-files and/or packages, then the default command can be prepended with other commands to set environment variables meant to resolve those difficulties; e.g.
$LATEX = 'setenv TEXINPUTS <path to search> ; latex'
There are several variables to help control exactly which files are read by LaTeX2HTML and by LaTeX when processing images:
$TEXINPUTS
This is normally set from the environment variable of the same name. If difficulties occur so that styles and packages aren't being found, then extra paths can be specified here, to resolve those difficulties.
$DONT_INCLUDE
This provides a list of filenames and extensions to not include, even if requested to do so by an \input or \include command. (Consult latex2html.config for the default list.)
$DO_INCLUDE
$DO_INCLUDE = '';
List of exceptions within the $DONT_INCLUDE list. These files are to be read if requested by an \input or \include command.
$ICONSERVER
$ICONSERVER = '<URL>';
This is used to specify a URL to find the standard icons, as used for the navigation buttons. Names for the specific image size, as well as size information, can be found in latex2html.config. The icons themselves can be replaced by customised versions, provided this information is correctly updated and the location of the customised images is specified as the value of $ICONSERVER.
When the -local_icons switch is used, so that a copy of the icons is placed with the HTML files and other generated images, the value of $ICONSERVER is not needed within the HTML files themselves. However, it is needed to find the original icons to be copied to the local directory. โจ
$NAV_BORDER
$NAV_BORDER = <num>;
The value given here results in a border, measured in points, around each icon. A value of 0 is common, to maintain strict alignment of inactive and active buttons in the control panels.
$LINKNAME
$LINKNAME = '"index.$EXTN"';
This is used when the $NO_AUTO_LINK variable is empty, to allow a URL to the working directory to be sufficient to reach the main page of the completed document. It specifies the name of the HTML file which will be automatically linked to the directory name. The value of $EXTN is .html unless $SHORTEXTN is set, in which case it is .htm.
$LINKPOINT
$LINKPOINT = '"$FILE$EXTN"';
This specifies the name of the HTML file to be duplicated, or symbolically linked, with the name specified in $LINKNAME. At the appropriate time, the value of $FILE is the document name, which usually coincides with the name of the working directory.
$CHARSET = 'iso_8859_1';โ the character set used inside the HTML pages LaTeX2HTML spits out ๐ . If nothing sets a value in a configuration or initialisation file, the default just gets assumed, no drama. Oh and the lowercase$charsetform is also recognised, bestie, but the uppercase one wins and overrides it. periodt.$ACCENT_IMAGES = 'large';โ okay so some accented characters aren't part of the ISO-Latin fonts ๐ญ, and those ones can be generated by making an image using LaTeX. This variable holds a (comma-separated) list of LaTeX commands for setting the style used when those images get made โจ. If the value is empty, the accent is simply ignored and an un-accented font character (not an image!) is used instead. no cap.
Within the color.perl package, the following variables identify the names of files containing specifications for named colors ๐จ. Files with these names are provided in the $LATEX2HTMLSTYLES directory, but they could be moved elsewhere, or swapped out for alternative files with different names โ in that case you gotta change the values of these variables accordingly.
$RGBCOLORFILE = 'rgb.txt';$CRAYOLAFILE = 'crayola.txt';
- The following variables may well be altered from the system defaults, but honestly the best way to do it is with a local
.latex2html-initinitialisation file, so you get overall consistency of style across documents sitting at the same site, or at sites in close proximity ๐ซถ. $default_language = 'english';โ this establishes which language code gets placed inside the<!DOCTYPE ... >tag that may appear at the beginning of the HTML pages produced. Loading a package for an alternative language can be expected to change the value of this variable. Also go look at the$TITLES_LANGUAGEvariable, which is described right next ๐.$TITLES_LANGUAGE = 'english';โ this one specifies the actual strings used for standard document sections, likeContents'',References'', ``Table of Contents'', etc. Support for French and German titles is available in corresponding packages, and loading such a package will normally alter the value of this variable, as well as the$default_languagevariable described above ๐$WORDS_IN_NAVIGATION_PANEL_TITLES = 4;โ specifies how many words to use from section titles, inside the textual hyperlinks that accompany the navigation buttons ๐ฅ.$WORDS_IN_PAGE = 450;โ specifies the minimum page length required before a navigation panel gets placed at the bottom of a page, when the$AUTO_NAVIGATIONvariable is set ๐.$CHILDLINE = <BR><HR>;โ this gives the HTML code to be placed between the child-links table and the ordinary contents of the page it occurs on ๐ธ.$NETSCAPE_HTML = 0;โ when set, this variable specifies that HTML code may be present which does not conform to any official standard ๐ณ. This restricts the contents of any<!DOCTYPE ... >tag which may be placed at the beginning of the HTML pages produced.$BODYTEXT = '';โ the value of this variable is used inside the<BODY ... >tag; e.g. to set text and/or background colors ๐. Its value is overridden by the\bodytextcommand, and can be added-to or have parts changed using the\htmlbodycommand or\colorand\pagecolorfrom thecolorpackage.$INTERLACE = 1;โ when set, interlaced images should be produced โจ. This requires graphics utilities to be available to perform the interlacing operation.$TRANSPARENT_FIGURES = 1;โ when set, the background of images should be made transparent; otherwise it's white ๐ค. This requires graphics utilities to be available which can specify the color to be made transparent.$FIGURE_SCALE_FACTOR = 1.6;โ scale factor applied to all images of figure and other environments, when being made into an image ๐. Note that this does not apply to recognised mathematics environments, which instead use the contents of$MATH_SCALE_FACTORand$DISP_SCALE_FACTORto specify scaling.$MATH_SCALE_FACTOR = 1.6;โ scale factor applied to all images of mathematics, both inline and displayed ๐งฎ. A value of1.4is a good alternative, with anti-aliased images.$DISP_SCALE_FACTOR = 1;โ extra scale factor applied to images of displayed math environments. When set, this value multiplies$MATH_SCALE_FACTORto give the total scaling. A value of1.2is a good choice to accompany$MATH_SCALE_FACTOR = 1.4;๐ .$EXTRA_IMAGE_SCALEโ this may hold an extra scale factor that can be applied to all generated images. When set, it specifies that a scaling of$EXTRA_IMAGE_SCALEbe applied when images are created, but to have their height and width recorded as the un-scaled size ๐. This is to coax browsers into scaling the (usually larger) images to fit the desired size; when printed a better quality can be obtained. Values of1.5and2give good print quality at 600dpi ๐จ๏ธ.$PAPERSIZE = 'a5';โ specifies the size of a page for typesetting figures or displayed math, when an image is to be generated ๐. This affects the lengths of lines of text within images. Since images of text or mathematics should use larger sizes than when printed, else clarity is lost at screen resolutions, a smaller paper-size is generally advisable. This is especially so if both the$MATH_SCALE_FACTORand$DISP_SCALE_FACTORscaling factors are being used, else some images may become excessively large, including a lot of blank space ๐.$LINE_WIDTH = 500;โ formerly specified the width of an image, when the contents were to be right- or center-justified. (No longer used.) ๐
The following variables are used to access the utilities required during image-generation โจ. File and program locations on the local system are established by the configure-pstoimg Perl script and stored within $LATEX2HTMLDIR/local.pm as Perl code, to be read by pstoimg when required. After running the configure-pstoimg Perl script it should not be necessary to alter the values obtained ๐ซถ. Those shown below are what happens on the author's system; they are for illustration only and do not represent default values. fr fr.
$GS_LIB = '/usr/local/share/ghostscript/4.02';
$PNMCAT = '/usr/local/bin/pnmcat';
$PPMQUANT = '/usr/local/bin/ppmquant';
$PNMFLIP = '/usr/local/bin/pnmflip';
$PPMTOGIF = '/usr/local/bin/ppmtogif';
$HOWTO_TRANSPARENT_GIF = 'netpbm';
$GS_DEVICE = 'pnmraw';
$GS = '/usr/local/bin/gs';
$PNMFILE = '/usr/local/bin/pnmfile';
$HOWTO_INTERLACE_GIF = 'netpbm';
$PBMMAKE = '/usr/local/bin/pbmmake';
$PNMCROP = '/usr/local/bin/pnmcrop';
$TMP = '/usr/var/tmp';
The following variables are no longer needed, having been replaced by the more specific information obtained using the Perl script configure-pstoimg ๐:
$USENETPBM = 1;
$PBMPLUSDIR = '/usr/local/bin';
๐ SEE ALSO ๐
๐ AUTHOR ๐
Nikos Drakos, Computer Based Learning Unit, University of Leeds <nikos@cbl.leeds.ac.uk>. Several people have contributed suggestions, ideas, solutions, support and encouragement ๐. The current maintainer is Ross Moore. This manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system, based on the LaTeX documentation accompanying the program ๐.
okay bestie that's the whole page, you're officially a LaTeX2HTML girlie now ๐
this came from Debian's version dated March 1 2000 (it's giving LaTeX2HTML(1), section 1, iconic ๐), and that's a wrap โ go make some HTML, you got this ๐ฆโจ
๐ฆ where this page comes from
- centos-stream 10: latex2html 2023.2-7.el10 ยท GPL-2.0-or-later
- centos-stream 9: latex2html 2020.2-5.el9 ยท GPLv2+
- fedora 43: latex2html 2023.2-8.fc43 ยท GPL-2.0-or-later
- fedora 44: latex2html 2023.2-9.fc44 ยท GPL-2.0-or-later
- fedora 44: latex2html 2026-1.fc44 ยท GPL-2.0-or-later
- Copyright (c) 1997 Manoj Srivastava <srivasta@debian.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms