Wednesday 28 September 2011

Jetsetting Dragonflies

Muhammad Mahdi Karim Image: Muhammad Mahdi Karim

Not only not are dragonflies some of the best aeronauts of the insect world, some also have the greatest endurance. A couple of years ago, it was discovered that the globe skimmer dragonfly (Pantala flavescens) migrates from India to South East Africa via the Indian Ocean islands of the Maldives and the Seychelles, and back via East Africa. That's a grand total of around 18 000 km. That's a fair bit further than the 11 000 km I recently traveled from New Zealand to South Africa. It is considered that the round trip takes place over several generations, but it's still an amazing phenomenon.

For more information, there's news reports from Wildlife Extra and the Daily Mail; and a blog post from National Geographic. There's even a graphic on DeviantArt celebrating the journey. To hear it from the horse's mouth (so to speak) watch a video of Charles Anderson himself talking about his findings.

Tuesday 20 September 2011

Beamer themes

I enjoy using Beamer for my presentations. Initially, the limitations it imposes (particularly on graphics placement) are irksome, but after a while you realise that they actually help you create better presentations faster. I've tried 'quickly' putting together something in PowerPoint since starting to use Beamer and found it so fiddly that I went straight back and did it all in Beamer. However: I still find the themes and colour schemes provided in the base distribution of beamer to be less than ideal, and disobey the university's guidelines for presentations. As I garner the skills to start preparing my own themes, a list of customised Beamer themes will provide inspiration and guidance. In particular, I like the look of the Torino theme.

Thursday 15 September 2011

Extracting comments from PDFs

I received a reviewer's response from one of my submitted papers a while ago, and have delayed working on it because they had written their comments in the PDF using "sticky notes". Unfortunately, these notes don't print very well. I like to be able to read things off the computer, so this presented a problem. Thankfully, PDFs encode their sticky note comments in ASCII-formatted text, which meant that I was able to extract the comments using the beautiful linux command line:
grep -o --text /Contents\([^/]* review.pdf | tee comments.txt
This single line resulted in a nice text file for me to print as I please.

Wednesday 14 September 2011

1 2 3 steps to publishing a scientific comment

For a humorous, yet ultimately disturbing tale, check out Rick Trebino's How to publish a scientific comment in 1 2 3 easy steps, then wonder how scientific journals managed to achieve the power over the research process that they currently have.

Tuesday 13 September 2011

Quote: GK Chesterton from 'Orthodoxy'—Nature

The essence of all pantheism, evolutionism and modern cosmic religion is really in this proposition: that Nature is our mother. Unfortunately, if you regard Nature as a mother, you discover that she is a step-mother. The main point of Christianity was this: that Nature is not our mother: Nature is our sister. We can be proud of her beauty, since we have the same father; but she has no authority over us; we have to admire, but not to imitate. This gives to the typically Christian pleasure in this earth a strange touch of lightness that is almost frivolity. Nature was a solemn mother to the worshippers of Isis and Cybele. Nature was a solemn mother to Wordsworth or to Emerson. But Nature is not solemn to Francis of Assisi or to George Herbert. To St. Francis, Nature is a sister, and even a younger sister: a little, dancing sister, to be laughed at as well as loved.


Chesterton GK. 1908. Orthodoxy. Image, New York (2001 Edition)
Chapter VII: The Eternal Revolution. Page 115.

Monday 12 September 2011

post-installation script error solved

Had some problems today with aptitude getting its knickers in a knot, returning the error
dpkg: error processing install-info (--configure):
subprocess installed post-installation script returned error exit status 1
. This blog post helped to solve the problem simply and easily with the commands:
sudo rm /var/lib/dpkg/install-info.postinst
sudo aptitude reinstall install-info
Many thanks to azimout!

Sunday 11 September 2011

Alternately coloured line environment with fancyvrb

Recently, while typing up an R tutorial, I used the LaTeX fancyvrb package to create two environments—one coloured blue for R commands, and one coloured red to display R output. This worked well for large blocks of each type. Then I decided I wanted to display a number of one-line commands and output alternately. Looking up the fancyvrb package documentation, it was easy to get alternate colours. The problem was, it did it globally. My environments for input and output also went psychedelic.

After a bit of messing around, I discovered the following solution. My red environments remain red, my blue environments stay blue, and alternate colours only turn up when I want them to!


\documentclass{article}
\usepackage{fancyvrb}
\usepackage{color}

\newcommand{\ChangeLine}[1]{%
\ifodd\value{FancyVerbLine}%
\textcolor{blue}{#1}\else\textcolor{red}{#1}\fi}

\DefineVerbatimEnvironment{blueEnv}{Verbatim}{formatcom=\color{blue}}{}
\DefineVerbatimEnvironment{redEnv}{Verbatim}{formatcom=\color{red}}{}
\DefineVerbatimEnvironment{alternate}{Verbatim}{formatcom=\renewcommand{\FancyVerbFormatLine}{\ChangeLine}}{}


\begin{document}

\begin{Verbatim}
aaaaaaaaaaa
bbbbbbbbbb
cccccccccccc
ddddddddddddd
\end{Verbatim}

\begin{blueEnv}
aaaaaaaaaaa
bbbbbbbbbb
cccccccccccc
ddddddddddddd
\end{blueEnv}

\begin{redEnv}
aaaaaaaaaaa
bbbbbbbbbb
cccccccccccc
ddddddddddddd
\end{redEnv}

\begin{alternate}
aaaaaaaaaaa
bbbbbbbbbb
cccccccccccc
ddddddddddddd
\end{alternate}

\end{document}

Thursday 1 September 2011

Guardian article about academic publishing

I agree with a lot of this article in the Guardian. Especially:
Reading a single article published by one of Elsevier's journals will cost you $31.50. Springer charges €34.95, Wiley-Blackwell, $42. Read 10 and you pay 10 times. And the journals retain perpetual copyright. You want to read a letter printed in 1981? That'll be $31.50.
I get especially annoyed with the said letter was published in 1881, and therefore out of copyright yet they still charge you for it.