I want to make longer underbraces for a better visualisation of interstimulus intervals.

My code looks like this:

$$\bullet \underbrace{{}{}}_{1 sec} \bullet \underbrace{{}{}}_{2 sec} \bullet$$

How can I stretct the second underbrace?

Is it possible to use a constant for this instead of something like $\longunderbrace$ ?

I mean, I will be using some other time intervals like 1.4 sec, 1.7 sec.

  • Just out of idle curiosity: What's an interstimulus interval? – Mico Jun 22 '16 at 23:01
  • 1
    @Mico In a psychology experiment, a participant gets some stimulus, such as seeing a picture, hearing a sound, getting an electric shock etc. The time between these stimuli is called interstimulus interval. A mouse's reaction to electric shocks can be different for different interstimulus intervals. – ThePortakal Jun 22 '16 at 23:06

Using \underbrace has some limitations, as it has a required minimum width to construct all the parts related to the brace (see the first example below). I've created \interval[<wd>]{<text>} which sets an \underbrace of width <wd> relative to some unit of measure. The default measure is ems, but you can change this, as presented in the second example:

enter image description here

  \bullet \interval[1]{1 sec} \bullet \interval[2]{2 sec} \bullet

  \bullet \interval[50]{1.4 sec} \bullet \interval[60.7143]{1.7 sec} \bullet

So, if 1.4 seconds is equivalent to 50pt, then 1.7 seconds should be 60.7143pt.


Try something like this

\[ \underbrace{\hspace{2em}}_{\text{1 sec}} \]

Also, don't use $$ … $$: this is plain TeX, and can yield bad vertical spacing.

Not sure what you're after exactly, but for short \underbraces, the \underbracket command from mathtools often looks nicer, and is customisable.

  • Thanks. But 2em should be in braces. – ThePortakal Jun 22 '16 at 23:10
  • Right. I should have checked what I typed, as often… Fixed. – Bernard Jun 22 '16 at 23:16

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.