LaTeX2HTML: Publish Science to the Web

Tailoring math-intensive documents to fit the Internet.
Write for the Web

LaTeX2HTML is powerful in converting existing documents into web format. LaTeX2HTML offers a set of custom LaTeX commands and environments that allow you to include your own HTML markups in the text. You can take full advantage of normal HTML: you can add web forms, clickable image maps, external links/graphics or even Java applet/script to your document. For example, if you want to include a link to an outside web page in your generated HTML pages, you can just insert the following to mydoc.tex:

\htmladdnormallink{link title}{http://yourlink}

or more generically,

<A HREF="http://yourlink">link title</a>
If you want to print out a paper version of that HTML-enhanced document, you can include style file html.sty and then process it with normal LaTeX. Most of those LaTeX2HTML-specific commands/environments are ignored by LaTeX.

On the Server Side

LaTeX2HTML also can be used at the server side to facilitate web-based mathematical communications. Listing 1 demonstrates a Perl function that takes in a math-mode LaTeX string and returns an HTML markup for an image that displays the formula. There are other ways to do it more efficiently, but this is just an illustration of what LaTeX2HTML can do. It can be used in chat rooms or bulletin boards to allow the user to input and broadcast complex math formulae.

Listing 1. Perl Function Converting a LaTeX String to an HTML Markup



Michael Yuan is a PhD candidate in Astrophysics at University of Texas at Austin. He studies remote quasars (20-plus billion light years away) to understand the history and evolution of our universe. When he is not observing quasars, he enjoys developing useful software using earthly languages such as Java and Perl.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: LaTeX2HTML: Publish Science to the Web

Anonymous's picture

HyperLaTeX is a very good one way to do it. Much pretty one for me.

The problem are the locales , but you can use LyX to do the frame and then build a skeletton to use HyperLaTeX. Ximo

One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix