Consider the following macro:
\newcommand{\interpretation}[1]{\left[ #1 \right]_{\mathcal{N}}}
This gives the following output on argument a:
So far, so good.
Now, suppose for example that I pass in a long argument that includes all sorts of things, such as [(\phi \land \psi)]_A \lor [(\neg \chi \rightarrow \zeta)]_C:
(Note that none of this is meant to make any mathematical sense - just random symbols for an example.)
It can get hard to see which set of brackets matches up with which, etc. What I would like is for the macro to conditionally add whitespace around the outermost brackets if the argument is visually wide. For example, like this:
If I unconditionally add space, it will do it to all arguments, even our simple a from before:
which I would like to avoid. Is there any way for the macro to 'render' its argument and add spaces conditionally based on its width? I am open to any packages etc.




