I am writing a markdown document and I want to have underbraces of equal size under each term, like the one here:
I could only do it manually by adding a bunch of empty spaces (\ ) around the terms:
$$
\underbrace{\ \ \ \ X_t \ \ \ \ }_\text{Population at time $t$} =
\underbrace{\alpha \circ X_{t-1}}_\text{Survivors from time $t-1$} +
\underbrace{\ \ \ \ \epsilon_t \ \ \ \ }_\text{Immigration}
$$
Though, it is not efficient to add spaces manually (and investigating visually whether they end up of equal size), and they do not look nice and need to be lowered a bit.:
How can I fix it?
(Please ignore the mismatch of the circle operators; I have posted it elsewhere.)





\settowidthinstruction because there's just one equation; if there are two equations in the document, you can just run a second\settowidthinstruction. Observe that it would not be necessary to redefine the\myboxmacro. If you're averse to measuring the width of the widest element to be under-braced directly, you're entirely free to choose some arbitrary length that's as least as large as\mylen. – Mico Jan 26 '21 at 20:20