next up previous contents index
Next: Asking the Translator to Up: Extending the Translator Previous: Extending the Translator

Adding Support for Specific Style Files

  LaTeX2HTML provides a mechanism where code to translate specific style files is automatically loaded if such code is available. When the use of a style file such as german.sty is detected in a LaTeX source document, the translator looks for a file LATEX2HTMLDIR/styles/german.perl. If one is found, then it will be loaded into the main script.

This mechanism will help to keep the core script smaller as well as make it easier for others to contribute and share solutions on how to translate specific style files.
change_begin
The current distribution includes the files listed in Table 1. These will provide good examples of how you can create your own extensions to LaTeX2HTML.


change_end

 

.perl file

alltt Supports the LaTeX2e's alltt package
changebar Provides rudimentary change bar support
color Causes colored text to be processed as ordinary text by LaTeX2HTML
french Special support for the French language
epsfig Processes embedded figures not enclosed in a figure environment
floatfig Processes floating figures
german Special support for the German language
graphics Supports commands in the graphics package
graphicx Supports the alternate syntax of graphics commands
heqn Alters the way displayed equations are processed
htmllist Provides support for fancy lists
makeidx Generates indices
texdefs Supports raw TeX commands
wrapfig Supports wrapped figures
Table 1: Supported LaTeX2HTML style files 

The problem however, is that writing such extensions requires an understanding of Perl and of the way LaTeX2HTML is organized. More user-friendly interfaces will be investigated.

At the moment a rudimentary mechanism is provided so that a user can ask for particular commands and their arguments either to be ignored or passed on to LaTeX for processing (the default behavior for unrecognized commands is for their arguments to remain in the HTML text). Commands that are passed on to LaTeX are converted to images which are either ``inlined'' in the main document or become accessible via hypertext links. Simple extensions using the commands above may be included in the LATEX2HTMLDIR/latextohtml.config file or in each personal HOME/.latex2html-init initialization file.


next up previous contents index
Next: Asking the Translator to Up: Extending the Translator Previous: Extending the Translator

Bo Milvang-Jensen
Tue May 28 19:03:54 MET DST 1996