Tag: latex

01
Nov

LaTeX

I just wanted to say how much I freakin’ love LaTeX. As far as I’m concerned there is nothing else you can feasibly use for academic document preparation, and the output is just so beautiful. I can’t quite explain it, but I find the aesthetics of a LaTeX prepared document just incredibly attractive. Check it out for yourself.

14
Nov

Partial LaTeX Word Count + TextMate

Long time no post, sorry! Here’s just a quick one.

I’ve been working on some essays and reports for uni in LaTeX, and the criteria for the work is usually that it is within a certain word limit, discounting titles, appendices, references etc. So I thought the easiest way to do this would be to have the main content, the bit that actually counts towards the word limit, in a separate file and include it. I then needed a good way of counting the words in this, and Googling lead me to a solution which converted the rendered PDF into ASCII and counted that, which is fine, but doesn’t work for partial LaTeX documents, i.e. ones without document tags etc. So I came across detex, which works pretty damned well. The only issue I’ve found with it so far is that it doesn’t filter keywords within braces, so for example, with \begin{itemize} it strips the \begin{}, but not the itemize, so this obviously adds to your word count. It’s a minor issue though, and one I’ll happily live with. You can then just pipe the output of that into “wc” to get the word count (and various other bits of info).

If you happen to be using TextMate, here’s a nice little command which will do it for you:

detex "$TM_DIRECTORY"/"$TM_FILENAME" | wc -w

I’ve added the “-w” option to just give me the word count, but obviously you can change this to get the other data wc will give you.

Enjoy!

12
Oct

Specification

One deadline out of the way! We had to hand in the specification last Thursday, and so here’s a bit of an update on where I am with the project.

Firstly, the goals of the project. Mainly, this is going to be a reasearch project, and so I will be looking a lot into the existing methodologies in computer based Scrabble agents, and trying to extend them where I can. The goals of the project are going to be to:

  • First, define what optimality means for a Scrabble strategy
  • Produce an optimal algorithm
  • Attempt to find a greedy algorithm which produces comparable results to the current world class agents

After doing this, I will hopefully find the time to attempt to generalise the findings to games of the same classification to Scrabble (imperfect information games), but this is more of a pie-in-the-sky objective.
I used LaTeX to produce the specification report, and I have to say it’s proved invaluable. It makes document production so much easier, I will definitely be using it in the future. I’ve been a bit soft and have started using TeX Shop, which takes a lot of the headache out of it (syntax highlighting, a few useful macros, and pdf production in a handy little button). Give it a go!

Update: I’ve just looked back at this, and it’s amazing how the project evolved from these somewhat optimistic initial objectives. But I suppose the majority of projects have the same form of evolution.