Rob Golding

Technology Consultant
  • Home
  • About Me
  • Curriculum Vitae
  • Contact

Custom Section Numbering in LaTeX

February 28, 2010

For our last coursework (which was for a really interesting compilers module), I chose to present my answers in LaTeX. It’s been a very steep learning curve, but I’m extremely happy with the results. I don’t even mind the slight drop in productivity that’s caused by my uncontrollable urge to stop and admire my document every so often! One thing that had me stuck for a while, however, was the automatic section numbering system.

To answer the questions for the compilers coursework, I wanted my sections to be numbered (1, 2, 3), my subsections to be numbered (a, b, c), and my subsubsections to be numbered (i, ii, iii). This numbering pattern matches that which is given in the question paper, whereby a number of nested enumerates were used. The default LaTeX section numbering however is (1, 1.1, 1.1.1). I finally found a way to alter this default behaviour by using the following code in the preamble:

\renewcommand{\thesubsection}{(\alph{subsection})}

\renewcommand{\thesubsubsection}{\roman{subsection}.}

This code modifies the way that the counters for subsections and subsubsections are printed (section counters are correct when left at the default).

I hope this saves someone even the few minutes it took me to work this out, once I’d applied some logic! It’s very useful to know that LaTeX has a counter for everything. This particular post was very helpful in working out which ones to alter, and how.

Comments
No Comments »
Categories
LaTeX, Life, Technology, University
Tags
LaTeX, University
Comments rss Comments rss
Trackback Trackback

It Begins…

September 22, 2009

The country has just undergone a mass-exodus of university students from their parents’ houses back into halls. I played by own small part in blocking up the roads moving back into university accommodation this weekend, and it’s all gearing up for the new school year.

I’ve been working with Django more and more lately, and I’ve written my first “commercial” application using my new favourite framework – a booking system for taught causes at the City Council. I’m really enjoying writing web applications with Django, and I’m sure this blog will start to resemble a web-developer’s in the near future.

Also, I’m really looking forward to this year at university. As I understand it, there’s a lot more work to be done, but the software engineering group project should be fun – as long as my “randomly chosen” team are happy with us using Python!

Comments
No Comments »
Categories
Django, Life, University, Web Development
Tags
Django, University
Comments rss Comments rss
Trackback Trackback

The Trials and Tribulations of Django + Git

June 2, 2009

I just finished my last exam today – Web Programming and Scripting – which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do – so it wasn’t too much of a challenge!

Something strange happens to me every time exams come around. I seem to pick up new projects, and just run with them. This time, I’ve become involved with a small group of people at university, writing a portal-style information system for universities. I suppose most people call this behavior procrastination, but I’m quite deeply in denial about that.

Ever since my post about the Backtrac Backup System, I’ve been really enjoying using Django. Something about it just makes developing for the web, well, exciting. That can only be good, right? I am the designated server administrator for this latest project, mostly due to the fact that I am the only one with a server to administer, and some of the things I’ve learned so far seem worthy of a mention here.  Firstly, we as developers were – how can I put it – stepping on each other toes somewhat. The project at this point had no version control, so we were just editing a bunch of files over SFTP. Obviously, some sort of Source Control Management was in order. I did some research, and decided that Git was a nice, modern alternative to the ever-popular SVN. It also meant that my server was constantly backed up by everyone on the team – but that’s just a bonus!

So, I installed Git, and started a repository. A lot of effort went into learning how the system works, and more importantly, how to make it work for us. Directed Acyclic Graphs thankfully made some sense to me, so I could just about understance the documentation. I wrote some custom hooks, and a C Program to syncronise the web-server. I was happy, and absolutely certain that this was the solution to all our woes. I was mistaken. Git just didn’t work the way I had hoped. The custom hooks were throwing permission errors all over the place, and my development team (read: my friend Rob Miles) was locked out of the repository. We made the decision yesterday to scrap Git, and go back to the previous system of editing the files over SFTP. We are always in constant communication when developing for the project, so it’s not too big a deal, but I feel that I failed as an adminisrator. You see, as an admin your job isn’t just to play with cool toys and loud servers – your primary purpose is to give the users what they need to work, and that is most certainly not what I achieved.

