59 comments

[ 2.9 ms ] story [ 126 ms ] thread
I don't use LaTeX simply because LaTeX outputs pdfs. Pdfs stink in their own right but furthermore, pdfs are for printed documents and I don't use paper anymore.
PDFs stink, but I've yet to find something that stinks less!

What I need:

* High quality fonts and images

* Single file

* Cross platform

* Simple to create using LaTeX

* Excellent support for math

* LaTeX style readability considerations

* Massive user base

* Many extensions

HTML?
Specifically for writing math heavy papers (what I use LaTeX for) HTML offers:

1. (kinda.. if I want to use Google's font API and the browser renders it well)

2. Not a single file.

3. Not cross-platform - it will render differently on my linux desktop and mac laptop.

4. I don't know how to convert all of my LaTeX macros and workflows to HTML so I'd need something like htmltex (doesn't exist, I want it).

5. MathJax is good, but it ain't great. Too many compromises.

6. No typesetting and words per lining heuristics like LaTeX - again, need htmltex.

7. and 8. were a bit unclear, sorry. I mean in writing mathematical papers. HTML has a huge community but signal to noise for writing readable papers is pretty high. Mapping what I do in LaTeX to HTML requires many more lines of code.

There is htmltex (i.e. almost full stack emitting HTML), it is called latexml. There is also a lot converters, most notably Pandoc.

Still I 100% agree that even HTML is too primitive and too inconsistently implemented for scientific writing.

Thanks for the pointer, I shall play with latexml!
(comment deleted)
Yes, I think HTML is superior to LaTeX for modern documents. The reason LaTeX is still popular is mostly inertia.
Does anybody else see really weird vertical kerning on this page. It seems like the line drops by a few pixels every few words... interesting, since this is a page about how we should switch to something more like HTML for typesetting...
For some reason, the entire page has a random rotation and skew applied to it with CSS.
I thought something was going wrong with my visual perception for a minute.
YES. I thought I was going crazy for a minute there. Every page on the site looks like it gets a random skew applied.
This discussion is about standards of presentation. Not technologies for rendering. An HTML document written today, will benefit retro-actively from better font rendering in your browser in 1 year. However, a Latex paper written today, will not benefit in any way from technologies invented after you typeset the paper.
What would be great is if LaTeX compilers could output to HTML or other more portable backends. I've grown to love LaTeX since my undergrad- I don't have to worry about how things will display like I do with markdown, html and MathJax, it just works. I don't know how possible that will be to replicate in a browser.
Try Heavea: http://hevea.inria.fr/.

For my current book project, I've decided to go with LyX as my editor instead, and it comes with Elyxir, which converts LaTeX to HTML

I'm happy with sharelatex (i'm not involved with the company, just a happy user)

They have a few glitches here and there but convenient enough to draft some papers in the browser

Ever used Pandoc? http://johnmacfarlane.net/pandoc/

You can embed LaTeX into your Markdown, and still have it render to many targets (HTML, PDF, etc.) with full linking and fidelity.

(comment deleted)
++pandoc. I write all my books in Latex (despite the looks of horror from everyone I mention it to). I compile to PDF for printing and use pandoc to build every other format. It just works. I spent less than 3 or 4 hours, total, integrating it into my "book build".
What I get from this article is "hey, what if we use HTML instead of LaTeX?" Unfortunately the answer to this is, "HTML is insufficient to specify all the things you need to make a paper publishable." LaTeX is a full-strength gnarly language because it had to be. If you were targeting digital distribution only, HTML (and the author really means "HTML plus CSS plus probably a small subset of JavaScript") would be maybe-kinda-sorta-plausible, but you can already go from LaTeX to HTML --- so why not write your original in the more powerful language and simplify it down to HTML when you need that? HTML+CSS+JS is actually not an improvement on PDFs, because you've got executable code in there and you'll go right down the same security-problems rabbit hole that PDF did.

To oversimplify: LaTeX is not perfect but is much smarter than the author is giving it credit for. This is that stereotypical Unix learning experience ("feature X is enormously frustrating, why can't we do something simpler" -> time passes -> "oh, feature X is actually spectacularly useful when viewed through the right lens") going on.

> "HTML is insufficient to specify all the things you need to make a paper publishable."

Actually I've been wondering why we have to make academic papers "publishable". Majority of researchers read papers on computer. Even they read on paper, it's printed out from a downloaded PDF. If everything is transferred as electronic format, I'm not sure traditional typesetting is still necessary.

HTML based articles have option to be interactive and visually better. This enables better communication, which is the purpose of publishing papers. HTML is also more structured than close sourced PDF, and structured data is more machine friendly. I'm not only talking about SEO, but also citations/indexing/etc.. HTML is also easier to be embedded into other content. This makes, e.g. peer-review, easier.

If any, I think the main obstacle of HTML formatted technical papers is traditional publishers. They make a lot of money out of publishing and this would potentially squeeze their profit.

While anecdotal, every researcher I know prints papers for reading or reviewing. High-quality typesetting makes printed papers much easier to read.
I might be biased on "majority of researchers read papers on computer". As to "high-quality typesetting", I think that depends on your standard of "high-quality". If the goal is "easier to read", then it doesn't have to be traditional typesetting. LaTex is not the only way to make authentic typesetting (and don't get me wrong; I use LaTex a lot myself). You can do that in HTML/CSS too. Actually HTML is more flexible on this because you can provide different views (e.g. Sans-Serif vs Serif fonts) for your reader for on-display reading and printed-out reading.

