Debian Codegraph @

texmf-dist/doc/latex/ghsystem/ghsystem-manual.tex

raw
1 % arara: pdflatex
2 % arara: biber
3 % arara: pdflatex
4 % arara: pdflatex
5 % --------------------------------------------------------------------------
6 % the GHSYSTEM package
7 %
8 % globally harmonized system
9 %
10 % --------------------------------------------------------------------------
11 % Clemens Niederberger
12 % --------------------------------------------------------------------------
13 % https://github.com/cgnieder/ghsystem/
14 % [email protected]
15 % --------------------------------------------------------------------------
16 % If you have any ideas, questions, suggestions or bugs to report, please
17 % feel free to contact me.
18 % --------------------------------------------------------------------------
19 % Copyright 2011--2020 Clemens Niederberger
20 %
21 % This work may be distributed and/or modified under the
22 % conditions of the LaTeX Project Public License, either version 1.3
23 % of this license or (at your option) any later version.
24 % The latest version of this license is in
25 % http://www.latex-project.org/lppl.txt
26 % and version 1.3 or later is part of all distributions of LaTeX
27 % version 2005/12/01 or later.
28 %
29 % This work has the LPPL maintenance status `maintained'.
30 %
31 % The Current Maintainer of this work is Clemens Niederberger.
32 % --------------------------------------------------------------------------
33 \documentclass{ghsystem-manual}
34
35 \DeclareAcronym{ghs}{
36 short = ghs ,
37 long = Globally Harmonized System of Classification and Labelling of
38 Chemicals ,
39 pdfstring = GHS ,
40 accsupp = GHS
41 }
42 \DeclareAcronym{eu}{
43 short = EU ,
44 long = European Union ,
45 pdfstring = EU ,
46 accsupp = EU
47 }
48 \DeclareAcronym{UN}{
49 short = un ,
50 long = United Nations ,
51 pdfstring = UN ,
52 accsupp = UN
53 }
54 \DeclareAcronym{dvi}{
55 short = dvi ,
56 long = device independent file format ,
57 pdfstring = DVI ,
58 accsupp = DVO
59 }
60 \DeclareAcronym{pdf}{
61 short = pdf ,
62 long = portable document file ,
63 pdfstring = PDF ,
64 accsupp = PDF
65 }
66
67
68 \defbibheading{bibliography}{\addsec{References}}
69 \addbibresource{cnltx.bib}
70 \addbibresource{\jobname.bib}
71 \begin{filecontents*}[overwrite]{\jobname.bib}
72 @misc{eu:ghsystem_regulation,
73 author = {{The European Parliament and The Council of the European Union}},
74 title = {Regulation (EC) No 1272/2008 of the European Parliament and of
75 the Council} ,
76 shorthand = {EuP} ,
77 subtitle = {on classification, labelling and packaging of substances and
78 mixtures, amending and repealing Directives 67/548/EEC and 1999/45/EC, and
79 amending Regulation (EC) No 1907/2006} ,
80 journal = {Official Journal of the European Union} ,
81 date = {2008-12-16}
82 }
83 @online{unece:ghsystem_implementation,
84 author = {{United Nations Economic Commission for Europe}} ,
85 title = {GHS Implementation} ,
86 url =
87 {http://www.unece.org/trans/danger/publi/ghs/implementation_e.html} ,
88 urldate = {2012-03-20} ,
89 date = {2012-03-20}
90 }
91 \end{filecontents*}
92
93 \newcommand*\tablehead[1]{\textrm{\bfseries#1}}
94
95 \begin{document}
96
97 \section{Introduction}
98 As a chemist you are probably aware of the fact that the \acl{UN} have
99 developed the \ac{ghs} as a global replacement for the various different
100 systems in different countries. While it has not been implemented by all
101 countries yet~\cite{unece:ghsystem_implementation}, it is only a matter of
102 time.
103
104 The package \ghsystem{} now enables you to typeset all the hazard and
105 precautionary statements and pictograms in a very easy way. The statements
106 are taken from \acs{eu} regulation 1272/2008~\cite{eu:ghsystem_regulation}.
107
108 \section{Licence and Requirements}
109 \license
110
111 \ghsystem\ loads the following packages:
112 \pkg{expl3}\footnote{\CTANurl{l3kernel}}~\cite{bnd:l3kernel}, \pkg{xparse} and
113 \pkg{l3keys2e}\footnote{\CTANurl{l3packages}}~\cite{bnd:l3packages},
114 \needpackage{chemmacros}~\cite{pkg:translations},
115 \needpackage{translations}~\cite{pkg:translations},
116 \needpackage{siunitx}~\cite{pkg:siunitx},
117 \needpackage{graphicx}~\cite{pkg:graphicx},
118 \needpackage{longtable}~\cite{pkg:longtable} and
119 \needpackage{ifpdf}~\cite{pkg:ifpdf}.
120
121 \section{Setup}
122 % TODO
123 % The simplest way is to load \pkg{chemmacros}~\cite{pkg:chemmacros} which loads
124 % \ghsystem{} implicitily. All of \ghsystem's options belong to
125 % \pkg{chemmacros}' module \module{ghsystem}. This means they can be setup with
126 % \begin{sourcecode}
127 % \chemsetup[ghsystem]{<options>} or
128 % \chemsetup{ghsystem/<option1>,ghsystem/<option2>}
129 % \end{sourcecode}
130 % \sinceversion{4.0}However, \ghsystem{} can be loaded as a standalone package
131 % and thus provides its own setup command:
132 % \begin{commands}
133 % \command{ghssetup}[\marg{options}]
134 % Setup command for \ghsystem.
135 % \end{commands}
136
137 \section{Get Hazard and Precautionary Statements}
138 \subsection{Simple Statements}
139 The general usage is simple: you use the command
140 \begin{commands}
141 \command{ghs}[\sarg\oarg{options}\marg{type}\marg{number}]
142 Get statement number \meta{number} of type \meta{type}.
143 \end{commands}
144 There are three types available: \code{h}, \code{euh} and \code{p}. The
145 \meta{type} argument is case insensitive, so just type them in as you like.
146 \begin{example}[side-by-side]
147 \ghs{h}{200} \par
148 \ghs{H}{224} \par
149 \ghs{euh}{001} \par
150 \ghs{Euh}{202} \par
151 \ghs{p}{201}
152 \end{example}
153
154 The starred version hides the identifier and only gives the statement. If you
155 want to hide the statement itself instead you can use the option:
156 \begin{options}
157 \keybool{hide}\Default{false}
158 Hide the statement.
159 \end{options}
160
161 There is an option to customize the output, too.
162 \begin{options}
163 \keyval{space}{space command}\Default
164 Space between \meta{type} and \meta{number}.
165 \end{options}
166 \begin{example}[side-by-side]
167 \ghs{h}{200} \par
168 \ghs[space=\,]{h}{200} \par
169 \ghs*{h}{200} \par
170 \ghs[hide]{h}{200}
171 \end{example}
172
173 \subsection{Statements with Placeholders}
174 Some of the statements contain placeholders. They can be one of the
175 following:
176 \begin{itemize}
177 \item \textit{\textless state route of exposure if it is conclusively proven
178 that no other routes of exposure cause the hazard\textgreater}
179 \item \textit{\textless state specific effect if known\textgreater}
180 \item \textit{\textless or state all organs affected, if known\textgreater}
181 \item \textit{\textless name of sensitising substance\textgreater}
182 \end{itemize}
183
184 Except the last one which needs to be filled in, they are hidden per default.
185 They can be made visible with the option
186 \begin{options}
187 \keybool{fill-in}\Default{false}
188 Show placeholders.
189 \end{options}
190 \begin{example}
191 \ghs{h}{340} \par
192 \ghs[fill-in]{h}{340} \par
193 \ghs{h}{360} \par
194 \ghs[fill-in]{h}{360} \par
195 \ghs{h}{370} \par
196 \ghs[fill-in]{h}{370} \par
197 \ghs{euh}{208} \par
198 \ghs[fill-in]{euh}{208}
199 \end{example}
200
201 These placeholders can be replaced with one of these options:
202 \begin{options}
203 \keyval{exposure}{text}\Default
204 exposure placeholder
205 \keyval{effect}{text}\Default
206 effect placeholder
207 \keyval{organs}{text}\Default
208 organ placeholder
209 \keyval{substance}{text}\Default
210 substance placeholder
211 \end{options}
212 \begin{example}
213 \ghs[exposure=This is how you get exposed.]{h}{340} \par
214 \ghs[effect=These are the effects.]{h}{360} \par
215 \ghs[organs=to this organ]{h}{370} \par
216 \ghs[substance=substance]{euh}{208}
217 \end{example}
218
219 \subsection{Statements with Gaps}
220 Some of the statements have gaps that can be filled.
221 \begin{example}[side-by-side]
222 \ghs{p}{301} \par
223 \ghs{p}{401} \par
224 \ghs{p}{411} \par
225 \ghs{p}{413}
226 \end{example}
227
228 These gaps can be filled using these options:
229 \begin{options}
230 \keyval{text}{text}
231 Fill the \code{text} gap.
232 \keyval{dots}{text}
233 Fill the \code{dots} gap.
234 \keyval{C-temperature}{num}
235 Fill the Celsius temperature gap.
236 \keyval{F-temperature}{num}
237 Fill the Fahrenheit temperature gap.
238 \keyval{kg-mass}{num}
239 Fill the \si{\GHSkilogram} mass gap.
240 \keyval{lbs-mass}{num}
241 Fill the \si{\GHSpounds} mass gap.
242 \end{options}
243 \begin{example}
244 \ghs[text=contact physician!]{p}{301} \par
245 \ghs[dots=here]{p}{401} \par
246 \ghs[C-temperature=50, F-temperature=122]{p}{411} \par
247 \ghs[kg-mass=5.0, lbs-mass=11, C-temperature=50, F-temperature=122]{p}{413}
248 \end{example}
249
250 \subsection{Combined Statements}
251 There are some combinations of statements. They are input with a \code{+}
252 between the numbers:
253 \begin{example}
254 \ghs{p}{235+410} \\
255 \ghs{p}{301+330+331}
256 \end{example}
257
258 Note that you can only get combinations that officially exist. \emph{You
259 can't combine freely}.
260
261 \section{Pictograms}
262 \subsection{The Pictures}
263 The \ac{ghs} defines a number of pictograms:
264
265 \ghspic{explos} \ghspic{flame} \ghspic{flame-O} \ghspic{bottle} \ghspic{acid}
266 \ghspic{skull} \ghspic{exclam} \ghspic{health} \ghspic{aqpol}
267
268 \begin{commands}
269 \command{ghspic}[\oarg{options}\marg{name}]
270 Load pictogram \meta{name}.
271 \end{commands}
272 Table~\ref{tab:ghs_pictograms} shows all available pictograms and their names.
273 To be more precise: it shows the names to use with the \cs{ghspic} command.
274 The file names are \code{ghsystem\_\meta{name}.\meta{filetype}} where
275 \meta{filetype} is \code{eps}, \code{pdf}, \code{jpg} or \code{png}, see also
276 section~\ref{ssec:picture_type}.
277 \begin{example}[side-by-side]
278 \ghspic{skull}
279 \end{example}
280
281 If you don't like the default size you can change it using this option:
282 \begin{options}
283 \keyval{scale}{factor}\Default{1}
284 Scales the pictogram.
285 \end{options}
286 The pictures are actually quite large. The default setting scales them by a
287 factor of $\frac{1}{20}$.
288 \begin{example}[side-by-side]
289 \ghspic[scale=2]{skull}
290 \end{example}
291
292 If you want to use some specific \cs*{includegraphics} options, \eg, if
293 you want to rotate the pictogram for some reason, use this option:
294 \begin{options}
295 \keyval{includegraphics}{includegraphics keyvals}
296 Pass options to the underlying \cs*{includegraphics} command.
297 \end{options}
298 \begin{example}
299 \ghspic[includegraphics={angle=90}]{skull}
300 \end{example}
301
302 \begin{longtable}{>{\ttfamily}ll>{\ttfamily}ll}
303 \caption{All available \ac{ghs} pictograms.\label{tab:ghs_pictograms}} \\
304 \toprule
305 \normalfont\bfseries name & \bfseries pictogram &
306 \normalfont\bfseries name & \bfseries pictogram \\
307 \midrule\endfirsthead
308 \toprule
309 \normalfont\bfseries name & \bfseries pictogram &
310 \normalfont\bfseries name & \bfseries pictogram \\
311 \midrule\endhead
312 \bottomrule\endfoot
313 explos & \ghspic{explos} & explos-1 & \ghspic{explos-1} \\
314 explos-2 & \ghspic{explos-2} & explos-3 & \ghspic{explos-3} \\
315 explos-4 & \ghspic{explos-4} & explos-5 & \ghspic{explos-5} \\
316 explos-6 & \ghspic{explos-6} & & \\
317 flame & \ghspic{flame} & flame-2-white & \ghspic{flame-2-white} \\
318 flame-2-black & \ghspic{flame-2-black} & flame-3-white & \ghspic{flame-3-white} \\
319 flame-3-black & \ghspic{flame-3-black} & flame-4-1 & \ghspic{flame-4-1} \\
320 flame-4-2 & \ghspic{flame-4-2} &
321 flame-4-3-white & \ghspic{flame-4-3-white} \\
322 flame-4-3-black & \ghspic{flame-4-3-black} &
323 flame-5-2-white & \ghspic{flame-5-2-white} \\
324 flame-5-2-black & \ghspic{flame-5-2-black} & & \\
325 flame-O & \ghspic{flame-O} & flame-O-5-1 & \ghspic{flame-O-5-1} \\
326 bottle & \ghspic{bottle} & bottle-2-black & \ghspic{bottle-2-white} \\
327 bottle-2-white & \ghspic{bottle-2-black} & & \\
328 acid & \ghspic{acid} & acid-8 & \ghspic{acid-8} \\
329 skull & \ghspic{skull} & skull-2 & \ghspic{skull-2} \\
330 skull-6 & \ghspic{skull-6} & & \\
331 exclam & \ghspic{exclam} & & \\
332 health & \ghspic{health} & & \\
333 aqpol & \ghspic{aqpol} & & \\
334 \end{longtable}
335
336 \subsection{Picture Type Depending on Engine}\label{ssec:picture_type}
337 As you probably know you can't use every picture type with every compiler
338 engine. \pdfTeX{} in \acs{dvi} mode \emph{needs} \code{eps} pictures while
339 \pdfTeX{} in \acs{pdf} mode, \XeTeX{} and \LuaTeX{} convert \code{eps}
340 pictures into \code{pdf} files, given they have the rights to write in the
341 directory the pictures are saved in.
342
343 However, the latter can include \code{jpg} and \code{png} without any
344 problems, while \pdfTeX{} in \acs{dvi} mode can't.
345
346 To resolve this \ghsystem\ tests which engine is used and if \pdfTeX{} which
347 mode is used and then chooses either \code{eps} or \code{pdf} for the
348 pictograms. You are free to choose the picture type yourself with the option
349 \begin{options}
350 \keychoice{pic-type}{eps,pdf,jpg,png}
351 Choose the picture type.
352 \end{options}
353
354 \section{Available Languages}\label{sec:ghsystem_language}
355 Right now the H and P statements are available in English,
356 French\footnote{Thanks to Bréal Frédéric and Beaude Aurélien!}, German,
357 Italian\footnote{Thanks to Jonas Rivetti!} and Spanish\footnote{Thanks to
358 Ignacio Fernández Galván!}. The package adapts \pkg{chemmacros}' option
359 \option{language} or if the option hasn't been used recognizes the language
360 settings made with \pkg{babel} or \pkg{polyglossia}. To be more precise: the
361 language selected at begin document is recognized. Later changes won't affect
362 \ghsystem. If you want to use different languages you have to use \ghsystem's
363 language option then.
364
365 You can also choose the language explicitly.
366 \begin{options}
367 \keyval{language}{lang}\Default{english}
368 Selects a language and if called in the preamble also loads the necessary
369 language file if it hasn't been loaded, yet. If the chosen file doesn't
370 exist it falls back to \code{english}. Currently available choices are
371 English, French, German, Italian, and Spanish. \meta{lang} can be a comma
372 separated list. Then the last language in the list will be the active
373 one. If you plan to switch languages within the document then you should
374 make sure to load all needed languages in the preamble first.
375 \end{options}
376 \begin{example}[side-by-side]
377 \ghs{h}{201}
378
379 \ghssetup{language=german}
380 \ghs{h}{201}
381 \end{example}
382
383 % There is another alternative:
384 % \begin{commands}
385 % \command{loadghsystemlanguage}[\marg{language}]
386 % \sinceversion{4.0}Load the language used by \ghsystem.
387 % \end{commands}
388
389 I will add other languages some time in future. This may take a while,
390 though. If you would be willing to contribute and write the statements of
391 another language please feel free to contact
392 me\footnote{\href{mailto:[email protected]}{[email protected]}}.
393 Your \TeX\ distribution should contain a file
394 \code{ghsystem\_langtemplate.def} which \emph{should} explain all immediate
395 questions and can be used as a basis for a new language file.
396
397 \section{List of All Statements}
398 If for some reason you want to list all sentences you can use
399 \begin{commands}
400 \command{ghslistall}[\oarg{options}]
401 Print a table with all defined statements.
402 \end{commands}
403
404 This command has a number of options to customize the table, which is created
405 with the \env{longtable} environment of the \pkg{longtable} package.
406 \begin{options}
407 \keyval{table-head-number}{text}\Default{Identifier}
408 The table head for the number.
409 \keyval{table-head-text}{text}\Default{Statement}
410 The table head for the statement.
411 \keyval{table-next-page}{text}\Default{continues on next page}
412 The hint for a next page.
413 \keyval{table-caption}{text}\Default{All H, EUH, and P Statements.}
414 The \meta{text} in \cs*{caption}\marg{text}.
415 \keyval{table-caption-short}{short text}\Default
416 The \meta{short text} in \cs*{caption}\oarg{short text}\marg{text}.
417 \keyval{table-label}{text}\Default{tab:ghs-hp-statements}
418 The label to refer to the table with \cs*{ref} and similar commands.
419 \keyval{table-row-sep}{dim}\Default{3pt}
420 The separation of the table rows. A \TeX\ dimension.
421 \keychoice{table-rules}{\default{default},booktabs,none}\Default{default}
422 The style of the horizontal rules in the table. \code{default} uses
423 \cs*{hline}, \code{booktabs} uses \cs*{toprule}, \cs*{midrule} and
424 \cs*{bottomrule}, resp. This option needs the \pkg{booktabs} package
425 which you have to load yourself then.
426 \keychoice{table-top-head-rule}{\default{default},booktabs,none}\Default{default}
427 Change top rule explicitly.
428 \keychoice{table-head-rule}{\default{default},booktabs,none}\Default{default}
429 Change rule below head explicitly.
430 \keychoice{table-foot-rule}{\default{default},booktabs,none}\Default{default}
431 Change foot rule explicitly.
432 \keychoice{table-last-foot-rule}{\default{default},booktabs,none}\Default{default}
433 Change last foot rule explicitly.
434 \end{options}
435
436 The code below shows how table~\ref{tab:ghs-hp-statements} was created:
437 \begin{sourcecode}
438 \ghslistall[fill-in,table-rules=booktabs]
439 \end{sourcecode}
440
441 \ghslistall[fill-in,table-rules=booktabs]
442
443 \printbibliography
444
445 \end{document}