Friday, September 25, 2009

Digital signatures made easy

Some time ago, a friend of mine discovered that somebody was plagiarizing the content of this blog. I'm not going to provide this guy with link juice, but you can find it through Google easily. The post is an exact duplicate of my Visual C++/Studio: Application configuration incorrect?, except for the title. Even my remark at the end, which clearly suggests that the author of the post is also a developer on Taekwindow, has been copied with the link intact.

Now imitation is the sincerest form of flattery and all that, but stealing my content without even mentioning my name goes too far. I posted as much on this guy's blog, but have received no response. So in the end I overcame my aversion and filed a DMCA infringement notification to Blogger.

Have a look at that form. Scroll all the way down. What will you see? Look at that! Isn't it beautiful? I'm supposed to sign a digital form… by typing my “signature” in a text box! Also, this is legally binding!

That cracked me up. It cracked me up so completely that I typed a beautiful capital X in that box and hit Submit.

Today, I received an e-mail from Blogger. It said:

We have received your DMCA complaint regarding no-link-juice-for-you.blogspot.com dated 09/20/09. Our policy requires that DMCA complaints be signed by the copyright owner or an agent of such. As your DMCA complaint was unsigned, we cordially request that you re-send us a signed copy of your notice by fax to (650) 618-2680. Once we receive your complaint, we will investigate the issue and process your request accordingly.

I still wonder what would have happened if I'd just typed my name into that box.

Hilarious.

Monday, September 14, 2009

Centering a figure on the page in LaTeX

With those wide margins of LaTeX, it sometimes happens that you have a figure or table that is too wide, and just sticks out to the right. Chances are that you want it centered, sticking out equally to the right and to the left, but tough luck: the standard center environment still aligns it with the left margin, and so does the \centering command.

I was about to write a package to provide an environment that centers its content on the page instead of inside the text. This is not too difficult, but preventing the overfull \hbox errors is tricky (they are so bad that even \hbadness=10000 has no effect). But then I stumbled into a standard LaTeX command that does exactly what I want.

So here's how to center your figure whilst ignoring the text margins:
\centerline{\includegraphics{...}}
It also works inside float environments such as figure. That was easy!