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

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState