A crazy sed script to convert HTML code to LaTeX

The crazy sed script below is my first attempt at a script that will convert as much HTML as possible to LaTeX. For my purposes I'm mostly interested in tables, lists, buttons, and comboboxes, but I included a few other things as well.

This is in an extremely experimental state, and is included here as much for backup purposes and sharing as anything else.

Here's how you run the sed script on an HTML file named test.html:

sed -f html2latex.sed test.html > test.tex

That being said, here's the current source code for the html2latex.sed file: