An example student report

Not exactly a TeX topic directly, but done in LaTeX so I think it counts. At work recently we’ve been discussing providing our final year students with a model report. The problem is where to get one: if you take a real report, then this may help other students for the same group. So I’ve taken some work from a few years ago (in the group of Andreas Danopoulos) and used some of it to write a model report. As the general structure might be useful to other people, you can take a look at the PDF or download the sources here. As the report is quite short I’ve used the article class with some modifications: for a longer one I’d have gone with the report class. There are a few chemistry-specific things going on in the file, but most of it is quite simple LaTeX stuff.

Tracking chemical compounds with chemcompounds

As a chemist, one of the things I want to do is track compound numbers (which are normally given as bold numbers, 1, 2, etc.). The traditional way to do that is by hand, which works but does require some concentration. Recent versions of ChemDraw have included an add-in for Word to do things automatically, and of course there is LaTeX support for the same idea.

In LaTeX there is a choice between two packages for tracking what is what. First, there is the bpchem package. It provides for the idea of subdivisions, so you can have 1a, 1b, 1c and so forth. However, I find the interface in bpchem is a bit awkward. The alternative is the chemcompounds package. It has a very easy to use approach to tracking, but does not have built-in support for subdivisions. So I’ve been working on how to achieve this easily in some stuff I’m writing at the moment. It turns out to be quite easy when you think about it.

The first stage is of course to load the package.

\usepackage[noimplicit]{chemcompounds}

I’ve decided to go with the option to turn off automatically creating new compound references, which means I have to declare each one separately. This requires a block of declarations in the preamble, but I actually find this easier than doing things ad hoc. The subdivisions I want are all about R groups (chemists will understand!). So I’ve started by setting up some simple R group letters (I have a family of compounds, and so it makes sense to use the same letter for the same R group in each case):

\declarecompound[a]{Mes}
\declarecompound[b]{iPr}

Hopefully you can see how this works: the optional argument sets up the label that will print, and the mandatory one is the label I’ll use to refer to the compound.
Then I need to set up the general compounds (the ones that will be 1, 2 and so on). I can let chemcompounds do the numbering, so this is easy:

\declarecompound{imidazole}
\declarecompound{pincer:salt}
\declarecompound{pincer:carbene}

The last stage in the preamble is to create the subdivided compounds. Rather than have to track the numbers and letter myself, I’ve found that I can simply refer back to the existing labels:

\declarecompound[\compound{imidazole}\compound{Mes}]
  {imidazole:Mes}
\declarecompound[\compound{imidazole}\compound{iPr}]
  {imidazole:iPr}
\declarecompound[\compound{pincer:salt}\compound{Mes}]
  {pincer:salt:Mes}
\declarecompound[\compound{pincer:salt}\compound{iPr}]
  {pincer:salt:iPr}
\declarecompound[\compound{pincer:carbene}\compound{Mes}]
  {pincer:carbene:Mes}
\declarecompound[\compound{pincer:carbene}\compound{iPr}]
  {pincer:carbene:iPr}

In the document body, things are now very easy. I just use the \compound macro. So for the general case I’ll have

\compound{imidazole}

(printing say 4) whereas for a single case I might have

\compound{imidazole:Mes}

(printing say 4a). This keeps my source easy to follow (I don’t have to remember numbers and letters, only labels), and avoids mistakes on my part.

Finding inspiration

Writing this blog requires a surprising amount of effort. I’m lucky that as I focus on development quite a bit things turn up for me to write about. Even so, finding new topics and actually writing about them is not a trivial process. It’s amazing how long even a short note can take to get down into a form that makes sense.

Reading the latest issue of The PracTeX Journal I was reminded of this by the column by Dave Walden. He’d written a column there, Travels in TeX Land, since the journal came into being five years ago. Dave has found many different things to say, looking at different things that he’s done using TeX. Each entry is different, and I think all of them are enlightening. The latest Travel in TeX Land is also the last

This will be my final TeX Land column in this journal. I am pleased to have provided a column for every previous issue, but it is now time for me to focus on other things.

However, it looks like inspiration is not the issue, as we are also assured that there will be continued TeX-related writings available from http://www.walden-family.com/public/texland/. I do hope that new insights continue to appear there.

Speaking of inspiration, if there is anything you think I should talk about here I’m always happy to get feedback. I do look round for potentially-interesting things to include, but the odd one does slip past.

TeX Live 2010 freeze

Karl Berry has announced on the TeX Live mailing list that TeX Live 2010 is now frozen, to allow a move to release status. So what has made it into the development version to date will be more or less what gets released onto DVD. Once things are done for release then the package updates will resume, allowing on-line updating. The timetable seems to be that DVDs will appear in September, but of course this will depend on the people actually making them.

Demand for LaTeX training

As part of my activities with the UK TeX Users’ Group, I’m helping to set up and run a LaTeX training course at the end of the month. Unlike other courses I’ve seen in the UK, we are running this one as ‘open to all’ for a pretty nominal fee. What’s surprised me is that it has proved to be very popular indeed. We had 25 places, and they were all used up some time ago. My list of people who are interested in another similar course has now reached 29 names, which probably means that we can fill a second course without any more effort at all! I hope that we’ll be able to do a second course at some stage in the autumn: as you might imagine the problem is availability of time for people to actually do it. Of course, I’m happy to hear about anyone else interested in registering, as I’ll add them to the list for the second course and any others that end up being run. New LaTeX users are a good thing, and so I’m keen to train as many people as show an interest.

Typesetting for portable devices

One of the talks at TUG 2010 was about typesetting for the iPad. Anyone following the general area of working with portable devices (iPad, Kindle, iPhone, etc.) will have picked up why this is interesting. The new book-like electronic devices are posing a lot of questions for those of us interested in typography. The problem is that the screens that these systems have aren’t really suited for the fixed approach that PDF provides. The current solutions go with something more flexible, but as a result miss out on the layout quality that TeX-based solutions can provide.

In the talk, the approach shown off was going very much for a device-dependent approach, and creating pre-defined bitmaps for both landscape and portrait viewing on the iPad screen. There is some good discussion after the presentation about alternative approaches, such as doing the typesetting on the device, reflowable PDFs and intermediate methods.

While I don’t have any of these devices, I can see that thinking about supporting them is going to be important. It’s clear that the overall market is very big, and that there are unique challenges in supporting small screens with a different form of interaction to the ‘traditional’ PDF. So I’m pleased to see that a variety of people are exploring all of the possible TeX-based solutions.