Roland's homepage

My random knot in the Web

GHS labels in LaTeX

Making labels for chemicals with LaTeX.

Introduction

From the Wikipedia page on the Globally Harmonized System of Classification and Labelling of Chemicals:

Before the GHS was created and implemented by the United Nations, there were many different regulations on hazard classification in use in different countries. Whilst those systems may have been similar in content and approach, they resulted in multiple standards and classifications and labels for the same hazard in different countries. Given the extent of international trade in chemicals, and the potential impact on neighboring countries when controls are not implemented, it was determined that a worldwide approach was necessary.

In Europe, the GHS is already in use for pure substances. It will be compulsoary for mixtures in 2015.

When you buy a product that is requiered to be labelled, it is the responsibility of the supplier to put a correct label on the packaging. However, if you repack such a product, making a label is your responsibility.

Making labels

LaTeX in combination with the labels package is an efficient way to create labels. I’ve used it before to create labels that conform to previous EU standards. When the GHS was introduced, I designed this label template. It is designed to print 8 105×74 labels on an A4.

An example of the rendered label for acetone (in Dutch):

GHS label for acetone (in Dutch)

To know which symbols and phrases to use, consult the Material Safety Data Sheet (“MSDS”) for the substance you want to make a label for.

Code

Online you can find the GHS hazard symbols. For convenience, I have made pdf pictograms for use with pdflatex.

The code for the labels is shown below, but you can also download it. It uses the graphicx and labels packages, which are included in most current LaTeX distributions.

% -*- latex -*-
% LaTeX sourcecode file for making 105x74 stickers for chemicals.
% according to the GHS.
%
% Written by R.F. Smith <rsmith@xs4all.nl> in 2010 and placed in the
% public domain
%
%%%%%%%%%%%% Contents of the sticker; change these to suit you %%%%%%%%%%%%%%
% \Chemname should contain the product identifier for the substance, use
% \huge, or Large if the name doesn't fit.
\newcommand{\Chemname}{\huge }
% \Signal contains the signal word
\newcommand{\Signal}{Waarschuwing}
% Possibilities for Upper/Middle/Lower symbol:
% Symbol          English text            Dutch text
% in figures/
% explos.pdf      explosive               explosiegevaar
% flamme.pdf      flammable               brandgevaarlijk
% rondflam.pdf    oxidyzing               brandbevorderend
% bottle.pdf      gasses under pressure   houder onder druk
% acid.pdf        corrosive               bijtend
% skull.pdf       toxic                   giftig
% exclam.pdf      harmfull                schadelijk
% silhouete.pdf   mutagen/carcinogen      lange termijn gez. schade
% pollu.pdf       aquatic toxicity        mileugevaarlijk
%
% The next three lines select the three symbols that can go on the sticker.
% Leave those that you don't want to use undefined.
\newcommand{\UpperSymbol}{figures/exclam}
%\newcommand{\MiddleSymbol}{}
%\newcommand{\LowerSymbol}{}
% Size of the text. Try \small, \footnotesize, \scriptsize or \tiny depending
% on the amount of text.
\newcommand{\txtsize}{\scriptsize}
% Next are the hazard and precautionary statements and additional
% information. You should be able to find them on the MSDS for the
% substance.
\newcommand{\Hazards}{%
}
\newcommand{\Precautions}{%
}
\newcommand{\Additionals}{%
}
% The name, address and phone number of the supplier should go here.
\newcommand{\Firm}{Firma BV -- Straat 1, 1234 AB Nergenshuijzen\\
  tel. 012-3456789}
\newcommand{\filedate}{\number\year-\number\month-\number\day}
%%%%%%%%%% Normally no changes are equired below here %%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage{times}
\usepackage[dutch]{babel}
\usepackage[utf8]{inputenc}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{labels}
% Settings for the label package; 8 105x74 stickers on an A4 page.
\LabelCols=2%
\LabelRows=4%
\LeftBorder=-10mm%
\RightBorder=0mm%
\TopBorder=1mm%
\BottomBorder=0mm%
\numberoflabels=8%
%\LabelGridtrue
%%%%%%%%%%%%%%%%%%%%%% Start of the document %%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\genericlabel{%
  \raisebox{29mm}{\parbox[t][65mm][t]{90mm}{
  \textbf{\Chemname}\\
  \parbox[t][55mm][t]{15mm}{\mbox{}\\
    \ifthenelse{\isundefined{\UpperSymbol}}{}{%
      \resizebox{15mm}{!}{\includegraphics{\UpperSymbol}}}
    \ifthenelse{\isundefined{\MiddleSymbol}}{}{%
      \resizebox{15mm}{!}{\includegraphics{\MiddleSymbol}}}
    \ifthenelse{\isundefined{\LowerSymbol}}{}{%
      \resizebox{15mm}{!}{\includegraphics{\LowerSymbol}}}
  }\hspace{1pt}%
  \parbox[t][61mm][t]{82mm}{\txtsize
    \textbf{\normalsize\Signal}\\[2pt]
    %\textit{\footnotesize Gevaren}\\[1pt]
    {\Hazards}\\[2pt]
    %\textit{\footnotesize Voorzorgsmaatergelen}\\[1pt]
    {\Precautions}\\[2pt]
    %\textit{\footnotesize Aanvullende informatie}\\[1pt]
    {\Additionals}\\
    \vfill
    \rule[2pt]{82mm}{.5pt}\\
    \tiny\Firm\hfill\filedate
  }%
  }}%
}
%%%%%%%%%%%%%% End of the document contents %%%%%%%%%%%%%%%%%%%
\end{document}

For comments, please send me an e-mail.


Related articles


←  Backups Fun with encryption and randomness  →