I'm writing the steps to resolve an equation and for clarity I would like to align and center the part resolved on the second line with the part that was resolved on the first line. Is there a way to achive this?
For example, take this simple line
||-3 - 4 - 2| - 5|
which will resolve with the first step to
||-9| - 5|
I would like to render like this:
||-3 - 4 - 2| - 5|
| |-9| - 5|
| 9 - 5|
Is it doable ?
You can use
eqparbox's\eqmakebox[<tag>][<align>]{<stuff>}to set<stuff>in the widest box possible across all similar<tag>s. Additionally, you can adjust the box's<align>ment as needed (default iscentre, but there's alsoleft andright). I've adapted\eqmakeboxinto\eqmathboxto work inside math mode:\underbraceis perhaps not necessary, but it's added for clarity in terms of the reduction.The above can also be achieved inside an
array:The (vertical) spacing is slightly tighter by default.