]> James Pickering – Computer Stuff

James's Den

Computer Stuff

I run Ubuntu Linux as my main OS these days, and as anyone who runs an open source operating system knows, the temptation to tinker can be hard to ignore. Occasionally, that tinkering pays off, and this page has a few bits and pieces that some of you may find interesting.

Some LaTeX Styles

In the course of my maths PhD, I've had to develop a couple of new style files for LaTeX, where stock LaTeX was missing the features I needed. Previously, these style files were buried in the source code for LaTeX documents that no-one was likely to look at, so I decided to package them up so anyone could find and use them.

Thesis Titlepages for amsbook

My university, like many others, has pretty anal regulations about the layout of thesis title pages. Unfortunately, document classes such as amsbook don't include the necessary fields on their title pages by default, so it's necessary to use custom code.

There are currently two main ways people deal with this, and I'll explain why I don't like either of them:

  • Template files: At most universities, the most experienced LaTeX user has usually made up a thesis template, that anyone is free to use. These are perfect if you're just starting out, as they give you a ready-made template to start from. However, they're no good if you've already started writing your thesis. Even if they can be added to an existing thesis (by means of a style file, for example), they can be problematic, as they usually auto-include various packages and macros that you may not want, and mean adding kludgy, non-standard code.
  • Custom Made Title Pages: If you're an experienced LaTeX user, creating a custom titlepage with the \begin{titlepage} environment isn't too tricky. However, you then need to modify headings to include titles or authors, and it means messy non-standard code. In particular, if you're using something like LyX that creates titles with \maketitle, you're boned. Also, it breaks the separation between content and style that LaTeX values so highly

My new theshead.sty LaTeX style automatically tweaks the title page to conform to the Newcastle University thesis submission guidelines, when used in an amsbook document. It doesn't require any changes to the structure of the document, and where possible, it uses information provided by the amsbook class (like \title, \author, \address and \date), as well as adding a couple of other fields, in a similar vein (\degreeclass and \logo). It works with LyX, and doesn't change anything beyond the title page.

Colour Changes in The Beamer smoothtree Theme

In my Beamer presentations, I like to have different colour for sections on different subjects. With most Beamer themes, you can acomplish this with code like

\definecolor{refresh}{RGB}{255,0,0}
\setbeamercolor{structure}{fg=refresh}

which gives subsequent slides a red colour scheme. However, the smoothtree theme doesn't work properly with this code, as it fixes some of the colours at the beginning of the document.

NewSmooth.sty is a slight modification of the smoothtree theme, that removes this limitation. It slows down compilation a touch, but on modern computers this means less than a second's difference.

Both style files are available in this archive

NewSmooth.sty can be distributed under the GPL v2, or the LPPL v1.3. theshead.sty can only be distributed under the LPPL v1.3. This is due to code inherited from other style files.

Keyhole themes for Firefox 3 under linux

When the people at mozilla were trying to decide how to theme Firefox 3, they decided to design themes to match each operating system it runs on. In some ways, this was easier under Windows and OS X, as these have a fairly consistent look and feel, so they were able to push the boat out a little, and came up with the "keyhole" design idea.

Linux was more of a problem, as its look and feel is highly customisable - different distributions can look completely different - so the design team decided to use the OS's built-in GTK+ buttons instead – a decision I totally agree with.

That said, it's quite possible to design a keyhole based theme for a specific distribution, so I hacked together a couple of keyhole themes for linux, based on the Windows XP one and the standard linux one. Keyhole Human (screenshot) is coloured to match the "Ubuntu Human" theme, and Keyhole Custom (screenshot) is coloured to match the particular theme I use (see below).

Note that this theme is released under the MPL/GPL/LGPL triple license.

Murrina Clean

Murrina Clean is a modified version of Murrina Personal, a GTK+ theme using the murrine theme engine. For a long time, I'd been disappointed by the fact that all the murrine themes out there used predetermined colours, so I couldn't choose my own. I was impressed when I found Murrina Personal, but I didn't like the way it generated some of the colours it used, so I tweaked it a little, to make Murrina Clean. Screenshots (1) (2)

The colour definitions work for dark or light colour schemes, but the theme itself isn't that well suited to dark colours, so I created a variant which uses the same colours, but different widgets, to go with darker themes, which is Murrina Sharp. (Screenshot)

Also for anyone running Murrine 0.90 (found in Ubuntu Jaunty), I've added a modified theme, MurrinaCleaner, which uses a couple of the new features (which means it doesn't work with earlier versions, unfortunately).

Note that this theme is licensed under the GPL.

Rock, Paper, Scissors

A few years ago, I discovered that a friend of mine could consistently beat another friend of mine at rock, paper, scissors. The friend in question was reasonably bright – he wasn't just playing "rock" every time – and that set me off wondering if a computer could do the same.

Apparently I wasn't the first to ask this question; it turns out the University of Alberta had been running a computer Rock Paper Scissors competition for a couple of years. I thought it'd be interesting to pit the best of the bots against a human player, so I got the testing suite they used, and made some modifications to allow a human to compete instead. The package includes the source, a windows version, and a linux version. Go ahead and try it out.

Links

I can't take any credit for these things, but I've found them useful; so might you.

  • Ultimate Gnome: Not as macho as it sounds. A nice scalable icon set for GNOME.
  • xFX Screensaver Settings: A replacement for gnome-screensaver-preferences, which gives you access to more settings.

This site was created with KompoZer and Screem. Contact me at motu@jamespic.me.uk. Unless otherwise stated, all material on this website is released into the public domain.

For optimal viewing, Internet Explorer users should either download MathPlayer, or use a better browser.