Tag Archives: LaTeX

Semi Open Book Exams

A few years ago, I switched one of my first year courses to use what I call a semi-open-book approach.

Open-book exams of course allow students to bring whatever materials they wish into them, but they have the disadvantage that students will often bring in materials that they have not studied in detail, or even at all. In such cases, sifting through materials to help them answer a question could be counter productive.

On the other hand, the real world is now an increasingly “open-book” environment, which huge amounts of information available to those in the workplace which is now almost always Internet connected.

So I decided to look at another approach. Students are allowed to bring in a single, personalised, A4 sheet, on which they can write whatever they wish on both sides. There are a few rules:

  • the sheet must be written on “by hand”, that is to say, it cannot be printed to from a computer, or typed;
  • the sheet must be “original”, that is to say, it cannot be a photocopy of another sheet (though students may of course copy their original for reference);
  • the sheet must be the student’s own work, and they must formally declare as much (with a tick box);
  • the sheet must be handed in with the exam paper, although it is not marked.

The purpose of these restrictions are to ensure that each student takes a lead in producing an individual sheet, and to inhibit cottage industries of copied sheets.

In terms of what can go on the sheet? Well anything really. It can be sections from notes, important formulae, sample questions or solutions. The main purpose here is to prompt students to work out what they would individually distill down to an A4 page. So they go through all the module notes, tutorial problems and more, and work out the most valuable material that deserves to go on one A4 page. I believe that this process itself is the greatest value of the sheet, its production rather than its existence in the exam. I’m working on some research to test this.

So I email them each an A4 PDF, which they can print out at home, and on whatever colour paper they may desire. The sheet is individual and has their student number on it with a barcode, for automated processing and analysis afterwards for a project I’m working on, but this is anonymised. The student’s name in particular does not appear, since in Ulster University, it does not appear on the exam booklet.

The top of my sheet looks like this:

The top of a sample guide sheet.

So, if you would like to do the same, I am enclosing the Python script, and LaTeX that I use to achieve this. You could of course use any other technology, or not individualise the sheet at all.

For convenience the most recent code will also be placed on a GitHub repository here, feel free to clone away.

My script has just been rewritten for Python 3.x, and I’ve added a lot of command line parameters to decouple it from me and Ulster University only use. It opens a CSV file from my University which contains student id numbers, student names, and emails in specific columns. These are the default for the script but can be changed. For each student it uses LaTeX to generate the page. It actually creates inserts for each student of the name and student number, you can then edit open-book.tex to allow the page to be as you wish it. You don’t need to know much LaTeX to achieve this, but ping me if you need help. I am also using a LaTeX package to create the barcodes automatically.

I’ve spent a bit of time adding command line parameters to this script, but you can try using

for information. The script has been rewritten for Python 3. If you run it without parameters it will enter interactive mode and prompt you.

I’d strongly recommend running with the –test-only option at first to make sure all looks good, and opening open-book.pdf will show you the last generated page so you can see it’s what you want.

Anyway, feel free to do your own thing, or mutilate the code. Enjoy!

I use a LaTeX template for the base information, this can be easily edited for taste.


Academic Family Tree, LaTeX and Tikz

A few years ago, I found out some information on my academic genealogy, going through my supervisor, Brian McMaster, back through others to G.H. Hardy, Newton and Galileo and a little further before the records run dry. Of course it is nice that mathematics is an old and well established discipline with great records. And also, the number of scholars back then was much lower, so it’s not surprising that famous names turn up quite quickly, if you just have the full records – just as on a less cerebral level – the cliché goes that Charlemagne got about quite a bit. A bit of work with my mathematical colleagues all show such interesting family trees.

Anyway, I slowly built an SVG file in Inkscape to reflect this family tree, but it was slow and rather a pain to maintain. So I’ve long wondered if it can be done better in LaTeX, with the Tikz graphics packages. Tikz is awesome, and while it has quite a learning curve as for LaTeX itself, I used it extensively in producing the slides for my recent inaugural lecture. This meant mixing the formulae with the graphics was pretty effortless. This is a slightly different problem.

A quick scan, showed that Tikz can be used to build flowcharts rather easily. So I began in this way, building nodes of people and then positioning them relative to each other. A bit tedious but much more pleasing that doing it in a vector graphics program, for me anyway. I rapidly ran into problems in building very large page styles. In particular odd things happened when I tried to include graphics (the image became the whole page, regardless of scaling).

I experimented briefly with the tikzposter package, but couldn’t really get anywhere with it – perhaps because I hadn’t started from the ground up with it. I think I looked at beamerposter but again ran into problems, possibly because I didn’t start that way. In the end it was the simple a0poster package that did it for me, anyway – although I had to force the font throughout to be “\tiny”.

I also discovered the hard way that the wrapfig package doesn’t seem to work within a Tikz node, so I’ve messily improvised by adding another node for the images of people and relating its position to the relevant biographical section.

I harvested some basic biographical information from Wikipedia and one other website.

I managed to get something basic working. The image is big so the version below is blurry. A link to the smaller PDF and the LaTeX source on GitHub are shown below.

PDF DownloadLaTeX File

Family Tree
The actual document is very large in terms of page size, so click on the PDF for that clearer (smaller) version, this image is just to show indicative layout.


Upgrading from Serendipity to WordPress on Debian

As you may have noticed, I have upgraded from Serendipity, which was creaking a bit, and seems to no longer be supported by Debian to WordPress. It was a moderately complex task, as I wanted to preserve backwards compatibility and a lot of content with mathematics and code.

I installed the Debian package, and tried to follow the instructions on the Debian wiki but they are perhaps out of date. I got an error trying to setup the database, but found it was there and functional.

I  then used this excellent script to help import the old serendipity data. It wasn’t without problems, the script needed to be placed (on the Debian installed package) under /var/lib/wordpress/wp-content/plugins/ within a directory to be registered by WordPress as a plugin, but I got that working in the end.

This was an attempt to preserve ID fields as well. It seems to have worked – which has simplified redirects (see below). Comments have been “flattened” as the script warned, and there’s clearly a character-set issue here and there, but these weren’t serious issues for me. Your mileage may vary.

I found a good plugin for GeHSI style code formatting which I was using in Serendipity, albeit the syntax is very slightly different so I have some work to do editing a few entries (I don’t want to attempt a global SQL regexp find and replace if I don’t have to). I found this excellent seeming plugin for Latex and switched it into site-wide mode. So far, checking a few old articles, it JustWorks (TM).

Some of my old posts have images in the serendipity media folders that will need moved, but I was keen to have links to the old blog redirect automatically. I was able to use

in my Serendipity Apache configuration to jump to the new articles.

I can start to dismantle the rest of serendipity, except for the media, quite soon now. It’s nice to have a platform that respects multiple device layouts, and hopefully comment spam will be easier to control too. A sample of most articles show they render OK, there are a few gotchas, and I’ll try to work through them in time.