latex, thesis writing, writing

LaTeX commands for chemistry

LaTeX is great for writing theses, although collaboration with other authors on LaTeX files can be a pain.* Below I have listed a few LaTeX commands that I used when I was writing up my thesis. They are very basic, but they are useful because they save some typing and ensure that the same formatting is used each time. In particular, the \moles command and the \micro command for formatting moles and microanalysis** in standard notation, respectively. There are many more that I could write about, but I am short of time at the moment. Hopefully, at some point, I will update with a more substantial (and useful) list.


\newcommand{\celsius}{$^{\circ}$C} %a degrees Celcius symbol (to avoid use of superscript 'o', the bane of my life
\newcommand{\gs}[4]{$#1^#2_#3(#4)$} %Etter's graph-set notation, for hydrogen-bonded systems
\newcommand*{\moles}[2]{#1 $\times$ 10$^{#2}$ mol} formats number of moles in standard form
\newcommand*{\Moles}[2]{#1 $\times$ 10$^{#2}$ \textsc{m}} %formats molar quantities in standard form
\newcommand{\Molar}{\textsc{m}} %formats a small-caps M
\newcommand{\micro}[7]{\textbf{Microanalysis:} Calculated for \textbf{\ce{#1}} (\%) C, #2; H, #3; N, #4; Found (\%) C, #5; H, #6; N, #7.} %formatting of microanalysis results
\newcommand{\melt}[2]{m.p. #1--#2 \celsius} %melting point ranges

\newcommand{\yield}[2]{\textbf{Yield:} #1, #2 \%} %yields formatted as Yield: quantity (write number and quantity symbol, e.g., \yield{2 g}{94}

Below is the output of a few of these commands.

examples
Example of the pdfLaTeX output

These were output by using the commands at the head of the page according to the following usage:


...forming a hydrogen-bonded \gs{R}{1}{2}{5} ring.\\

A 10 \Molar{} sodium hydroxide solution.\\

An aqueous solution of \textbf{1} (\moles{1.1}{-5}).\\

\micro{C14H30}{14}{14}{14}{14}{14}{14} \yield{2 g}{94}, \melt{100}{103}

I hope you find them useful.

*However, nowadays, many collaborative, cloud-based LaTeX services are available. e.g., Overleaf.

**Requires the mhchem package to format chemical formulae.

Advertisements
English, writing

Fig., Figs., and Figs – and not a fig in sight!

How do you abbreviate ‘figure’ and ‘figures’ when used in a scientific paper?

In general, the rule is that when an abbreviation ends with the same letter as the word written out in full, a period (full stop) is not used. For example, Dr. Smith, but Drs Dupont and Dupond. However, in the case of Figures, both Fig., Figs., and Figs are acceptable and used. Therefore, you should follow the example used in the journal, i.e., check the formatting guidelines or look at other articles published recently in that journal. If in doubt, choose one style and use it consistently!

P.S. Perhaps a more day-to-day example is that (in British English) we write Mr Smith and Mrs Jones as opposed to Mr. Smith and Mrs. Jones because both of these words end with the same letter as the abbreviated form; that is, Mister and Mistress. However, in American English, a period is used after both Mr. and Mrs., so perhaps the most important lesson is that consistency and clarity are the most important factors.

argentina, English, writing

We shall do this, but you will do that.

A diversion into English grammar today. My husband, who is Argentinian, asked me about the usage of ‘shall’ and ‘will’.

Generally, shall and will are used to express something that happens in the future. For example,

I shall go to the cinema.

She will go to the cinema.

We shall go to the cinema.

They will go to the cinema.

So, the rule is that I and we take shall; whereas, she/he/it and they take will. Conversely, when you want to be forceful, i.e., use the imperative, reverse the usage. For example,

I will not kill!

She shall not kill!

We will not kill!

They shall not kill!

Furthermore, when using the negative, the following contractions are used.

‘Shan’t’ for ‘shall not’.

‘Won’t’ for ‘will not’.

Moreover, for the conditional, the same rules are used for ‘would’ and ‘should’.

However, in modern usage, will (and would), are pretty consistently used in speech rather than shall (and should). I imagine that this is because, in speech, the British use the contracted forms ‘I’ll’, ‘she’ll’, and ‘we’ll’, leading to a loss in distinction between shall and will.

In conclusion, will people understand you if you mix will and shall? Certainly, they will!

chemistry, writing

Common mistakes in science writing (and their solutions)

This is a very basic list, but the aim is to help prevent those small errors that are easy to make and a pain to fix (usually because there are many of them).

  • Negative numbers
    Use the negative symbol or an ‘en dash’ but not a hyphen.
  • Degrees Celsius
    Use the degree symbol from the ‘Symbol’ font, followed by a capital letter C in the typeface you are using. For example, °C. Do not use a superscripted o or 0.
  • Units and their quantities
    Make sure there is a space between the number and the unit, e.g., 3 g, 4 kj/mol, and 6 h, but 57%.
  • Consistency with units
    The symbol for liter is L; for milliliter, it is ml or mL. Make sure that you are consistent and do not mix up ml and mL.
  • a and an
    If the following word begins with a vowel or vowel sound (read it out loud), use ‘an’; if it begins with a consonant, use ‘a’.
  • Number ranges
    Separate ranges of numbers with an en dash, for example, in a list of references: 4–11 or 4,7,11–19. Remember, do not use a dash-separator if only two numbers are consecutive.

You can download a PDF of this file, here: Common mistakes