I’m glad I took the time to learn Git – and I’m sure it will help me later in life, in some way or another. It’s just unfortunate that it didn’t work out the way I had hoped for our project.

Comments
3 Comments »
Categories
Life, Technology, University, Web Development
Comments rss Comments rss
Trackback Trackback

Ubuntu and The University of Nottingham’s Proxy

November 24, 2008

I have recently enrolled on a Computer Science course at The University of Nottingham, and as such have had to make sure my machines correctly use their proxy server for web access. This post outlines the process of configuring Ubuntu for exactly that purpose – and could be applied to any network with a similar layout.

Network Proxy

First and foremost, Ubuntu has a setting in gnome for the Network Proxy, which should set gnome’s proxy – but I can’t see as it affects anything at all – still, better to be safe than sorry.

At Nottingham University, the recommended configuration is a proxy auto-configuration script (proxy.pac) which is downloaded by the client and parsed to configure the appropriate proxy server. In this case, it is located at http://wwwcache.nottingham.ac.uk/proxy.pac. This URL is entered into the correct field of the gnome Network Proxy settings dialogue.

Terminal Proxy

Secondly, the terminal has a proxy configuration option, so that programs that run inside the terminal making HTTP requests can access the internet – namely wget and aptitude. This is slightly more difficult to configure than the previous, and is achieved like so:

The terminal proxy is set using a variable called http_proxy, which is set using the export command, i.e.

export “http_proxy=http://proxy_server_ip:port”

In this case, the proxy server’s IP and port for the SNS (Student Network Service) is 128.243.253.119:8080.

This change can be made permanent by editing /etc/bash.bashrc, and adding the above line to the end of the file. Otherwise, the change is only effective in the terminal window currently open by the user, and disappears when it is closed.

Synaptic

Lastly, Synaptic Package Manager must have the proxy set, in order to update your installation using the in-built Update Manager or Synaptic GUI. This is done by opening Synaptic, and choosing Settings, Preferences, and setting the above proxy information using the Network tab. Unfortunately Synaptic cannot read auto-configuration scripts, so the IP and port must be manually entered here.

Obviously once all this is done, Firefox must be configured to use the correct proxy – but I trust you know how to do that! This turns out to be quite a pain, so I’ll be looking at ways to do this in one fell swoop. If anyone has any suggestions, then please let me know.

Note: These changes can be made much less painful by adding an entry to the hosts file for each of the proxy IPs you need to configure – so you only need to type the word proxy for example, instead of the entire IP. I will document this process shortly in a separate post.

Comments
13 Comments »
Categories
Life, Linux, Technology, University
Comments rss Comments rss
Trackback Trackback

Pages

  • About Me
  • Curriculum Vitae

RSSFollow Me

Rob Golding
  • I've lost my car under all this white stuff...I'm sure it will turn up soon. 10:57:50 AM February 21 from HTC Peep
  • @BenJenkinson I certainly do! Everyone but Simon and River. 07:32:19 PM February 07 from HTC Peepin reply to BenJenkinson
  • Is it sad that my servers are now all named after firefly characters? 12:58:30 PM February 07 from HTC Peep

Recent Posts

  • Mercurial on University of Nottingham Computer Science Servers
  • Custom Section Numbering in LaTeX
  • Linux-Windows Integration (à la Likewise-Open & Winbind)
  • It Begins…
  • Exchange 2007 Autodiscover Issues

Archives

  • March 2010
  • February 2010
  • December 2009
  • September 2009
  • July 2009
  • June 2009
  • April 2009
  • March 2009
  • January 2009
  • November 2008
  • October 2008
  • September 2008
  • July 2008
  • April 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007

Technorati

Blog Information Profile for robgolding63
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox