Archive for December, 2007
LaTeX, TeXnicCenter and LyX
Some time ago I sat down to learn how to write equations on Wikipedia using TeX, a language used by scientists and mathematicians for technical documents. MediaWiki, the software behind Wikipedia, uses a subset of this language so that we can have pretty equations on our articles, like this one I just did (right). For some time I was wondering what was used to produce the beautiful equations in textbooks and so I delved further and discovered LaTeX, the language used. It is called a typesetting language – you type out your document with tags (it’s a markup language, not a programming one), run it through the TeX engine and get a beautiful image or PDF out of the other side. It does headings with a table of contents, margin and foot notes, cross references that work regardless of which page the actual content is, tables (with difficulty) and of course beautiful equations like the one above.
Writing LaTeX in a normal text editor works, but it is better to find an app that will check your syntax, highlight brackets and the like, and then compile into a finished document at the press of a button – effectively an IDE. So I started using TeXnicCenter on Windows which is rather nice. I would recommend it for beginners. I would suggest that readers make use of Google primarily for learning the language – there are tutorials dotted around. I intend to write my coursework up this way after Christmas – it makes it look very professional when done right. Then I will get gnuplot (not actually GNU, by the way) up to draw graphs, but I am not sure this is allowed.
Yesterday I found myself on Ubuntu and wanted to write up some revision notes for physics so I fired up the package manager and installed a selection of LaTeX GUIs, and through this discovered LyX, a rather nice one. It is actually a complete environment where you are not required to use any code at all, although a knowledge of how the language works helps. Through this I produced a rather pretty overview of the course so far that I intend to use just before the exam for last-minute revision and something I can add to and complement over the revision period. Also for me doing revision this way is more fun because I do love the beautiful typesetting. So, if you like maths or mathful science, learn LaTeX or get a copy of LyX.
Rare geekery
Term has finally been winding down at school this week; we finished at lunchtime and spent the morning of history lessons watching relevant videos. So for yesterday and tonight I decided to do some alternative activities to school work due to not having much to do, and in order to have a change. I will be commencing my holiday homework tomorrow if all goes to plan, and then of course it is on to revision. I also intend to try and catch up on my e-mails and other related activities but I fear already this is not going to happen. Really, I should have spent this time doing that rather than this.
I have opted to yet again redesign my website, seanwhitton.com – I think this is about version five. While this blog is presently as it has been for some time due to the comparative difficulty I will have trying to convert the blog’s complex template to the new layout, the new site didn’t take me too long to re-layout and I am pleased with the result. I did a direct transfer of the old site to the new by simply replacing the old template with my new code and this means that not all pages look quite as they should. Since I now have a site map on the home page, I was tempted to add some more pages to the listing and thus I have some things to fill in. It seems I naturally have site content now without having to work too hard to make it up which is a good thing. This blog has always been my main source of writing and so I aim to transfer this over eventually. It will be far from easy, however. My new design is supposed to be easy to use, simple and clean, so I would appreciate any feedback on whether it is this.
About a week and a half ago I decided to purchase a ‘slug’ or what is actually called a Linksys NSLU2. It is a device designed to serve files with a built-in FTP and web server, that can easily be mounted on network machines. The idea is to add storage to a smallish network that can easily be accessed. However, since the thing is based on Linux anyway is has been hacked somewhat by fans and is now officially supported by Debian – in other words, I now have a mini-server with low power consumption that I can run useful things off and leave on all the time. It took me some time to get it working because my router was feeding it false information meaning it couldn’t properly connect to the Debian mirrors to get hold of the operating system files (I had to open another shell and edit /etc/resolv.conf manually). Getting the router to forward web, SSH and FTP ports was not easy either. Now it is running, with its cute 120GB WD Passport Drive, absolutely fine and you can see a picture here. I am very happy with this purchase.
I have decided to actually be a proper unix geek and learn how to use vi(m) efficiently. In general I use it on SilentFlame only because nano isn’t installed, but I realise that I am wasting keystrokes and vim is a good idea. I just need to work through vimtutor methodically and try to use the different methods presented where they are going to speed me up most. I need to get used to editing my site and other such things in SSH as it is a lot easier. Eventually I could of course set up Wikipedia to use vim for all editing, but this may be a bit far. Not sure at this stage – still trying to absorb.
Debating was again the winner
On Tuesday morning I received, as part of another conversation, an e-mail from Mr M-B saying “think about why you think fairtrade is a bad thing”. Later on that day I was furnished with the reason for this: our entry into the Mace debating competition, a formal, rigorous competition in which the final prize is a mace, was falling apart. Out of three people involved two had pulled out, leaving a blank space in the team. I was asked to step in with forty-eight hours notice and so tonight the battle commenced. And again the real intellectual atmosphere was what I took away most, the whole idea of meeting to competitively discuss issues that are so important. Additionally, working with the ‘squad’ rather than the team the night before preparing at school and on the journey, the the teachers: I don’t get the intellectual atmosphere at home where debate is boring and unimportant. Our motion was ‘[t]his house believes we should all buy faritrade [sic] products where we can’ which was a facinating topic to oppose – I learnt an awful lot about fair trade and am now sitting on the fence very much if it is a good idea or not.
For this debate I was working with Conor, someone who I have not really worked with before but am glad I did – we seem to do well together. Conor won a public speaking competition recently and really can deliver the information. The big differnece that we had to cope with for this competition was interruptions during speeches in the form of points of information which is something we have not really had the chance to practice for, meaning that we probably didn’t handle these as well as we should have done. Really though this style of debate is so much better than the others we have encountered. The cut and thrust of real debate are there and this is not experienced in other settings. The debate is interactive and real. After watching the first debate on compulsory national service it was our turn, and we were stepping into a strange situation. We had little preparation due to being informed late of the details and we had been put off a little by the exceptional work of the home school in the first debate. But it was pointed out by our teachers that once we got into the style things were very fluid and debating did become theatre. Rebuttal is vitally important: I turned the proposition’s drop in a bucket argument on its head which I was quite pleased with.
We split our opposition into two areas: Conor took the economic issues around why fair trade is not a good thing, and I attacked the moral and human aspects, and then proposed a solution. We uncovered a lot of information and analysis. Firstly, Conor explained how fair trade does not address the reason that third world producers are paid so low for their produce and that is a saturated market – fair trade encourages more production and thus makes the situation a lot worse (worse not just not helping was a fundamental point of our side). He also explained how fair trade suffers from subsidy and import restrictions in first world countries and this led on to the proposition that cutting out the middleman of sending cocoa beans to the first world to be made into chocolate bars to be sold back to the third world would really help the situation in developing countries. I went on to talk about branding and how there is a real psychological element to the debate: fair trade is a fashionable brand at the moment and there is always the concern of complacency. We used the analogy of a sticking plaster for a much larger wound. The next point was the patronising of the African farmers that occurs. I used the illustration of a business meeting praising the African coffee and how this patronises those who have produced it: the pride in their produce is lost. So the solution came about from this argument. Take the extra fifty pence spend on fair trade and put this into developing the infrastructure in the developing countries to produce their own goods from the raw materials in order to allow them to compete. Remove this feudal situation between the first and third worlds where the subservant serfs are producing our raw materials, and if we must work within this capitalist system then we must allow the third world countries to compete rather than be below us if they are to lift themselves out of poverty.
After the debate the judges retired to consider the winning team to go through to the next round and a runner up in case illness or other misfortune should stop the winners attending. Firstly they did the most valuable part of the evening for the longer term: feedback on each individual debater and combined team. This information is absolutely invaluable in improving as the judges can compare teams and bring in their experience. According to the judges I have a voice that must be listened to without any shouting and I used my facial expressions well to emote my points. They particularly liked my point on why dependence on fair trade is particularly dangerous when I said that instant coffee could become instant poverty given an economic slump. We had a strong and coherent argument between us and Conor was praised for his solidity of economic research. Then the judgement came, and I was actually not too concerned for we had had a good time and had improved our skills. And then it came: we won – apparently the choice of winner for the judges was easy, and the runner up took more thought. On to the next round!