I have the following commands in my code (taken from Creating uniformly sized boxes around text) to manually adjust the height of frameboxes (the reason is that I often put several in a row with different math/text, wanting all of them to be the same size):
\newcommand*{\mystrut}{\rule[-.5\baselineskip]{0pt}{1.5\baselineskip}}
\newcommand*{\mybox}[1]{\framebox{\mystrut #1}}
where I adjust the numbers in front of each \baselineskip depending on how big I want the boxes to be. While this eventually gets me the height of the boxes I want, if I want to center the text vertically in those boxes I have to fiddle around with those two numbers manually. How can I automatically center my text in an intentionally oversized framebox?
For instance, in the following code, is there something I could add to my \mybox command to automatically vertically center the text after everything else has been done (the number chosen for baselineskip was found using some other code to calculate the height of the largest box)?
\baselineskip=23.76836pt
\newcommand*{\mystrut}{\rule[-.5\baselineskip]{0pt}{1.5\baselineskip}}
\newcommand*{\mybox}[1]{\framebox{\mystrut #1}}
\mybox{$\frac{a^2+b^2}{c^2+d^2}$}\mybox{$\frac{\frac{a}{\sqrt{a^2+b^2}}}{\frac{c}{\sqrt{c^2+d^2}}}$}\mybox{$a=b=c=d=e=f=g$}
Output (space below all math items is smaller than space above in each box):

Thanks very much.