EDIT: typo

If there were a browser plugin that applied Knuth's linebreaking algorithm for printouts, this would be more appealing.
You can compile LaTeX to two different output formats if you want to. Sure, you'd have 2 different output files, but e.g. for slides, thats done very often.
Older generation, sure. But add about 80 that I know that prefer iAnnotate and an iPad or Surface to your list.
Actually, HTML is nearly there. I tried to replicate one of my ACM-style LaTeX papers into HTML and convert it to pdf via browser. Biggest problem: position the copyright box on the first page, left column, bottom and flow the text around it. There are minor problems with browsers (e.g. Chrome does not support column-count CSS in print output), but hopefully that will improve over time.

I did not tackle the bibliography problem: Import bibtex into HTML and correctly link citations into bibliography. That will be some work.

Maybe PrinceXML can do it, but it is not Free Software.

My proof-of-concept HTML version: http://beza1e1.tuxen.de/acm_html/test.html You can spot a few LaTeX commands, which got copy&pasted. ;)

My conclusion: HTML is useable for pdf generation, but is not sufficient to replace LaTeX.

(The author:) This issue is all about interfaces. To "use HTML" does not mean "write your papers in HTML". It means "present the final result in an HTML-compatible format", so that any user could view it seamlessly and fluidly. Fluidly means they should be able to click on a citation and see it appear e.g.

The HTML standard, which expressly makes room for foreign technologies, when viewed as a standard is immensely more powerful than good old Latex. And in fact, if typesetting is your concern, you will already find JS libraries addressing this.

The big thing is: the HTML standard allows for future technologies to be embedded in your docs. The Latex linguistic ecosystem does not.

This point is only made clearer when one realizes that the end goal "to have a paper in my hand" is an artifact of past technologies. Going forward, "having a paper in your hands" will not stand as the end-goal of intellectual effort. Most certainly, intellectual work will have to be presented in a (a) standardized and (b) highly accessible and (c) highly interactive manner. Only HTML fits the bill.

It is clear that academia will switch to HTML. I am just saying: Get on with it. Why wait.

(comment deleted)
I guess HTML is a good substitute for LaTeX in cases where it is too much overkill.

What I do when I have to produce documents: Markdown if it doesn't require much formatting, otherwise move to LaTeX to have more customization power (without having to pull my hair off).

