Wednesday, October 23, 2013

Oh happy day - Biblatex with Polyglossia is nigh

A couple of days ago the fine folks over at biblatex finally fixed bug #69, which is about the usage of biblatex with polyglossia instead of bable. This means I have lost the last excuse to use babel with lualatex and can finally start into the bright future ahead without that crappy package. I was reminded of how bad it is when I put together a list of common errors we see in #latex on freenode related to babel. Well at least now I personally won't have to touch it again. Burn Babel Burn. Good Riddance!

Installation is easy and risk free if you do it in texmf-local. Worked great for me.

Latex is actually getting cleaner code wise with all these modern packages like fontspec, biblatex+biber, polyglossia, glossaries+xindy,

Wednesday, October 9, 2013

ZSH Functional Programming Tools

Today I learned that you can have not only map and filter but also other functional programming constructs in plain zsh. zsh has outdone itself again, just ridiculous. Having functional tools seems to have become something like second order turing completeness in that it gives you a notion of productivity as to what can be accomplished.

Saturday, August 10, 2013

Fonts with latex - the whole scoop

This is so buried inside of other unhelpful questions that it took a long time of determined searching to find, but it's the definite guide. The only thing it lacks is that you can find the font family names under linux with
fc-list :outline -f "%{family}\n"

Thursday, June 20, 2013

Debugging a zsh startup script

I had a weird problem during startup of new shells. Usually when I don't have a clue, why something works one way or another (or doesn't) I start strace -f and have a look at the syscalls. Now when you try that on a shell, that doesn't really give you what you are looking for, which is kind of obvious if you think what a shell does and how it works. Now what? You have two simple options: set -x or setopt XTRACE VERBOSE (alternatively start with zsh -xv); both did the trick for me.

Monday, March 11, 2013

mac forensics

I was just trying to get some scripts out of my old macbook air install. Back when it broke I took a snapshot of the disk with dd and now had the image lying around.

What I usually do (and tried is something like this:)
  • Have a look with fdisk -l into the image where the partitions are (fdisk -l img)
  • Take the offset of the partition I want, multiply by the block size and use that to mount it, e.g. 
    mount -t hfsplus -o ro,loop,offset=209736192 mbabackup /mnt
Now that didn't work out for two reasons, first it's a gpt table so fdisk is of no help. parted knows about them but I found no way to get the exact number, so in the end I used mmls (sleuthkit). Using the offset i found there I got this error:

mount: wrong fs type, bad option, bad superblock on /dev/loop1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

This apparently is a bug in the hfs(plus) driver, since the exact same approach works with everything else.
In comes kpartx:

kpartx -l img
  shows us the table of partitions (-g for force gpt if in doubt)
kpartx -av img
creates new loop block devices which you can then just mount
mount -o ro -v /dev/mapper/loop1p2 /mnt/
 
That's actually a lot easier than before, great.

Monday, February 18, 2013

Visualizing Dimens in Latex Documents

Rule based typesetting like LaTeX (or CSS for the matter) uses lots and lots of lengths that can be adjusted (or adjust itself in relation to some other quantity like the font size or other length). I believe there are over ten regulating how a list is typeset alone. If you typeset for a while you'll pick up a few over time, I'd say parindent and parskip usually come first, some are so obscure you'll never need them, some shouldn't even be touched, since you risk screwing your layout in ways that you thought only MS Word is capable of. For the middle category of the ones you don't know and still want to adjust I just found a great package. The layouts package enables you to actually see how they all play together for most major latex features. This is so insanely helpful and you don't actually need the package sice everything is reprinted in the manual of course. To see how great it really is see this picture for lists.

ampersand and that

I just read a great article about the letters historically part of the english alphabet but got left out. While I knew a few already I've never heard of number 8 before and it's really interesting to know it exists. Language development is something I really should delve in some day.