0

Our robotics team decided to re-write all of our documentation in LaTeX and combine it into a single manual. In our Safety manual, we have several NFPA 704 symbols to show how hazardous an item is. Unfortunately, I cannot find how to draw these in LaTeX or TikZ. Would someone be able to guide me in creating one of these symbols in a document?

An image of the standard is attached below. We do not need the special hazards.

NFPA 704 Chart

edit: Here is a symbol showing an extremely hazardous material that cannot be exposed to water or oxygen:

Example Chart
(source: earlham.edu)

2 Answers2

4

enter image description here

\documentclass{article}
\usepackage{lmodern}
\usepackage{color,graphicx}

\begin{document}

\newcommand\foo[4]
{%
\setlength\unitlength{2pt}%
\setlength\fboxsep{0pt}\setlength\fboxrule{\unitlength}%
\rotatebox{45}{%
\begin{picture}(52,52)
\put(0,27){\fcolorbox{black}{blue}{\makebox(25,25){}}}%
\put(27,27){\fcolorbox{black}{red}{\makebox(25,25){}}}%
\put(0,0){\fcolorbox{black}{white}{\makebox(25,25){}}}%
\put(27,0){\fcolorbox{black}{yellow}{\makebox(25,25){}}}%
\end{picture}}%
\begin{picture}(0,0)
\fontsize{40pt}{45pt}\sffamily\bfseries
\put(-42,50){#1}
\put(-60,30){#2}
\put(-22,30){#3}
\fontsize{22pt}{23pt}\sffamily\bfseries
\put(-44,14){\begin{tabular}{@{}c@{}}#4\end{tabular}}
\end{picture}%
}


\fbox{\foo{4}{4}{4}{\rlap{---}W\\OX}}

\end{document}
David Carlisle
  • 757,742
2

Just for fun, an alternative with TiKZ.

I've had to use a regular polygon because I didn't find how to adjust diamond size.

\documentclass[tikz,border=2mm]{standalone} 
\usetikzlibrary{shapes.geometric}
\usepackage{lmodern}

\begin{document}
\begin{tikzpicture}[box/.style={shape=regular polygon, regular polygon sides=4, 
   shape border rotate=45, draw, fill=#1, 
   font=\fontsize{40pt}{45pt}\sffamily\bfseries, 
   text width=1.5cm, align=center, inner sep=1pt}]
\node[box=red, anchor=south] (1) {1};
\node[box=blue, anchor=east] (2) {2};
\node[box=yellow, anchor=west] (3) {3};
\node[box=white,font=\fontsize{22pt}{23pt}\sffamily\bfseries, anchor=north] (4) {ALK};
\end{tikzpicture}
\end{document}

enter image description here

Ignasi
  • 136,588