I tried to find a library to take HTML and output a PDF report, but the only thing that's worked for me is LaTeX...
I used LaTeX when writing my programming book (C# Smorgasbord) and I am really glad I didn't use HTML for it. There was just so much out there to make the whole process good and I could really focus on the content with minimal markup. Except all the stuff you need in your preamble that is.

When I had written the book, I just used tex4ht and it spit out HTML that was decent, I could just apply a minimal amount of work and apply some CSS and then I had the epub and mobi.

I'm happy with LaTeX but I'm probably never writing another book (or I might..)!

That. Plus the hability to break your document over several files, the several kinds of automatic numbering, and the completely logical structure of the markup (your book is divided on sections and chapters, not in divs).

Add to that that TeX is the only user friendly portable markup of math available.

TeX, especially with the MicroType package, still produces the highest-quality machine typesetting available to mortal man (eg. people who are not employed by Random House or something). Any effort to replace TeX with some other tech stack probably ought to replicate this typesetting quality, which is going to be _really hard_. Smart people spent a long time getting TeX output where it is today, and replicating that won't happen overnight with a switch to HTML. Those (few) of us who care about this sort of thing are consequently unlikely to take the bait of the new system.
Well, you have to use LuaTeX, though. Knuths TeX has various shortcomings like "cannot use ttf fonts" and "poor Unicode support". However, some packages might not be adapted to LuaTeX, yet.
> The strongest force, it seems, that keeps academia in Latex is that it is required, literally, by the publisher, as the scientist's end result.

I think that's false. The author's claim is that "inertia is why we still use LaTeX"; I think the strongest force that keeps the publishing community in LaTeX is that it does a hell of a lot more than HTML.

For people who are reading papers all day, typesetting matters. If I need to digest a difficult concept, I don't want to spend any brain cycles at all on bad formatting, because I want to spend all of them on the content. The HTML experience today isn't capable of producing something readable when I'm at full capacity with the paper's content, and I suspect that reviewers feel the same way.

So, no, "a simple alternative" doesn't exist, sadly.

(comment deleted)
A great solution already exists: pandoc.

It allows people to generate the required markup from their favourite mark(down)up.

Focusing on scientific academia, the workflow of data to paper is already solved with ipython+pandoc (ipython notebook).

We have started using ipython notebook 2 months ago, and never looked back. The ipython notebook allows us to do our postprocessing with report write up, making beautiful graphs in matplotlib export it to single file HTML to share with supervisors and collaborators, and then save the entire thing as latex as a starting point for a high quality latex article. When the images are being overhauled we go back to the notebook, save as pdf/svg/png.

I wouldn't like to sound too harsh, but honestly, it seems like the author doesn't have any idea about what LaTeX can do, or what is it used for. Many of us would prefer LaTeX over HTML for almost any kind of document, without hesitation. It has many more functions both at lower and higher level, it's easily extendable (tired about \left( and \right)? Just define a \paren{} function! And that's just a tiny example), it has guaranteed support for certain characters (in HTML+CSS+Js, the browser can affect the font and possibly the encoding), etc., etc., etc. Well, yeah, it probably can't be used to create a web app, but, you know, most documents don't have the slightest need to behave like a web app.

It reminds me of the people who want to "fix email", without realizing that the only problem is that email doesn't cover certain use case that affects them, but it's fine for a lot of purposes.

I actually prefer making ( and ) be active characters that expand, in math mode, to \left( and \right) -- as long as I never need them for anything else, I'm happy.
Eventually, academic papers should be interactive because taking advantage of electronic media can communicate so much more.

See this talk on "Media for Thinking the Unthinkable" by Brett Victor: http://vimeo.com/67076984

There still have to be a bunch of changes before we get there.

I agree with your general statement, but I completely disagree with anybody implying that the correct time is now or just a few years in the future.

We do not know how to use interactive documents well.

A couple of alternatives you might enjoy:

http://www.stat.uni-muenchen.de/~leisch/Sweave/

http://orgmode.org/worg/org-contrib/babel/

These don't fix all the problems mentioned, but they definitely fix this one "It is grossly non-interoperable with other modern scientific tools, and mainly it is unable to embed interactive (i.e. “non-dead”) content generated by other tools.".

But why prefer Latex to HTML? Latex makes a beautiful, well-structured document every time. I don't think I've ever made something beautiful in HTML.

The author ignores several advantages of LaTeX, one being: a commitment to forward-compatibility. On any recent version of LaTeX, I can still compile documents from decades ago with a reasonable chance that they still render the same.
I do think a project website is a great complement to an academic paper for collecting all relevant information into one place (author info, supplementary material, citation information). I know most Computer Graphics authors have web pages for their papers that include the paper, accompanying video, reference information and very occasionally a demo. I don't think it is a good replacement for academic papers however.

Academic papers are intended to be static, finalized content so I don't see the need for anything more than hyperlinks, and even hyperlinks are problematic because the content they link to disappears so often. Because of this PDF makes a great export format because it is nearly as old as HTML, standardized and you know your paper will always look the same. And for generating academic paper PDFs there is nothing that produces better looking papers than LaTeX.

As for standardization, TeX is older (1978), more standard (a single definitive reference implementation), and more stable (no feature changes since 1989). LaTeX is not quite as stable (last release was in 1994 with a new version planned for some time in the future) but I would argue it is still more stable than HTML.

Slightly ironic that due to the lack of sub-pixel positioning in HTML my browser (FF 26) has trouble rendering that blog’s (weird?) random rotation and skew transform on the main DIV elements.