Some TeX Developments

Coding in the TeX world

Archive for the ‘chemistry’ tag

Tracking chemical compounds with chemcompounds

with one comment

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.

Written by Joseph Wright

July 25th, 2010 at 8:58 am

Posted in LaTeX

Tagged with ,

Royal Society of Chemistry TeX Template

without comments

A while ago I talked about the variation between different chemistry publishers in their LaTeX support. Looking for something on the Royal Society of Chemistry site today I find that the people at Physical Chemistry Chemical Physics have created an updated template for TeX users. I’d say that is good news: remember of course that the journals are not typeset from the TeX source.

Written by Joseph Wright

February 24th, 2010 at 5:15 pm

Posted in General

Tagged with ,

Chemistry journals: publishers support of LaTeX

with 6 comments

As the author of the achemso bundle (for supporting submissions to the American Chemical Society), I get a few queries about the support various publishers provide for LaTeX. Unlike more physics-focussed journals, the chemistry journals never typeset directly from authors LaTeX sources. As a result, the acceptance of LaTeX material from authors is rather less popular, and tends to be patchy. So I thought I’d summarise things as I currently understand them.

American Chemical Society (ACS)

As I said above, I’ve written the achemso bundle specifically for submissions to the ACS. However, while the central office are happy to host a copy on their website and so on, the ACS don’t officially support the bundle. That means, in practice, that some journals are happier with LaTeX submissions than others. Each journal has its own office, and so I hear different things from people submitting to different journals. It also means that I have to pick up the requirements of each office based on feedback via authors, rather than getting any formalised instructions. There are mistakes in the achemso bundle, and there are also requirements that I don’t know about. So feedback is always useful (good or bad).

Royal Society of Chemistry (RSC)

The RSC have rather less information about LaTeX on their website than the ACS. They do mention TeX, but only very briefly. I’ve written some BibTeX styles, and a very basic article template, which are available in the rsc bundle. I’ve had a bit of feedback on these, and I hope that they at least provide a starting point for writing a submission to the RSC in LaTeX. More generally, I think the best advice is to check with the editorial office for the relevant journal before writing anything, and to stick to the basic LaTeX article class when you do.

Wiley

As with the RSC, Wiley don’t have a lot of LaTeX information. What they do say is that they only accept PDF submissions: you can’t send your source. They also say to stick to the plain article class, and basically to keep things simple.

Elsevier

Elsevier have recently had a new class written for journal submissions, elsarticle. From what I can make out on their site, you can use this for most of their journals, which should include the chemistry ones. As this has actually been written for them to order, I imagine that Elsevier is the best place to be sending LaTeX submissions to. Hopefully other publishers will see that they have made life easier for their authors and will take note.

Written by Joseph Wright

January 5th, 2010 at 8:08 pm

Posted in LaTeX

Tagged with

LaTeX and Dalton Transactions

with 2 comments

For once I have a post which combines TeX directly with my job. I’ve just received a copy of the proofs for an article in the chemistry journal Dalton Transactions (the article has DOI 10.1039/b907982c). At the top of each page I spotted

/usr/local/teTeX/share/texmf/tex/latex/techbooks/als/rsc/base2006/rsc2006v1.cls
(2004/07/27 v1.0 Standard LaTeX document class for RSC Journals)

The great irony is that although the journal (along with many others in chemistry) is typeset in LaTeX, they don’t accept LaTeX submissions! I’d love to get hold of that class file and have a look: pretty much no chance, unfortunately.

Written by Joseph Wright

August 22nd, 2009 at 11:01 pm

Posted in General

Tagged with

Submission template for the RSC

without comments

I’ve just uploaded a new version of my rsc package to CTAN. There are a few improvements to the BibTeX styles the package provides (mciteplus is still supported, but is no longer mandatory), but the main change is that I’ve added a short template to the bundle. I get the occasional e-mail seeking advice about writing papers to submit to the RSC, so it seemed like a good idea to provide something a bit more formalised than the odd hint to individuals.

Of course, I don’t know what the RSC want, but I’ve got a pretty good idea about what most chemistry paper drafts look like. I’ve also got the work I’ve done on achemso to go from. The basic points are to keep it simple and not to expect “publication ready” formatting. I think this confuses a lot of people who come from a more physics-based background. A lot of physics journals typeset stuff directly from authors’ drafts, and so print-ready templates are common. On the other hand, in chemistry papers tend to be submitted in Word format and are extensively altered by the publishers. So there is no real need for print-ready material when submitting to chemistry journals.

Hopefully, the clues I’ve provided in the rsc bundle will make life a little easier for prospective authors.

Written by Joseph Wright

April 24th, 2009 at 12:21 pm

Posted in LaTeX

Tagged with ,