10

HTML5 allows for great rendering. Crocodoc for example does a great conversion from PDF to HTML5. Is there any tool to convert LaTeX to HTML5? Does tex4ht support HTML5?

Here's an example of what Crocodoc achieves in HTML5, compared to the original PDF:

Crocodoc PDF to HTML5

and an example of a full document in HTML5.

raphink
  • 31,894
  • 1
    Could you be a little more explicit in your question? What do you mean by "great rendering"? I know very little about HTML5 so I have no idea even what sort of thing you mean. When I look at the source of a sample "Crocodoc" document in FireBug then I don't see anything special. There's a lot of CSS controlling the word spacing and line protrusion so I'm not convinced that this is an example of "great conversion". – Andrew Stacey May 13 '11 at 09:28
  • 2
    In particular, woe betide me if I don't like their choice of font! Changing the font really messes up the page. – Andrew Stacey May 13 '11 at 09:29
  • This might be a good question for the tex4ht mailing list. – Matthew Leingang May 13 '11 at 09:31
  • Well, tex4ht also does a lot of CSS controlling. – raphink May 13 '11 at 09:31
  • @Matthew: that's right. I've been too lazy to post there. I'll wait and post there eventually depending on the answers I get here. – raphink May 13 '11 at 09:32
  • 2
    I'm confused: if crocodoc converts PDF to HTML5, why are asking about converting .tex to HTML5? Can you not upload a regular latex-compiled PDF to crocodoc? – Matthew Leingang May 13 '11 at 09:33
  • @Matthew: the point is that crocodoc gets nearly PDF quality in HTML5, so it should be possible to get there directly from LaTeX. The goal of crocodoc is not to produce HTML5 documents you can download though, but to let people comment online on documents, so it doesn't solve the problem of actually generating beautiful HTML documents from LaTeX. – raphink May 13 '11 at 09:35
  • But the document is so tied to the specifics that crocdoc specifies that you don't get the benefits of the flexibility of HTML. If I try to impose my own CSS on top of what crocdoc does, it looks horrible - lines don't flow and so forth. So purely to get that quality rendering, I need to impose the same amount of rigidity as if it were a PDF. So why not just stick a PDF on the web? At a cursory glance, crodoc's "value" seems to be to take the ability to annotate PDFs and stick it on the web. If you value "the cloud" you'll like it, if you don't, you won't. – Andrew Stacey May 13 '11 at 10:32
  • @raphink: ok I get it. You're bringing up crocodoc as an example of the kinds of documents which can be expressed in HTML5. I would not hold my breath for the tex4ht team to do it since it seems pretty involved. But maybe you should join the team! – Matthew Leingang May 13 '11 at 10:52
  • 4
    I checked the source code of the provided Crocodoc example and IMHO it's not a HTML5 document, as the doctype explicitly shows XHTML 1.0 Transitional. Besides, I didn't see any new HTML5 tags in the document, just a lot of Javascript and CSS codes (the page contains several errors as well). Probably this is a little confusion with a rich web page (very well designed and rendered, I give you that), but it isn't HTML5 per se. I believe you can achieve something similar with tex4ht, jQuery plugins and CSS. – Paulo Cereda May 13 '11 at 11:00
  • 1
    The text on the website is misleading. They convert PDFs to HTML and you can visualize them on an HTML5 viwer. That’s why it’s ‘High fidelity HTML5 document rendering'. – rberaldo May 13 '11 at 12:03
  • @Andrew: I see one point in such high quality rendering, even if it is rigid: generating high quality ebooks. – raphink May 13 '11 at 12:52
  • @Paulo, @reberaldo: Alright thanks. I'm no HTML5 expert, so I didn't actually check for new tags. Thanks for pointing out that it's just the viewer that's HTML5, and not the document per se. – raphink May 13 '11 at 12:53
  • @Matthew: If days had a bit more hours, I'd love to join so many projects! :-) – raphink May 13 '11 at 12:54
  • @Raphink: no worries, it would be awesome if a program could produce an output like that. =) – Paulo Cereda May 13 '11 at 13:45
  • @Paulo: Maybe we should ask crocodoc if they would open-source their PDF to HTML converter... – raphink May 13 '11 at 15:49
  • There's now a project called pdf2htmlEX which does exactly that. – raphink Sep 07 '12 at 08:59

0 Answers0