As generally acknowledged TeX offers superb formatting capabilities for math in an automated fashion. Nevertheless there are some areas with clear deficiencies that one either has to accept or manually improve on a case by case basis.
One of the biggies in that respect is TeX's handling of sub-formulas (i.e., material inside a brace group, e.g., and index, but also any group on top-level). TeX sets such sub-formulas always in natural width even if the whole formula is subject to severe stretching or shrinking otherwise. As an example, consider the following (not very sensible) example:
\documentclass{article}
\newlength\x
\begin{document}
\newcommand\formula{$ a+\mathbf{b+c}+d+e+f = \sum_{i=1}^{n-x-y-z} x_{i+j}$}
\settowidth\x{\formula}
\hbox to \x{\formula} % natural width
\addtolength\x{-20pt}
\hbox to \x{\formula} % now shrink it a lot
\addtolength\x{100pt}
\hbox to \x{\formula} % now stretch a lot in the opposite direction
\end{document}
The formula here has a number of obvious sub-formulas in the subscripts and superscript, but for illustration I also added a sub-formula via \mathbf. Of course the usage of \mathbf in this way is wrong!!! (it should not be applied to several symbols), but I'm sure you would find this in documents. In any case just {b+c} would have had the same effect here. Now what do you think happens if we run this?
This:

As one can see the naturally "boxed" sub-formulas are very wrong the moment the rest of the formula is subject to stretching or shrinking.
Until recently no TeX engine successor addressed this issue. With LuaTeX opening up a lot of the internals of TeX I had some hope that this would be different. However, upon studying the manual my conclusion is that this area (sor far it least) has not been addressed (or considered).
As far as I can see the only way something could be done in LuaTeX about this issue would be to use the mlist_to_hlist callback. However, this would really mean replacing the full math typesetting algorithm, which of course could be a way to solve the problem but ... but what is needed is not that (as 99% of this algorithm is next to perfect) but to add support to not simply box sub-formulas at their natural width.
So long text ... here is the short question:
- Is this analysis correct, or did I overlook something?
- And in case anybody knows: are there plans to look into the sub-formula issue and provide support for it eventually? (it is not listed on the "to-dos" for math)
In case somebody wonders that I talk about "this sub-formula issue" as if it is something like a known thing ... it is, it was already raised way back in E-TeX: guidelines to future TeX extensions which at the time a some thorough (if not say heated) discussions.


\newcommand\formula{A \hbox{b c} d}... – Paul Gaborit Jun 26 '12 at 22:50a \textbf{b c} d, which does not make an hbox just to change the font. It seems to me that the issue is that TeX does not have a way of doing groups in math mode that aren't boxes. – Ryan Reich Jun 27 '12 at 06:17\mathbf{Span}(x + y)? (yes, i know it would be better to use\DeclareMathOperator, but we see this all the time.) you wouldn't want those letters to "fly apart". to me, this is the same as @RyanReich's\textbf{b c}. i'm afraid i think that the only "good" approach is for authors to learn to "do the right thing" (a goal of which i despair). – barbara beeton Jun 27 '12 at 12:40\begingroup \fam4 b+c\endgroupgroup which doesn't cause an internal box to be created so allows the operator spacing to stretch or shrink (but doesn't affect inter-letter spaces). – David Carlisle Jun 27 '12 at 12:50\mathbf{Span}as this is just a sequence of alphabet letters. The issue is with\mathbf{a+b}because this is a mix of a symbol which is not an alphabet char and letters and the + symbol is a binary and so has variable spacing to its left and right ... and those get frozen. – Frank Mittelbach Jun 27 '12 at 20:04{rather than\begingroupin\mathbfso you can go2^\mathbf{3}perhaps that's a high price to pay if that's all it is for? (Not that math font groups are your main issue). – David Carlisle Jun 28 '12 at 12:53