2015-07-11 A memoir problem

Usually I write about (some kinds of) success stories here: good LaTeX packages, my own tricks, etc. Today it’s different: I want to share a failure story, as a warning to others.

It was probably the first time I used the famous memoir class; sadly, it’s probably also the last one. Don’t get me wrong: it’s still a nice thing, which can be really helpful when preparing a book looking better than the default LaTeX settings (they might work for a scientific article, but they rather suck for a book). However, if you want to do something not directly supported by memoir, I wish you good luck. Maybe it will work; maybe not. In my case, it didn’t.

I wrote a book, in which I wanted to have thumb indices. Well, there are quite a few LaTeX packages for them; after a short research, I settled with thumbs by H.-M. Münch. It works well, and (after one or two really minor tweaks) it did what I wanted it to do.

However, it turned out that I had to prepare the pdf file for the printing house, and there should be some bleeds. Of course. I found the relevant commands in the memoir manual: \setstocksize lets you set the size of actual physical paper your book will be printed on (with crop marks when the class option showtrims is given), \settrimmedsize will set the target paper size, and \settypeblocksize the size of actual text. (Also, for the sake of completeness: you’ll most probably need to use the commands \settrims, \setlrmargins and \setulmargins, which see, and issue the \checkandfixthelayout after all the settings for them to take any effect.)

All fine.

Now what the thumbs package does (with the above commands, that is)? First, it puts the thumb marks in wrong places (it doesn’t know about the stock size/trimmed size distinction). Second, it causes the crop marks to disappear! (Never mind that memoir calls them trim marks, so that searching for crop marks in the manual is not very helpful.) Diving into the code for the memoir class and/or the thumbs package was one of the last things I wanted to do, so I decided to take a DIY approach and make thumb indices myself, with M. Schröder’s everyshi package (which is loaded by memoir anyway) and tikz (using its absolute positioning feature).

Forget about it. Any use of the \EveryShipout command and spurious pages start to appear in the document. (And that was when I gave up.)

What is the morale of that? Don’t use memoir unless you are sure you won’t need anything else, especially from the “let’s change how LaTeX deals with the fundamental stuff” department. Or better yet, ditch LaTeX with its ever-growing ecosystem of (sometimes) mutually incompatible packages (sigh) and embrace ConTeXt. (I should have written the book in ConTeXt, really. I regret I didn’t do that, though it would definitely require more time, since I haven’t used it in a while.)

Let me stress this, though: that doesn’t mean that memoir is bad or broken. It just means that if you use it together with e.g. a package messing up with the output routine, well, you’re just asking for trouble. I should have known that…

CategoryEnglish, CategoryBlog, CategoryTeX, CategoryLaTeX