Saturday, 2 July 2011

The making of

It seems a requirement these days, that whenever somebody makes a film or TV show, they also have to make a documentary explaining how challenging it was to make the film or TV show. Following in that tradition I will explain the angst that I went through to demonstrate the strength of 2 pi.

I put a lot of effort into that post about pi. Maybe you noticed. Even so, I bet it is riddled with typos and mistakes. I put in many hours that I could have chosen to spend playing Starcraft.

It was clear to me when I was doing my Ph.D. that a typical mathematician spends 20% of their time working on content and 80% making their work look pretty. I don't have the time or effort to make my internet maths look pretty, and the result was, as with all things, a compromise. I figured it would be a good idea to hunt around for a sensible and quick way to get the maths in my blog looking good. I am not sure I have found it yet.

Let me rant about some of the choices I was faced with and the frustrations I had as I prepared to educate the world about 2π. Mathematicians write real maths in LaTeX. Which is good at what it does, which is typesetting. I have done a bit of LaTeX in my time, and almost without thinking, started getting it all installed so I could prepare my thoughts. But then I paused and considered, "How am I actually going to do this?".

I hunted around the internet for things to convert my LaTeX into HTML. There are some things that will do it for you, but very few of them are maintained. I was amazed how many broken links and webpages from 2002 I found. And things only written on linux that I can't even uncompress without getting some extra software. Maybe that is not the way you want to do it then. But I did find a good discussion on precisely the problem I was facing: how to display maths on the internet. It pointed out that HTML does not do typesetting. (I had chosen to forget this.) Instead it lets the browser decide how to lay out text, with (ideally) just a few hints from HTML tags. This makes it incredibly difficult to get good looking formulas actually encoded into HTML.

Then it occurred to me that I had spent hours reading wikipedia to remind myself about the Reimann zeta function, and I had been staring at a good example of how to do maths online. Their solution is to make each formula an image. Which is quite a lot of work unless you have some clever tool to do it for you (which I don't). And in the end that is what I did for all the big equations. Which took me some time.

So, I get all my post written with images in it and stuff and I press "preview". And it looked rubbish.

The whole thing was about "pi" so I really needed every "pi" on the page to look nice. But for some reason google have decided to use different fonts in the blog composer to the actual blog. The pi in the preview looked more like two T's next to each other. I made the decision to change the font of the whole thing to something that I hope will have nice curly pis on most browsers. But that completely messed up all the line spacing and makes that post completely inconsistent with the rest of my blogs. I still feel it was the right decision. It would be wrong to spend all my time faffing around turning every last symbol into an image when I could be having fun. And it would also be wrong to have people read "Why 2TT is better than TT", they would be like "huh?".

That was all fairly dry and boring. So here are some photos of a knitted hat to lighten things up.



No comments:

Post a Comment