User:Prosody/verticalbrace2

{{#tag:math|\scriptstyle{

{{#switch:{{{2|}}}|u|up|d|down= {{#switch:{{{2|}}}|d|down=\underbrace{|u|up=\overbrace{}}

{{loop|{{#if:{{{1|}}}|{{#expr: {{{1}}}-1 }}|0}}|\quad}}

}


 * default=

\left{{#switch:{{{2|}}}|left|l=\{|#default=.}}

\begin{matrix} \ {{loop|{{#if:{{{1|}}}|{{#expr: {{{1}}}-1 }}|0}}|\\ \}} \end{matrix}

\right{{#switch:{{{2|}}}|left|l=.|#default=\}\,}}

}} } }}