I am trying to create a display equation showing the coefficients of an example polynomial for use in the quadratic formula. Basically, I want each coefficient of the polynomial to have an arrow pointing to it, and then below that the variable.

I used this code:

\underset{\underset{a}{\uparrow}}{1} x^2-\underset{\underset{b}{\uparrow}}3 x-\underset{\underset{c}{\uparrow}}{10}=\underset{\underset {x}{\uparrow}}{0}

To create this example:

example image

The nested \undersets properly align the arrows and variables with each coefficient in the sample equation.

The only problem is that the baseline of the "b" is much lower than the baseline of the other variables. How do I get the baselines of the underset elements to line up, kind of like in this image:

desired result


Here's an answer using stacks, which I have incorporated into the macro \ptto{}{}. Note: I have made it so that a wide comment does not disrupt the spacing of the equation above. However, if the width of the underset was such that you needed to adjust the spacing of the above equation, then the [F] option to \ptto will accomplish it, as in \ptto[F]{\epsilon}{\mathrm{wide}}.

$\ptto{1}{a}x^2 - \ptto{3}{b}x - \ptto{10}{c} = \ptto{0}{x} + 

enter image description here


Use a strut. In the following command I also set \scriptstyle to avoid the letters to become too small.


  \underset{\underset{\scriptstyle\mathstrut #2}{\uparrow}}{#1}%




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.