Is there a way to force a line break inside a math mode text?

My example:

  \underbrace{....}_\text{Some long text that should be multiline}


\text{Some long text that\\ should be multiline}

Didn't do the trick.

  • 4
    While it is not an answer, I thought you might like to know why \` fails inside \text. If you look through the code, \text` will insert an \hbox for the content when in math mode. TeX sets \hbox material in a mode where paragraphs are ignored, so there will never be a break inside the argument of the \text macro. – Joseph Wright Dec 21 '10 at 13:55
  • Is there a reasonable solution in Plain TeX? – Palec Apr 5 '15 at 14:24

You can use the \substack command, from the amsmath package, just like \text.

  \underbrace{...}_{\substack{\text{Some long text that} \\ \text{should be multiline}}}
  • 5
    Why do you have 3 backslashes where the ... nvm, I see now. I feel this answer would be better with some spacing for readability. Also, I believe the answer would be improved if it were pointed out that \substack was designed for this very purpose. (It was right?) – Travis Bemrose Apr 30 '15 at 23:59
  • \substack, mentioned by Carsten, probably fits best to your \underbrace because of the centered alignment.

  • subarray is similar but offers customizable alignment:


 \underbrace{....}_{\begin{subarray}{l}\text{Some  long text that}\\
    \text{should be multiline}\end{subarray}}
  • \parbox also works in math mode. You could use a font size command inside.

Another possibility:

 \underbrace{some equation}_{\text{Some long text that}\atop\text{should be multilined}}



  \underbrace{....}_\myText{Some long text that\\ should be multiline}

  • 1
    It can be centered by replacing the @{}l@{} with @{}c@{} – Hans May 22 '17 at 13:31

A simple \parbox with a certain width should also do.

\usepackage{mathtools}   % loads »amsmath«

    \underbrace{ax^3+bx^2+cx+d}_{\text{\parbox{10em}{Some text that should be multi-lined}}}
  • That doesn't work. – jonaprieto Oct 14 '14 at 20:20
  • If you remove the \text it sure does. At least in my context. @d555 – MickG Jan 11 '16 at 12:27

One more, for a very long text:


I had a similar issue, solved by writing same expression in multiple lines by $$, for example,



$\Pi_{employee-name}(\sigma_{manages.manager-id \ = \ employee2.employee-id \ \wedge}$\\
$_{employee.street = employee2.street \ \wedge \ employee.street = employee2.street}(employee \bowtie manages \bowtie \rho_{employee2}(employee)))$


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.