Sunday, February 24, 2008

Damn Trees and LaTeX!

What is a B Tree you ask--surely it can't have anything to do with maths right? If only. I have not the heart (or patience!) at this moment to describe precisely what a B tree is. The following picture from some online notes should hopefully satisfy your curiosity for the time being:
They have propped up in my module, and are supposedly a simpler way of checking whether or not something is a tautology. I say supposedly because as you can see, that tree is one ugly looking thing. Well I mean in a mathematical sense of course!!

I have been given my first coursework and it requires me to construct one of them trees. It's not a problem if you have a pen or paper (and my notes of course). The problem is introduced when LaTeX is mentioned, and someone's stubbornness to do this coursework using LaTeX. That someone happens to be me!

The thing about LaTeX is that it is similar to maths in some sense. I mean if you don't use it for a few months, you struggle to reacquaint yourself with it. When I made my (very lame) website a while ago, I became familiar with all the html codes and could rattle them off without a problem. Now though, when I had to post a link in my comment yesterday I couldn't remember what exactly to do! I tend to view the source file of my website when this happens, and I try to the same when it comes to LaTeX i.e. open a previous file and make my new one from that.

None of my previous files had trees though. Not a problem I thought, I'll ask on AoPS where I hoped Steve would be able to point me in the right direction. That he did and I came across three packages: gtree, synttree, lingtrees

From the three I decided that synttree was the "nicest" but I couldn't get it to work. Then I tried lingtress. Once again I was confused by all the jargon and after spending an hour or so, gave up on that too. Finally it was gtree and this you'll be happy to hear, worked. However, it's not doing what I want it to do which was most infuriating, considering that my nerves were on end when it came to the gtree!

What's the problem you ask? Well when I tried loading synttree it said something about having to change my internet connection. I agreed to this. Blindly. I don't really know what this did, but when I tried to generate other .tex files I faced problems. Realising that a ".log" existed I figured out what the problem was--it couldn't find the ".sty" files. Momentarily confusion swept me. The files were on the desktop so why was the computer being stupid for? I can't recall coming across ".sty" files before so didn't know what to do for a while. Eventually--call it a brain wave (pfft)--I copied the ".sty" file into the file where the skeleton of my coursework lay. That did the trick but then another problem occurred.

It couldn't find "txfonts" and what did it want me to do? Well install the thing I said, and it got to work. My patience was further tested as I was told that it couldn't install the package, due to some problem. Continuing this wild goose chase I went to CTAN and downloaded txfonts and tried to load it on my system. Once again I failed and after numerous attempts of doing so, I dismissed lingtrees too and shifted my gaze to qtrees. This seemed relatively simpler but then came the horrible package pict2e, and the previous problem of not being able to install.

After a few attempts of doing this manually (by going on CTAN and ....) I realised what was wrong. I hadn't been reading the message box which comes up when it says package missing, and had blindly been clicking install. Previously it used to download them from the internet (I think!) but now it wasn't. I changed the option and wow--it loaded my file. Saying that though, even now it asks: "Can't find the following file: tex\latex\txfonts\txfonts.sty and it will be installed from blah blah blah". I am having trouble remembering whether you're meant to install the package whenever you build the document, or should once have been enough.

The final straw was when, after qtree and it's upgrade (I think) worked, but weren't doing what I wanted. I guess I need to study the manual further, but another day maybe. I know what a stubborn so and so I can be, and even though (after I've answered the questions!) I can write this up in 15 minutes, I won't. I won't rest until I have typed it up painfully using LaTeX. (I would have used Microsoft Absurd in my previous lifetime, but we all have to grow up one day right? Haha--that didn't sound right coming from my mouth!)

What now then, is the unspoken question. If all fails then my final option is to cleverly create a table, which looks like a tree. Or even worse: maybe import the tree as an image from paint.... Right now though my head is swimming with ".sty". ".dtx", ".txp" and ".py" files. If they would open my life would be made slightly easier, but I will postpone working on this coursework until next week now. Already it has confused a few hours of my time, when I haven't even answered all of the questions yet!


I haven't any maths today whatsoever, and decided to take the day off. This I will pay for, but I think that we sometimes kid ourselves that we "have to do work". I mean, we forget that we had an exhausting week and a day of relaxation and nothing is needed. (Or is that me kidding myself because I didn't do any work?)

My Saturdays are forming a horrible pattern. Again all I have done is drank tea. Four mugs to be precise, but I honestly can't eat. This time it's not due to my laziness, I just can't be bothered eating, and if I do, only eat a little bit. Sigh. I know why I am in this state, but by next week hopefully it will be over. We're getting the dreaded R-word next week sometime I hope, and I am only doing one thing in worry. I became like this when it came to my GCSE and AS results, because on both occasions I had been a dodo and not revised properly. Even though I am going to deserve what I get, I still feel upset and disappointed because I've let myself down. Sigh again. The biggest result I'm dreading is real analysis if I'm being honest, namely because I actually worked the hardest in that subject last semester.

I can't speak of my result fears to "people in the real world" because they airily wave away my fears, annoyingly saying "you always worry and then come out passing". If only they knew what a pass is. I feel better knowing that at least one person (namely PS) knows what a pass is for me. Come now beans! I wonder what is actually going to happen to me this week, for this gripping fear is causing me much discomfort. My thoughts are consumed by this, so I thought of getting it out of my system here.

I better get to sleep now for this is another consequence of my worries: not going to sleep until the birds start singing. Do I promise myself a day of maths tomorrow? Well I had a to do list which got chucked out of the window, so I'll decide about tomorrow when I wakeup!

It seems that this post will also end with a quote, one which is very true:

"The first step in the acquisition of wisdom is silence, the second listening, the third memory, the fourth practice, and the fifth teaching others."

2 comments:

Anonymous said...

Hee hee, that looks my lecturer's handwriting. I was just googling because i couldn't remember what a "closed tip" is and I'm trying to use the Beth tree method to determine whether some things are logically equiverlant.

You're not at Manchester are you?

Beans said...

"You're not at Manchester are you?"

I'm not not at Manchester! *gives shifty look* :D

A bit cheeky of me to ask this, but please can you not tell other classmates or your mates about this blog. That would be greatly appreciated! Pretty please!