Convert LaTeX tables into HTML

Update: Here’s a much better version of this that someone has obviously spent a lot of time on – which I had found it before! You can import TeX by going to Tools-> Import (although it doesn’t appear to work for my tables).

I have just converted my undergrad dissertation project from a document written in LaTeX to HTML to display on the web for anyone who is interested in Lego Mindstorms, or flocking.

At the time I wrote it (3 years ago) I found LaTeX a nightmare. It’s supposed to allow you to perfectly typeset documents, but I found even between print previewing the document and actually getting it on paper it changed! Anyway, so in the process, I needed to convert some of my results tables from LaTeX syntax into HTML. I couldn’t find any existing tools to do this, so I wrote one.

This was only a quick fix, and there are some problems with it, I have no idea what possible formats LaTeX uses for tables, so this will probably only work with the exact examples which I used to test it with. If you know any Javascript, or RegEx, then you should be able to ‘fork’ the jsFiddle to make your own version, fix problems, or improve it.

You will need to delete the last <tr><td> since it adds it erroneously.

Leave a Reply

Your email address will not be published. Required fields are marked *