I need to make brackets of various kinds stretch with the length of the argument below and above. They require rotation of text inside a rotated matrix.
For example, I am trying to make a round bracket below and above text, similar to underbrace and overbrace. But the rotation inside a rotation, so that text is properly oriented, does not compile. What am I doing wrong?
(If such a function already exists, that is an answer to the question, of course, but I would also like to know in that case the correct way to stack rotate boxes, too, for general knowledge.)
\documentclass[border=4pt]{article}\usepackage{amssymb,mathtools}
%LABELCONVENTION
\def\underround #1 {\ensuremath{\rotatebox{90}{\begin{pmatrix}\;\rotatebox{-90}{#1}\; \,\end{matrix}}}}%
\def\overround #1 {\ensuremath{\rotatebox{-90}{\begin{pmatrix}\;\rotatebox{90}{#1}\;\,\end{matrix}}}}
\def\underbracket #1 {\ensuremath{\rotatebox{90}{\begin{bmatrix}\;\rotatebox{-90}{#1}\; \,\end{matrix}}}}%
\def\overbracket #1 {\ensuremath{\rotatebox{-90}{\begin{bmatrix}\;\rotatebox{90}{#1}\;\,\end{matrix}}}}
\begin{document}
$\underround text $
\end{document}
! LaTeX Error: Environment tikzpicture undefined.