latex: adding pagebreaks at sections

May 11th, 2007

Stephen Wright once said something to the effect:

I have a huge collection of sea shells. It's spread out on all the beaches of the world.

That's an exact description on the state of latex documentation. Sure, here's probably the most powerful typesetting language known to man, well probably just the one man who actually knows it, the rest of us know bits and pieces. But, when you actually need to do something that you haven't done before, or you've done but you can't remember, bon voyage.

Safe trip on that extensive google search, finding ancient web pages describing good old techniques (latex hasn't changed much over the years decades), 404 links to packages that once were in use, and a great deal of tips & tricks that seem useful, but are nothing like what you need to do right now.

Sometimes you'll find the answer. Sometimes you'll give up. Sometimes you'll conclude it's not possible (or at least, not unless you're a latex wizard). In general, it is possible. But because latex is used and abused by so many in so many different ways, over so many years, it's naturally hard to keep track of who accomplished what and how.

But, there is no centralized documentation at all. Latex is so huge that it needs to be extensively documented, but what you find instead is some professor who wrote a tutorial for his students for that particular assignment, or a list of all symbols you can use, or all kinds of bits and pieces, but nowhere can you find the whole. Not how the different programs are related to each other, how to write a fairly general Makefile for them, how to actually construct a workflow out of it. For that you better hope there is someone willing to guide you through it in the beginning.

One of the things I've wanted to do for some time is enforce a pagebreak before every section, because in some cases it just makes sense. Thrilled that I am that today I stumbled upon one of those ancient pages that has a working recipe for it. When you look at the solution, it's ridiculously simple, but when you don't know it... well.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pagedsections}[2007/05/11 Adding pagebreaks before sections]

\let\oldsection = \section
\renewcommand{\section}[1]{
	\pagebreak
	\oldsection{#1}
}

Then, of course, include it into the document as usual:

\documentclass[12pt]{article}

\usepackage{pagedsections}

\begin{document}
\section{first}
blahdeeblah
\section{second}
blah
\end{document}

This lack of documentation is common for applications that predate the age of the internet, or at least the "modern" internet, not including usenet and whatever other deprecated forms of communication. For instance, bash suffers from an acute lack of in-depth documentation.

the state of RAW support in linux

May 11th, 2007

This only affects you if you have some source of RAW images, typically a camera would be that source. Then the RAW images need to be post-processed (which of course is something that's already done if you extract JPG's instead of RAW images from the camera) and converted to a target format, like JPG.

Viewers/browsers

The best one I know so far is showfoto, a component of digikam. digikam itself is fussy about images having to be part of albums, but showfoto has an adequate image browser with exif data display and some statistics about the image. It's also worth noting that digikam itself has been given a lot of attention, and has recently developed into a much better and more useful program than it was a few years ago.

Rawstudio also has a rudimentary image browser.

Converters

For this I would advocate ufraw. It's a standalone program, but it's also a plugin for the gimp. The interface is straightforward and quite handy.

showfoto/digikam also has features for conversion, but they are somehow tucked away in the menus and harder to find.

Rawstudio aims to be the tool of choice for this, but for the moment is seems rather immature and the interface could use work.

I think I read somewhere that Krita is supposed to convert its inner colorspace to be 16bit, which would make editing RAW images native, without needing to convert them first. That would be awesome. For the time being, I can't say anything for Krita, because it crashes the moment I start it (probably a bug in the koffice ebuilds).

Status

So the support for RAW images is quite encouraging. Not as nice as in Photoshop CS3, and this applies principally to the conversion options and the types of adjustments that can be made, but decent all the same.

the finest Microsoft product I ever owned

May 9th, 2007

The Microsoft Intellimouse Explorer 3.0. Yeap, they may sell a whole lot of crappy software products, but this is one they really got right.
microsoft_intellimouse-explorer.jpg

Best mouse I ever had. Before the optical age, mice would clog up with dirt and wear out. Well not anymore. I've had this one for a great many years, the longest lifespan for a mouse yet.

It's so ergonomic that any other mouse feels totally alien and awkward. The only problem is that the wheel scrolls so softly that the threshold for scrolling a bit too low, and sometimes it skips on its own. So when watching a movie in mplayer, it will seek forward without being asked to.

But otherwise it's perfect. Up to now. It seems the buttons are getting worn out by now, and sometimes one click registers as two. This isn't uncommon with crappy mice, I've seen it before. But in this case a sure sign of old age. It's time to replace this old trooper.

Any recommendations?

WW2: the terrible experiment

May 7th, 2007

The terrible sociological experiment that never should have left the lab, Nazism. Here is an exerpt from a book on the subject that describes how society changed gradually, imperceptibly, until it was too late.

It's a stunning piece of psychological experimentation.

understanding monotheism

May 6th, 2007

Monotheism is the canon that there is only one god. You see, before monotheism was "in", people had differnet gods for different things, a god for good health, a god for battle and so on. And whichever it was they needed help with at that moment, that's the god they would pray to. But monotheism is very strict on this, only one go-to-guy.

If you consider the implications, they would have to be wide ranging. First of all, from an administration point of view, it's a lot easier to send all your mail to the same guy, regardless of your case. Secondly, you don't have to worry that some gods would feel slighted because you constantly do business with others.

Since there is only one god, however many "religions" you could invent, they would always address the same guy. And indeed, this is something the major religions accept, that through Judaism, Christianity and Islam, it is the same god you worship. This is a very troubling truth, for several reasons.

If there are several paths to god, several ways to reach him, which is the best one? Which is the way that given a lifetime of deeds based on those "guidelines" gives you the highest "score" with god? What is the best way to ace the test? Is god going to reward followers of one religion higher than followers of another? That doesn't seem fair, does it?

I think intuitively we tend to believe that god *is* fair. It *does* pay off to be a good person, god will reward those who are good and punish those who are bad. Isn't that what we believe? So he shouldn't treat you better for picking one religion over another, should he? Because they are all ways of reaching him.

But if all [monotheistic] religions are equally good, it means that they are instances of one another, that they are redundant. Consider the following illustration from mathematics.

f(x, y) = x * 2 + y * 2

g(x, y) = (x + y) * 2

f and g are functions. In fact, they are equal, because they produce the same output for the same input. As long as this condition holds, it doesn't matter what happens inside, it doesn't matter how the output is computed. All that matters is what the result it. It may be that g is more "clever" in computing the result than f, but both do the job just as well. What it boils down to is that you only need one of f and g.

This is a mathematical illustration of what we've already established about religions. All are ways of reaching god, equally good ways. However it is you go about reaching god through these different paths, ultimately gives you the same outcome. And that means.. one is as good as the other. There may be one that is more "clever" or "efficient" or "easier", than another. And if so, why wouldn't you pick the most "clever" way, just like a mathematician would use the function that gives him less work?

If two religions don't specify that you must be a lifelong follower to be worthy of god, we can consider them interchangeable. In Christianity, you can become a follower at any point in your life, and god won't reject you. If that's also the case with Islam, then you can switch between them.

In particular, this gives you flexibility. If as a Christian you move to a country where Islam is the standard, you can switch and not "miss a step". Or if you don't like praying as much as you should in Islam, you can become Christian and pray less.