Move the cursor of the underbrace

  • MHB
  • Thread starter anemone
  • Start date
In summary, this solution uses a hack to center the terms in the equation and hides the equation number so that it does not interfere with the centering.
  • #1
anemone
Gold Member
MHB
POTW Director
3,883
115
Hi MHB,

I was wondering if we can move the cursor of the underbrace so that it can shift to the left or right according to our need, and I will illustrate with an example to show my point:

What I want to do here is, I want to show that the product of the terms in the first two brackets in the first equation leads to the first factor in the second equation by moving the cursor of the underbrace to the left so that it points to the center of the first factor in the second equation:

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)}(1)$

$(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$

Any advice and opinion is much appreciated, and thanks in advance for your reply.:)
 
Physics news on Phys.org
  • #2
anemone said:
Hi MHB,

I was wondering if we can move the cursor of the underbrace so that it can shift to the left or right according to our need, and I will illustrate with an example to show my point:

What I want to do here is, I want to show that the product of the terms in the first two brackets in the first equation leads to the first factor in the second equation by moving the cursor of the underbrace to the left so that it points to the center of the first factor in the second equation:

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)} \quad(1)$

$(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$

Any advice and opinion is much appreciated, and thanks in advance for your reply.:)
Did you mean something like this?

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)}\quad(1)$

$\hspace{2em}(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$

As you can see, the only way I can do this is by a hack to get the spacing approximately correct. I doubt whether MathJax has the capability to get the term $(4\cos^2 x-1)$ centred precisely under the centre of the underbrace, though it could surely be done in a full implementation of TeX.
 
  • #3
Opalg said:
Did you mean something like this?

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)}\quad(1)$

$\hspace{2em}(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$

As you can see, the only way I can do this is by a hack to get the spacing approximately correct. I doubt whether MathJax has the capability to get the term $(4\cos^2 x-1)$ centred precisely under the centre of the underbrace, though it could surely be done in a full implementation of TeX.

Thank you Opalg for your quick reply!;)

I see...hmm...this is very close to what I have been looking for and now, I get a much nicer looking version of the same equations, so thank you Opalg for teaching me this trick. :)
 
  • #4
anemone said:
Hi MHB,

I was wondering if we can move the cursor of the underbrace so that it can shift to the left or right according to our need, and I will illustrate with an example to show my point:

What I want to do here is, I want to show that the product of the terms in the first two brackets in the first equation leads to the first factor in the second equation by moving the cursor of the underbrace to the left so that it points to the center of the first factor in the second equation:

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)}(1)$

$(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$

Any advice and opinion is much appreciated, and thanks in advance for your reply.:)
It just occurred to me that a better solution (for the case of this example) is simply to centre the two lines of equations. The only snag there is that the first line has an equation number that does not occur in the second line. To prevent this being included in the centering you can hide it in an \rlap, getting this:

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)} \rlap{\quad(1)}$

$(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$​
 
  • #5
Opalg said:
It just occurred to me that a better solution (for the case of this example) is simply to centre the two lines of equations. The only snag there is that the first line has an equation number that does not occur in the second line. To prevent this being included in the centering you can hide it in an \rlap, getting this:

$\underbrace{{\color{orange}(2\cos x+1)}(2\cos x -1)}(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)={\color{orange}(2\cos x+1)} \rlap{\quad(1)}$

$(4\cos^2 x-1)(2\cos 2x -1)(2\cos 4x -1)(2\cos 8x -1)=2\cos x+1$​

That is certainly a much better solution in my quest and I really appreciate your help on this, Opalg! (Sun)
 

FAQ: Move the cursor of the underbrace

1. What does it mean to "move the cursor of the underbrace"?

When we talk about moving the cursor of the underbrace, we are referring to the action of changing the location of the underbrace in a mathematical expression or equation. This is typically done by clicking and dragging the underbrace to a new position.

2. Why would I need to move the cursor of the underbrace?

Moving the cursor of the underbrace can be useful in situations where you want to highlight a specific part of an equation or expression, or when you want to make the structure of the equation clearer by grouping certain elements together.

3. How do I move the cursor of the underbrace?

The method for moving the cursor of the underbrace may vary depending on the software or program you are using. In most cases, you can click and hold the underbrace, then drag it to the desired location. Alternatively, you may be able to use keyboard shortcuts or specific commands to move the underbrace.

4. Can I move the cursor of the underbrace in both directions?

Yes, in most cases you can move the cursor of the underbrace in both directions. This means you can either move it closer to or further away from the expression it is encompassing. Some programs may have limitations on how far you can move the underbrace, but in general, you should be able to move it in both directions.

5. Will moving the cursor of the underbrace change the value of the expression?

No, moving the cursor of the underbrace will not change the value of the expression or equation. It is simply a visual adjustment to make the structure of the equation clearer or to highlight a specific part. The mathematical value of the expression will remain the same regardless of the position of the underbrace.

Similar threads

Replies
1
Views
2K
Replies
11
Views
6K
Replies
22
Views
2K
Replies
1
Views
941
Replies
15
Views
472
Replies
7
Views
2K
Replies
21
Views
1K
Back
Top