Is there any way to have parentheses and brackets that get bigger when "nested"?

For example, normally parentheses and brackets work like in the first case shown in the picture, but I would like to know if there is a way, preferably a package, to have something like the effect of the second case shown in the picture.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.