Archive for January 2006

Fight the boycott — buy Danish

Janus reported on a strange thing that is happening right now: Danish dairy products are being boycotted by several Arab countries because Jyllands-Posten, a major Danish newspaper, printed twelve pictures of the prophet Muhammad.

As Stéphanie argues on his page, freedom of speech is not meant to be used to insult other people. The pictures can, for example, be found here and I can fully understand that they are insulting for a believing muslim since they depict Muhammad as a terrorist and oppressor of women.

But still, buycutting products from random Danish companies is not going to help — it is only going to get innocent people fired, the first 100 employees in Arla has already been laid off. If you must, then attack JP, write letters to your local newspapers and so, but don’t blame the Danish government or Danish companies for something they didn’t do.

The LaTeX Font Catalogue

It’s a common misunderstanding that when you typeset something with [LaTeX][], then you have to use the Computer Modern typeface, a beautiful font covering tons of characters designed by Donald E. Knuth.

Okay, that’s probably not entirely true — you might know that \usepackage{pxfonts} will give you Palatino (Garamond) instead, or that \usepackage{times} does the same for the insanely popular Times New Roman.

But did you know that there’s many more available? Palle Jørgensen from the Danish TeX User Group has made a cool site called the LaTeX Font Catalogue where you can check no less than 94 freely available fonts for use with TeX and LaTeX!

A whopping 21 comes with support for typesetting math. Most fonts simply have the characters needed to typeset letters and numbers plus the common pecial characters, but some fonts also have the glyphs needed for stuff line integrals, arrows, greek letters, etc. Using two different fonts (one for the body text and one for the math) is normally a bad idea because the fonts might have different weights (different blackness) and different height. Still, people often mix, say, Helvetica (a sans serif font!) with Computer Modern (a very “seriffed” font!)… it do that, it looks icky.

Here’s an example of some math typesat with a font called Kurier Light Condensed:

Biot-Savarts Law typesat with Kurier Light Condensed

Even though I’ve used LaTeX for years now, and I’ve been interested in typography for some time, I was surpriced to see so many free fonts available for LaTeX. The problem is actually not the availability of fonts — I guess that most of us have a couple of hundred TrueType fonts on some CD somewhere, and TrueType fonts can be used with a modern version of (pdf)LaTeX. The problem is just that using an arbitrary TrueType font involves some converting and some configuring — it needs the right infrastructure.

But for those 94 fonts this has already been done by the nice people who make the TeX Live LaTeX distribution. I’m currently using the default LaTeX that comes with [Debian][], namely teTeX and it has always worked great for me. But now I’m looking forward to seeing TeX Live in Debian — the packages have now entered experimental, and that’s an important step on the way to be included with Etch, the next stable version of Debian.

Hehe, Google AdSense pays off!

I'll get one of those! :-) I would like to say a big “Thank You!” to those of you who still read my page the regular way — you know… with a webbrowser pointed to http://mgeisler.net/ and not by the planet or some other cheating way where you don’t see the advertisements…

You’ve clicked 664 times on the Google AdSense adds I’ve put on my pages, and thus earned me $100! I started in June 2005 with AdSense, so this is a little more than $14 a month — a nice little extra income. I would of course be happy to hear about experiences from others.

I haven’t seen the money yet, but it will be put in my bank account at the end of this month, and I believe I’ll be smiling on my way to the bank! :-)

Stale RSS feeds?

Stale planet Before I created the planet (what a funny thing to write :-) I never looked at my RSS feeds, but now they’ve suddenly become very important. And they’re wrong! Or rather, the Etag and Last-Modified headers sent out are false, and so browser and feed aggregators wont be updated as they should.

Take a look at this trace caught with the excellent Live HTTP Headers plugin for Firefox — I’ve removed most of the other headers except for the Etag and Last-Modified headers. First I request Rune’s RSS feed for comments using Shift-”reload” to make Firefox bypass its own cache:

GET /?feed=comments-rss2 HTTP/1.1
Host: kirkebrand.dk
Pragma: no-cache
Cache-Control: no-cache
HTTP/1.x 200 OK
Date: Wed, 25 Jan 2006 21:12:50 GMT
Last-Modified: Wed, 25 Jan 2006 09:14:20 GMT
Etag: "0dfff2fe5ab59c79c6105ac336b388ed"
Status: 200 OK

Bravo! We get the feed back.

I then posted a comment, which should update the feed. Reloading in Firefox looks like this where it does a conditional HTTP request by sending the Etag and Last-Modified headers along:

GET /?feed=comments-rss2 HTTP/1.1
Host: kirkebrand.dk
If-Modified-Since: Wed, 25 Jan 2006 09:14:20 GMT
If-None-Match: "0dfff2fe5ab59c79c6105ac336b388ed"
Cache-Control: max-age=0
HTTP/1.x 304 Not Modified
Date: Wed, 25 Jan 2006 21:13:54 GMT
Last-Modified: Wed, 25 Jan 2006 09:14:20 GMT
Etag: "0dfff2fe5ab59c79c6105ac336b388ed"
Status: 304 Not Modified

Hmm… that shouldn’t have been a 304 Not Modified, but a 200 OK with a new Last-Modified header and a new Etag! The funny thing is that when I press Shift and reload the page I and get the updated feed, but the headers still look like this:

http://kirkebrand.dk/?feed=comments-rss2
GET /?feed=comments-rss2 HTTP/1.1
Host: kirkebrand.dk
Pragma: no-cache
Cache-Control: no-cache
HTTP/1.x 200 OK
Date: Wed, 25 Jan 2006 21:14:08 GMT
Last-Modified: Wed, 25 Jan 2006 09:14:20 GMT
Etag: "0dfff2fe5ab59c79c6105ac336b388ed"
Status: 200 OK

So something is definitely wrong here! I would be happy if some of you could try out the procedure above yourself and report your findings. I’ve seen this problem on my own blog and on Lars’ blog too, so the problem seems to affect version 1.5.2 as well as the new 2.0.

Planet DAIMI is 7th for “DAIMI”

Google was here If you search for “DAIMI” in Google, then you’ll find our nice little DAIMI Planet listed as result number seven. I think that’s pretty cool to become number seven out of 1,780,000 :-) And Google has been pretty fast too — the planet has only been 11 days online.