I want to define nodes which are shapes with some text in it using \ce{} from the mhchem package. How would I go around ensuring the baselines are the same between nodes, right now it shifts if I use subscript. Here's a MWE:
\documentclass{article}
\usepackage[version=3]{mhchem}
\usepackage{tikz}
\usetikzlibrary{shapes}
\newbox\nodebox
\newcommand\mycommand[2]{%
\begin{tikzpicture}%
\node[text=#1, rectangle, inner ysep=4pt, inner xsep=2pt, rounded corners=7, minimum height=5mm, minimum width=10mm, fill=#1] {\tiny\sffamily \textbf{\ce{#2}}};
\node[yshift=-0.5,text=black!95!white] {\scriptsize\sffamily \textbf{\ce{#2}}};
\node[text=white] {\scriptsize\sffamily \textbf{\ce{#2}}};
\end{tikzpicture}%
}
\begin{document}
\mycommand{red!40!white}{Al2O3} \mycommand{blue!40!white}{Al}
\end{document}
