1

is there a way to use \underbrace{}_{} inside of a \left\right-environment without (for example) making the braces extra-long?

And (if not): Can I set the position of the underbraced text/math lower so it doesn't collide with those braces?

MWE:

\documentclass[10pt, a4paper, titlepage, parskip=half]{scrbook} % Maße A4: 210x297 mm
\usepackage[a4paper,lmargin=2.5cm,rmargin=2cm,tmargin=2.5cm,bmargin=2.5cm]{geometry}    % Format und Seitenraender
% Ausgabe von Umlauten (vor 'inputenc' einbinden!)
\usepackage[T1]{fontenc}        % Schoene Ausgabe von Umlauten
%------------------------------------------------------------

% Deutsche Eingabe
\usepackage[utf8]{inputenc}     % Umlaute direkt eingeben   UTF-8 zur besseren Zusammenarbeit mit vers. Betriebssystemen
\usepackage[ngerman]{babel}     % deutsche Eingabe (Zur Eingabe von Umlauten wird 'inputenc' benötigt)
%------------------------------------------------------------
\usepackage{mathtools}
\usepackage{cleveref}               % Erweiterte Refernzenbefehle -- IMMER NACH hyperref lade
\crefname{enumi}{Punkt}{Punkte} % Aendert den angezeigten Namen des Labels 'enumi' in 'Punkt' bzw. 'Punkte' (Plural)
\crefname{figure}{Abbildung}{Abbildungen}
\crefname{eqation}{Gleichung}{Gleichungen}
\Crefname{equation}{Gleichung}{Gleichungen}
\crefname{subsection}{Abschnitt}{Abschnitte}
\newcommand{\udl}[1]{\underline{#1}}    %Abkuerzung fuer den Underline-Befehl

\begin{document}
\begin{equation}
    \rightarrow G_1 + G_2 = \sqrt{\dfrac{1}{R^2} +G_2^2} \label{eq:pi-daempfungsglied_bsp}
    \end{equation}
    \begin{align*}
        \udl{T}_B &= \dfrac{2}{ \dfrac{R}{G_2}\left( G_1 + G_2 + \dfrac{1}{R} \right)\cdot\left( G_2 + G_3 + \dfrac{1}{R} \right) -G_2\cdot R } = \dfrac{2 G_2R}{ R^2\left( \underbrace{ G_1 + G_2}_{\mathrlap{ \text{ aus \Cref{eq:pi-daempfungsglied_bsp}} }}+ \dfrac{1}{R} \right)^2 - G_2^2R^2 } \\[1.5ex]
                  &= \dfrac{ 2G_2R }{ R^2\left( \sqrt{ G_2^2 \dfrac{1}{R^2} } +\dfrac{1}{R} \right) -G_2^2 R^2 }
    \end{align*}
\end{document}

The result is something like this: Ugly underbrace

  • 2
    Simple: don't use \left...\right manual scale instead – daleif Nov 6 '17 at 8:59
  • @daleif But why, when \left\right scales the braces for me? – Michael Schmid Nov 6 '17 at 9:03
  • You mean like \Big( \Big) ? – Michael Schmid Nov 6 '17 at 9:04
  • Counter question: If \left( .. \right) scales the braces wrongly, why use it? \Bigl( ... \Bigr) works much better here. See for example tex.stackexchange.com/questions/135426 and the Linked questions (in the right margin). – Torbjørn T. Nov 6 '17 at 9:15
  • @MichaelSchmid exactly. In many cases manually scaling is just a lot better since auto scale easily gets too large. Another example of too big: \[ \left( \sum_i \right) \], using auto scaled for math in text often leads to math being too tall for the line. In general, most of the people answering here recommend using auto scale when appropriate, and manual elsewhere. – daleif Nov 6 '17 at 9:22
4

If you want to stick with \left...\right you can solve it with \smash that will ignore the vertical space.

\begin{align*}
  \udl{T}_B &= \dfrac{2}{ \dfrac{R}{G_2}\left( G_1 + G_2 + \dfrac{1}{R} \right)
    \cdot\left( G_2 + G_3 + \dfrac{1}{R} \right) -G_2\cdot R } 
  = \dfrac{2 G_2R}{ R^2\left(%
      \smash{\underbrace{ G_1 + G_2}_{\mathrlap{ \text{ aus \Cref{eq:pi-daempfungsglied_bsp}} }}}
      + \dfrac{1}{R} \right)^2 - G_2^2R^2 } \\[1.5ex]
  &= \dfrac{ 2G_2R }{ R^2\left( \sqrt{ G_2^2 \dfrac{1}{R^2} } +\dfrac{1}{R} \right) -G_2^2 R^2 }
\end{align*}

enter image description here

But I agree with the comments that often it is better to scale it yourself. Here I use\biggl...\biggr to get close to the same picture as above.

\begin{align*}
  \udl{T}_B &= \dfrac{2}{ \dfrac{R}{G_2}\biggl( G_1 + G_2 + \dfrac{1}{R} \biggr)
    \cdot\biggl( G_2 + G_3 + \dfrac{1}{R} \biggr) -G_2\cdot R } 
  = \dfrac{2 G_2R}{ R^2\biggl(%
    \underbrace{ G_1 + G_2}_{\mathrlap{ \text{ aus \Cref{eq:pi-daempfungsglied_bsp}} }}
  + \dfrac{1}{R} \biggr)^2 - G_2^2R^2} \\[1.5ex]
  &= \dfrac{ 2G_2R }{ R^2\biggl( \sqrt{ G_2^2 \dfrac{1}{R^2} } +\dfrac{1}{R} \biggr) -G_2^2 R^2 }
\end{align*}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.