As the title says, the \underbrace
in my code is not aligned, while the \overbrace
in not creating any problems. This is visible in the first picture:
I would like to get something like this:
Here is the code that I'm using
\documentclass[11pt,a4paper,openany]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[dvipsnames]{xcolor}
\usepackage{mathtools}
\newcommand{\deff}[1]{\large{\underline{\textbf{#1}}}}
\newcommand{\X}{\mathcal{X}}
\newcommand{\Y}{\mathcal{Y}}
\newcommand*{\Vimplies}{\mathrel{\text{\raisebox{.25ex}{\rotatebox[origin=c]{270}{$\implies$}}}}}
\begin{document}
DIM.
\begin{gather*}
\lefteqn{
\textcolor{red}{
\underbrace{\phantom{a) \iff b)}}_{a) \implies b) \;\land\; b) \implies a)}}}
a) \iff
\textcolor{ForestGreen}{
\overbrace{\textcolor{black}{b) \iff c)}}^{b) \implies c) \;\land\; c) \implies b)}} \\
\Vimplies \\
\boxed{a) \implies b) \implies c) \implies a)}
\end{gather*}
\[\lefteqn{\underbrace{\phantom{1+2+3}}_{a+b+d}}1+2+\overbrace{3+4+5}^{e+f+g}\]
\end{document}