How to make underbracket thinner

Excerpting from p. 14 of the user guide of the mathtools package (highlighting added):

enter image description here

The user guide says that the default width of underbrackets is ca 5/18ex = ca. 0.28ex. The following screenshot shows expressions with underbrackets that involve the default width as well as one half, two thirds, and three quarters of the default width. Choose your favorite.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for '\underbracket' macro
\begin{document}
\[
% default width: 5/18ex = ca 0.28ex
 \underbracket{1+2+3}_{\text{default}} % default width
+\underbracket[0.140ex]{1+2+3}_{\text{tubelike}}% (1/2)default
+\underbracket[0.187ex]{1+2+3}_{\text{skinny}}  % (2/3)default
+\underbracket[0.210ex]{1+2+3}_{\text{thin}}    % (3/4)default
+\underbracket[0.280ex]{1+2+3}_{\text{default}} %      default
\]
\end{document}

The thickness of brackets can be specified in the first optional argument of \underbracket and \overbracket. The default thickness is the height of $\braceld$ (in current math font).

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
  C(s) = 
  % use thickness 0.5pt
  \underbracket[.5pt]{\frac{K_1}{s}}_{\text{forced}} + 
  % use default thickness
  \underbracket{\frac{K_2}{s+2}+\frac{K_3}{s+4}+\frac{K_4}{s+5}}_{\text{natural}}
\]
\end{document}

enter image description here

You can also change the thickness of brackets once for all:

\documentclass{article}
\usepackage{mathtools}
\usepackage{xpatch}

% change default thickness of brackets to .6pt
\MHInternalSyntaxOn
\xpatchcmd\upbracketfill
  {\sbox\z@{$\braceld$}\edef\l_MT_bracketheight_fdim{\the\ht\z@}}
  {\edef\l_MT_bracketheight_fdim{.6pt}}
  {}{\fail}

\xpatchcmd\downbracketfill
  {\sbox\z@{$\braceld$}\edef\l_MT_bracketheight_fdim{\the\ht\z@}}
  {\edef\l_MT_bracketheight_fdim{.6pt}}
  {}{\fail}
\MHInternalSyntaxOff

\begin{document}
\[
  C(s) = 
  \underbracket{\frac{K_1}{s}}_{\text{forced}} + 
  % use default thickness
  \overbracket{\frac{K_2}{s+2}+\frac{K_3}{s+4}+\frac{K_4}{s+5}}^{\text{natural}}
\]
\end{document}

enter image description here

Tags:

Mathtools