Skip to main content

LuaLaTex

Using LuaLaTeX seems like a great idea, inserting the excellent embedded programming language Lua into LaTeX1 code (not really code, a very good mathematical markup language) to help with some of the inconveniences of the language.

For those of you who’ve never worked with LaTeX, imagine a simple markup language like markdown for example. The text looks clean and simple, font style changing and the like is handled pretty seamlessly and does not distract from the experience of writing the text itself.

LaTeX is not like this.

Embedding Python in LaTeX

Combining Python with LaTeX is a powerful combination. It allows for arbitrary code to be executed which either gives the results of expressions, or can be used to embed programatically certain things e.g. the paths of files or images. By downloading python.sty and including it in a usepackage block, python code can be run. I was having trouble getting this to work as it seems I was using an invalid version of python.

Mac keyboard keys with Synergy

Synergy is a great program to control multiple computers from a single keyboard or mouse even without them being plugged in. The only requirement is that theyre on the same local network. Im sharing my configuration which has my windows desktop as the server, and my macbook as the client. Using a windows keyboard creates some issues with the macbook, so here are the settings I use to map the keys correctly:

Vim is even more amazing than I first thought!

Just today thanks to this answer on SO, I realised that vim can automatically pipe text through a shell command. Just think about that for a second For a simple example you can write python code into a text file, and execute it which replaces the code with the result. for i in xrange(10): print i Selecting this text with in visual mode (you should all know how to do this) and typing

OS X 10.7 Lion: my thoughts

My first OSX upgrade went well I think. My MacBook Pro is a Mid 2009 model, as the nice new About This Mac (not sure why this is capitalised but never mind) tells me.

New about this mac window

Ive never upgraded a Mac before since my pride and joy came with Snow Leopard installed, the as-of-then most up to date operating system so I had no idea what to expect. Ive been using my Mac for nearly two years now but before that I was a pretty heavy Windows user. My other tipple is Linux, so whatever it was like I was going to be tense and anxious. 

Afloat for Mac OS X

After years of using Linux as my main system both at work and home, I got used to being able to drag windows by holding a keyboard combination and dragging with the left mouse button. The one disadvantage of the otherwise fantastic OS X is that despite being unix based, it did not have this feature. Having to drag a window by the very top bar got a little tedious, and resizing with the lower right handle was sometimes difficult.

Plotting unevenly gridded contour plots

Quite often at work I have to generate colour maps of certain things, which are generally not sampled evenly in coordinate space. I am also a huge fan of Python, so I thought to myself: can I combine these things? Well until now I didnt think you could. Matplotlibs contour plots require evenly spaced x and y points with z points to match. This is until I found a way

Installing IT++ on Mac OSX

IT++ (or itpp) is a library of Matlab-like functions. I was trying to install this as it contains a nice FastICA algorithm, but was having trouble compiling it on my laptop. I tried googling and found this, but it didn’t work for me. My issue was that it was not linking to the ATLAS library, which I required for fast computation. IT++ installed without it, but I wanted these features, so after wading through many options, I managed to root out the problem.