planetwater

ground- water, geo- statistics, environmental- engineering, earth- science

Archive for February, 2014

Beautiful Latex Equations in OmniOutliner

with 2 comments

The mac has recently had its 30th birthday. I am too young to remember its first birthday, but I am old enough to feel the pain! I’ve never used anything pre OSX. One piece of software (as apps have previously been called) has been with me since the beginnings: omnioutliner. I won’t get into fights of outlining versus mindmapping. I think both have their place, and I also think that mindnode is an awesome software.

Taking notes that contain equations has been and is my bread and butter. When laptops were finally portable enough and affordable enough to be taken into a classroom, this was a joy for me, because I could use then omnioutliner for my notes — back then, a little app called “oo3eq” facilitated the combination of equations and omnioutliner. This is how it worked:

  • type your equation in latex into the note field of omnioutliner
  • hit a button, and a pdf would appear in the row that belongs to the note
  • the equation would still be in the note, which I found very useful for future reference.
  • having a pdf of the equation visible directly above the note, was much more pleasing to the eye, and helped following the notes that I took tremendously.

I did try to reproduce this behaviour, and you can check it out on github. There is an applescript that gets the content of the selected note as a string, which must be a valid latex math expression. This string is passed to a python script that generates a valid latex file, which is processed in the script. The result is a pdf file. Back in applescript, this pdf file is pasted as an attachment into the selected row.

Here is a screenshot how this can look like:

Screenshot of a sample document with equations

I am running this script via a key trigger in quicksilver, as described here. This works well, but is not nearly as nice as the beautiful icons that came with “kinkless gtd“, which later turned into omnifocus.

This is my reasoning for doing it:

  • omnioutliner 4 has been released somewhat co-incidental with the recent mac birthday
  • oo4 continues to have strong applescript support
  • oo3eq is not around anymore; at least I couldn’t find it, and the version I still had around did not work anymore on my current setup
  • the whole thing is reasonably quick, and I learned a few things about applescript and python

Written by Claus

February 12th, 2014 at 12:12 pm

Posted in