Science should look better on screens than on paper.


(a work in progress!)

One article, 3 ways: PDF Journal HTML Webtex

Formal scientific communication has barely evolved since the 19th century. It should be better and more pleasant to read a scientific article on a computer screen than in print, but journals’ “electronic” articles are generally atrocious. PDF versions are usually in tiny fonts in multiple columns — because they’re meant to be inked onto little rectangular pieces of paper!

Good design isn’t the only thing but it matters more than you might think. Computer screens are infinitely tall and come with no trees to save, so high quality web design looks very different than a typical printed page — like this. Online scientific articles are harder to typeset than some things because they contain math, but they’re not that hard. It’s just that the journals don’t really care.

Webtex cares.

How it Works Installation

Leveraging 35 years of LaTeX.

LaTeX is the lingua franca of scholarly communication for physical scientists. It’s old and it’s weird, but it’s also the only way that professional scientists know how to typeset equations that look good, and there’s an important cultural heritage of nearly a million articles written in LaTeX on LaTeX can produce beautiful printed documents and contains more than enough information to create a beautiful electronic articles too. We don’t need a new way to write articles.

But we do need a new way to process them. Latex2HTML looks like garbage. You really need to muck with the TeX engine itself. (Because, like the PDF format, it too can’t get over its fascination with cramming things onto pages.)

As long as we’re going to update TeX … let’s truly bring it into the 21st century. Get rid of the installation headaches, the logorrhea, the random files left on your disk, and the 70s-vintage error handling. Reimplement the whole thing in JavaScript, the lingua franca of web programming, and have it spit out HTML, the lingua franca of web presentation, so that you can show beautifully-designed scientific content anywhere there's a CPU.

That’s Webtex.

(Well, that’s the dream. It’s not done yet!)

A quick demo

Here you can compare three renditions of the same article: the PDF and HTML versions provided by the journal, and the version produced by processing the corresponding files on Arxiv with Webtex:

I’m told that the demo fails on Safari, sorry :-( JS hackers with Macs, inquire within!

PDF Journal HTML Webtex

The Webtex version could be better in lots of ways (especially the references and the figures), but I think it’s pretty good. And a lot of the possible improvements are matters of CSS tweaking and JavaScript hacks.

(Here I’ve pre-compiled the LaTeX source into an intermediate format that can be rendered quickly, since the processing is still very slow. But it’s possible to point your browser at a Zip file of LaTeX sources and get identical results.)

What’s next?

The sky’s the limit. On my mind:

More prosaically:

I haven’t yet polished things so that you can just build your own distribution and try compiling your own favorite document. That’s coming soon, but in the meantime the source code is on GitHub and it’s ready for action. Go ahead and file issues.

Scope out the code Install it

Who’s behind all this?

One day, a cast of thousands. Today, that’s Peter K. G. Williams, also known as @pkgw. Say hi.