jeudi 4 décembre 2014

Correct positioning of right supscript in combination with \underbrace


I have a term that needs both an underbrace and a transpose sign as a subscript on its right side. There are three options in what order the \underbrace-command its corresponding subscript and the superscript can be coded. Unfortunately, none of the possible combinations yields the correct typographic result. See the MWE for details



\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb}
\usepackage[utf8]{inputenc}

\newcommand{\Tr}{\ensuremath{\mathsf{T}}}

\begin{document}

Correct spacing without \verb!\underbrace!:
\begin{equation}
( a - b )^{\Tr}
\end{equation}

With \verb!\underbrace! and correct positioning of the \verb!\Tr!-symbol, but
actually the brace is supposed to embrace the inner term only:
\begin{equation}
\underbrace{( a - b )^{\Tr}}_{{} = c}
\end{equation}

The \verb!\underbrace! includes the correct part of the term, but the
\verb!\Tr!-symbol is now misplaced above the term
\begin{equation}
\underbrace{( a - b )}_{{} = c}^{\Tr}
\end{equation}

With an additional pair of \verb!{}! the result is nearly correct, but the
\verb!\Tr!-symbol is placed too high in comparison without any
\verb!\underbrace!:
\begin{equation}
{\underbrace{( a - b )}_{{} = c}}^{\Tr}
\end{equation}

The latter is visually disturbing if there is a mixed sequence of terms
with and without \verb!\underbrace! and varying height of the
\verb!\Tr!-symbol:
\begin{equation}
( a - b )^{\Tr} {\underbrace{( c - d )}_{{} = c}}^{\Tr} ( e - f )^{\Tr}
\end{equation}

\end{document}




Aucun commentaire:

Enregistrer un commentaire