I'm trying to draw a "science" symbol in TikZ, represented by a stylized atom, and can't figure out how to do it. Is there any way to somehow define a magic TikZ style so I can do something like \node[science](C1) at (0,0){};
?
I have tried using a \def
macro and it can draw the symbol I want, but somehow the node name doesn't work in a way that I can refer to it later.
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\title{science symbol}
\begin{tikzpicture}[>=latex,
font=\sffamily
]
\def\science#1#2 {
\node[circle, draw, minimum size=10mm] (#2) at #1 {};
\foreach \ang in {0,120,240}
\draw[rotate around={\ang:#1}] #1 ellipse (4.5mm and 1.5mm);
\fill #1 circle (0.5mm);
}
\science{(0,0)}{C1};
\science{(2cm, 0)}{C2};
\draw[->] (C1) -- (C2);
\end{tikzpicture}
\end{document}
This draws what I want for the nodes
but I get an error on my \draw[->] (C1) -- (C2);
statement:
Package pgf Error: No shape named C1 is known.
\def\science#1#2{...}
intead of\def\science#1#2 {...}
(no space between#2
and{
).\newcommand\science[2]{...}
.