# How to change brackets in TraditionalForm output

I'm trying to improve TraditionalForm's output by using different brackets when there are more than one. For instance, instead of $u(v(r(b))))$, I'd like to get $u\{v[r(b)]\}$.

I am not sure how to recognize order of brackets when I have lot of brackets. How can I do this?

• Why all these downvotes? It is about TraditionalForm and I always thought that e.g. differently colored or sized brackets could help sometimes. – Rolf Mertig Feb 1 '13 at 20:55

This is a nice exercise on boxing:

MakeBoxes[u[v_[r_[b_]]], TraditionalForm] :=
Module[{b1, b2, b3, t},