Welcome to the TeXnik website (under construction) Over/Underbrackets |
|||||||||||||||||||||||||||||
|
Copy the following LaTeX-code and put it in your preamble or load the example:\def\underbracket{% \@ifnextchar [ % {\@underbracket}% {\@underbracket [\@bracketheight]}} \def\@underbracket[#1]{% \@ifnextchar [ % {\@under@bracket[#1]}% {\@under@bracket[#1][0.4em]}} \def\@under@bracket[#1][#2]#3{%\message {Underbracket: #1,#2,#3} \mathop {% \vtop {% \m@th \ialign {% ##\crcr $\hfil \displaystyle {#3}\hfil $% \crcr \noalign % {\kern 3\p@ \nointerlineskip }% \upbracketfill {#1}{#2} \crcr \noalign % {\kern 3\p@ }% }% }% }% \limits% } \def\upbracketfill#1#2{% $\m@th \setbox \z@ \hbox {$\braceld$} \edef\@bracketheight{\the\ht\z@}\bracketend{#1}{#2} \leaders \vrule \@height #1 \@depth \z@ \hfill \leaders \vrule \@height #1 \@depth \z@ \hfill% \bracketend{#1}{#2}$% } \def\bracketend#1#2{\vrule height #2 width #1\relax} the code for the overbracket is different and was send by Dorothea Bahns: \def\overbracket{\@ifnextchar [ {\@overbracket} {\@overbracket [\@bracketheight]}} \def\@overbracket[#1]{\@ifnextchar [ {\@over@bracket[#1]} {\@over@bracket[#1][0.3em]}} \def\@over@bracket[#1][#2]#3{%\message {Overbracket: #1,#2,#3} \mathop {\vbox {\m@th \ialign {##\crcr \noalign {\kern 3\p@ \nointerlineskip }\downbracketfill {#1}{#2} \crcr \noalign {\kern 3\p@ } \crcr $\hfil \displaystyle {#3}\hfil $% \crcr} }}\limits} \def\downbracketfill#1#2{$\m@th \setbox \z@ \hbox {$\braceld$} \edef\@bracketheight{\the\ht\z@}\downbracketend{#1}{#2} \leaders \vrule \@height #1 \@depth \z@ \hfill \leaders \vrule \@height #1 \@depth \z@ \hfill \downbracketend{#1}{#2}$} \def\downbracketend#1#2{\vrule depth #2 width #1\relax}There is no difference in the examples. Replace "under" with "over" and you'll get nearly the same. underbrace versus underbracket
|