I need to write a fraction for which I can break the numerator into several (not just two) lines. I tried several solutions and none have works. On Overleaf, most just stop the document from compiling. These are my latest attempts:
\begin{align*}
\frac{\begin{split}{2102 – 400 + \\ 1873 – 400 + \\ 1949+ \\ 1800 – 400 + \\ 1314 + 400 + \\ 1473 + \\ 1901 + 400}\end{split}}{7}
\end{align*}
and (this was a first split; I would have used \splitfrac
again if that had worked)
\begin{align*}
\frac{\splitfrac{2102 – 400 +}{1873 – 400 + \\ 1949+ \\ 1800 – 400 + \\ 1314 + 400 + \\ 1473 + \\ 1901 + 400}}{7}
\end{align*}
Even better (but not indispensable), I'd like to annotate each line of the numerator. Is that possible? To indicate what each line represents.
NOTE: I ended up doing this by putting matrix in the numerator. That just solved everything for me in a very easy way.
Best Answer
I'm not sure I understood your comments fully, but
\splitfrac
instructions can certainly be nested. Each instance of\splitfrac
creates a linebreak; three nested\splitfrac
directives, for instance, result in four lines overall.The
\mathstrut
directives serve to insert a bit of extra vertical whitespace.