No, not labels made out of the sap of
Hevea brasiliensis, but labels typeset using the
LaTeX typesetting language---a very versatile and powerful language that typesets rather nice looking documents. I wrote my thesis using it and found the experience to be very enjoyable and rewarding.
Up until now, I've printed labels for pinned insect specimens using a Word template. This has been adequate, however I find there are two really annoying aspects of this method. The first is that you've got to try and count how many carriage returns you enter to centre a single-lined habitat label, and if you get it wrong it messes up the rest of the document. The other is making duplicate labels, the only way which I know how being to copy the label data and "Ctrl-V" it as many times as required, once again ensuring there's neither too much or not enough space between labels.
So, with the thesis out of the way, I've turned my attention to creating a LaTeX template to create insect labels from an A4 sheet of paper. It is available here:
labels.tex. Hopefully it is relatively straightforward to work out when you read the file and comments contained therein. The size of the labels is based on those in the classic New Zealand guide to insect curation (Walker and Crosby, 1988). I just found out that this very useful reference is freely available online
here. Thanks Landcare Research!
The guts of the file is as follows:
To get a really small font suitable for insect labels, the following commands are made:
\def\supertiny{\font\supertinyfont = cmss10 at 3.75pt \relax \supertinyfont}
\def\supertinyitalic{\font\supertinyfont = cmssi10 at 3.75pt \relax \supertinyfont}
\newcommand{\scinm}[1]{\supertinyitalic{#1}}
\supertiny is declared after \begin{document} to make the text of the entire document miniscule. Unfortunately, \emph doesn't work correctly when you've modified the size in this way, so \supertinyitalic is created and turned into a function \scinm which converts text (usually scientific names) into italics.
Next up is creating an environment to make duplicate labels:
\newcounter{speclabel@}
\newcounter{speclabel@@}
\newsavebox{\TMPspeclabel}
\newenvironment{speclabel}[1][1]{
\setcounter{speclabel@@}{#1}
\begin{lrbox}{\TMPspeclabel}
\begin{minipage}{\columnwidth}
\vspace{0.5ex}
\raggedright}
{
\end{minipage}
\end{lrbox}
\setcounter{speclabel@}{0}
\loop\ifnum \value{speclabel@} < \value{speclabel@@}
\stepcounter{speclabel@}
\usebox{\TMPspeclabel}
\endgraf\repeat}
The above code is modified from that available in etiketka.cls in the
shipunov package. Each set of labels (both locality and habitat labels) are prefaced with \begin{speclabel}[5] where 5 in this case indicates that the contents of the environment should be duplicated five times.
Finally, we want to have each label of a consistent height. I achieved this by employing the
tabularx package. However, the vagaries of the tabularx package made it easier to program it using two environments rather than working out how to make a single one do it all:
\newsavebox{\BoxB}
\sbox{\BoxB}{\begin{tabularx}{0.1mm}{Y}
\rule[-8mm]{0pt}{8mm}
\end{tabularx}
}
\newenvironment{lab_height}{\begin{tabular}{cc}}
{& \makebox{\usebox{\BoxB}}
\end{tabular}
}
\newenvironment{hablabel}{\tabularx{11.9mm}{@{}Y@{}}}
{\endtabularx}
This is a bit clunky, but it works. Reasonably well at least. BoxB creates a table of fixed width that contains a strut which fixes the height of the label. Currently this is 8 mm. When hablabel is nested within lab_height the contents of hablabel is put into a cell in a table the height of which is defined by BoxB. When the contents of hablabel takes up less height than BoxB, the result is a whole bunch of nicely spaced labels. When it takes up more height, things are pushed around a little, but it doesn't break labels.
Here's an example of a fully typeset label:
\begin{speclabel}[3]
\begin{lab_height}
\begin{hablabel}
NEW ZEALAND BR\\
Nina Valley Track\\
Lewis Pass\\
1 Jan 2009\\
SDJ Brown\\
\end{hablabel}
\end{lab_height}
\begin{lab_height}
\begin{hablabel}
{\scinm{Weinmannia}} leaves close to road.
\end{hablabel}
\end{lab_height}
\end{speclabel}
You can see the end results
here.
I'm not much of a LaTeX programmer and undoubtedly there are more elegant, powerful and useful methods of programming the above. However, this provides for my needs adequately enough. Hopefully others might find it of use also.
While trying to figure how to do all this, a search on Google for "latex insect labels" gave
this humble site as the first on the list. I figure that the least I can do is actually make sure that it delivers on its promise...
EDIT:
labels.tex is now available on
gitHub. The PDF showing the results can be downloaded from
Dropbox.
References:
Walker AK, Crosby TK. 1988. The preparation and curation of insects. DSIR Information Series 163. DSIR; Wellington.