This solution is from ignasi on [latex-community.org](http://www.latex-community.org/forum/viewtopic.php?f=45&t=13279#p50336))