Is there some way to use two (or more) underbraced expressions on the same line?

For example:
[hashtag]underbrace(axxaxx...xxa)(p" times)xxunderbrace(axxaxx...xxa)(q" times")[hashtag]
gives

#underbrace(axxaxx...xxa)_(p" times)xxunderbrace(axxaxx...xxa)_(q" times")#

If I split it up and put a blank in between:
[hashtag]underbrace(axxaxx...xxa)_(p" times)[hashtag]

[hashtag]xxunderbrace(axxaxx...xxa)_(q" times")[hashtag]

I can get
#underbrace(axxaxx...xxa)_(p" times)#

#xxunderbrace(axxaxx...xxa)_(q" times")#

1 Answer
Sep 15, 2017

Yes.

Explanation:

Yes, you can add two or more underbrace (or overbrace) functions on one line.

Here's how that would look using your example

  • without hashtags

underbrace(axxaxx...xxa) (p" times") xx underbrace(axxaxx...xxa) (q" times")

  • with hashtags

#underbrace(axxaxx...xxa)_ (p" times") xx underbrace(axxaxx...xxa)_ (q" times")#

You can also use nested underbrace functions if you want, but that's not really that practical because of the decreased font size.

  • without hashtags

underbrace(axxaxx...xxa) ( underbrace(p" times") _ (color(blue)("something cool"))) xx underbrace(axxaxx...xxa) ( underbrace(q" times")_ (color(red)("something interesting")))

  • with hashtags

#underbrace(axxaxx...xxa)_ ( underbrace(p" times") _ (color(blue)("something cool"))) xx underbrace(axxaxx...xxa)_ ( underbrace(q" times")_ (color(red)("something interesting")))#

I should mention that you need to be careful when using multiple underline symbols on the same line because you will get a formatting error in the preview section of the answer.

So when you have to add multiple _ symbols, just add a blank space after them to get the math to format in the preview sections.

PS: In the syntax that you used as your example, you forgot to add a quote mark after p times.

  • without hashtags

underbrace(axxaxx...xxa) (p" times) xx underbrace(axxaxx...xxa) (q" times")

  • with hashtags

#underbrace(axxaxx...xxa)_ (p" times) xx underbrace(axxaxx...xxa)_ (q" times")#

This is what it looks like with the added quote mark

  • without hashtags

underbrace(axxaxx...xxa) (p" times") xx underbrace(axxaxx...xxa) (q" times")

  • with hashtags

#underbrace(axxaxx...xxa)_ (p" times")xxunderbrace(axxaxx...xxa)_ (q" times")#