So far, \makebox*{B}{A} sets the width
and \newcommand{\fakeheight}[2]{\mbox{\smash{#1}\vphantom{#2}}} sets the height
MWE:
Code: Select all
\documentclass[fleqn]{article}
\usepackage{makebox}
\usepackage{booktabs}
\usepackage[version=3]{mhchem}
\usepackage{nccboxes}
\usepackage{tikz}
\usetikzlibrary{matrix,calc}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt}
\setlength{\mathindent}{0pt}
\newcommand{\fk}[2]{\mbox{\smash{#1}\vphantom{#2}}}
\begin{document}
\fbox{CAPS}\fbox{a}\fbox{ooooooooo} \\ \\
need the height of \fbox{CAPS} and the width of \fbox{ooooooooo} for \fbox{a}
\end{document}