2

Good evening

How to write an over bracket in an under bracket text (the picture below)?

enter image description here

Thanks for help.

4

You probably also want a friendly interface:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\textunderbrace}[2]{%
  \ensuremath{\underbrace{\text{#1}}_{\text{#2}}}%
}
\newcommand{\textoverbrace}[2]{%
  \ensuremath{\overbrace{\text{#1}}^{\text{#2}}}%
}

\begin{document}

\textunderbrace{Text \textoverbrace{text}{aaa} text text}{bbb}

\bigskip

\emph{\textunderbrace{Text \textoverbrace{text}{aaa} text text}{bbb}}

\end{document}

enter image description here

2

You can simply nest the commands like

$\underbrace{Text \overbrace{text}^{aaa} text text}_{bbb}$
  • But the text is together. That is wrong. Help me again. :) – Ľubomír Masarovič Dec 13 '16 at 17:47
2

Use \text{...} from package amsmath for preserve text mode in math environment:

\documentclass[margin=5mm, preview]{standalone}
\usepackage{amsmath}

\begin{document}
$\underbrace{\text{Text }\overbrace{\text{text}}^{\text{aaa}} \text{ text text}}_{\text{bbb}}$
\end{document}

enter image description here

Edit: in \itshape

{\itshape
$\underbrace{\text{Text }\overbrace{\text{text}}^{\text{aaa}} \text{ text text}}_{\text{bbb}}$
}

enter image description here

1

You must have the first argument of \under/\overbrace in text mode:

\[ \underbrace{\emph{Text   $ \overbrace{\text{text}}^{aaa} $ text text}}_{bbb} \]%

enter image description here

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.