Custom Section Numbering in LaTeX
February 28, 2010For 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.
Over the past week, I’ve been upgrading my e-mail system to Exchange 2007 (I was previously using Exchange ‘03). For me, it’s very useful to have the systems that I write about, and consult for, installed at home in a “semi-production” manner. It means that I have a system to work on, and I am concerned with keeping it up and running as smoothly as possible – which introduces me to intricacies that I would not otherwise encounter, if I were just running a little test lab.
Ever since my post about the
I was preparing to send the thing back to Dell, when it happened one night and I checked out the event logs. It turns out that Windows Update was resuming the machine from hibernate – and then updating itself. After turning this off, I’ve had a good night’s sleep! Also, Windows Defender was scheduled to scan the machine every morning at 2.00am, so that’s been disabled too.
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.








