I'm trying to write a macro to set interpretation brackets for semantics, i.e. double square brackets that are connected. The bracket height should adjust to the size of what's inside the brackets (since there can be complex formulae, tables, or trees). My problem is that the distance between the brackets seems to grow as their vertical size grows, so that either taller brackets don't connect any more (as in the MWE below), or, if I make the negative space wider, normal size brackets melt into one. So I need a way to automatically adjust the negative space between the opening and between the closing brackets according to the bracket height (or to turn the automatic width-to-height adjustment off).
Any help is appreciated.
Code: Select all
\newcommand{\interp}[2][w]{%
\delimitershortfall5pt
\ensuremath{\left[\hspace{-.3ex}\left[
\mbox{#2}%
\right]\hspace{-.3ex}
\right]^#1}}
\interp{This is how they're supposed to look} \interp{\Huge Foo} \interp{\rule{0mm}{20ex}\Huge Foo}