Peter Krautzberger on the web

I don't always use LaTeX, but when I do…

Since I haven’t published anything in almost two months, let me jot down one thought that has come to mind frequently over the past few months.

If you use LaTeX …

Well, first of all, are you sure you have to use LaTeX? By which I mean, are you sure you can’t use Markdown+MathJax or textile+MathJax or restructuredText+MathJax? Especially if you’re teaching your students, are you absolutely sure you are completely and utterly unable to use something simpler? Something that is more modern than learning a hundred bits of print typesetting that your student will never, ever need? Ok, just checking. So…

If you (have to) use LaTeX, then make HTML your primary output.

By which I mean: don’t just produce PDFs that nobody can read on small screens, PDFs that nobody can read accessibly, PDFs that nobody will want to read in 5 years.

Make HTML your first output. It’s important. HTML is the future engine for mathematical and scientific content. If you can’t produce HTML, then ur doin it rong. If you don’t produce HTML, you won’t ever help all the people working on pushing math on the web forward.

It won’t be trivial but easier than you think. Install LaTeXML and learn how to use it. (Alternatively you probably have a copy of tex4ht installed with your TeX.) How hard is it? This hard:

  latexml --dest=mydoc.xml mydoc.tex
  latexmlpost --dest=mydoc.html --format=html5 mydoc.xml

And when you run into LaTeXML limitations, then get over it, report them back, help make it better. If you run into problems with MathJax, report them, help make it better. You need graphics? Check out xyjax. You need pstricks? Check out mathapedia. You need computations? Check out Sage cell server. It’s all there, but you have to get started. To it today.

But if you’ve ever wanted math to be native on the web, then you have to realize that it won’t happen without your help.

If you’re too lazy for converting (e.g., when you’re teaching), then use something that compiles to both TeX and HTML (like markdown+MathJax etc). Pick a decent tool for it, like Qute, ReText, write on the web with FidusWriter or, write in your favorite Mac-editor with Marked, or extend sublimetext, on an iPad app use Writing Kit – and that’s just off the top of my head; there are many more editing environments that offer good syntax and MathJax integration. Many can save to TeX documents, anything can be converted via pandoc. It’s not perfect yet but it won’t get better unless you give everybody some feedback.

So, if you can, don’t author LaTeX, author into LaTeX. And whatever you do, compile it to HTML. It’s important.

I don't always use LaTeX but when I do, I compile to HTML