Closed phkonzen closed 1 day ago
@phkonzen as you have noticed latexml tends to trim leading/trailing whitespace in equations as non-meaningful.
The usual technique is to fine-tune the alignment markers to have them aligning at the exact position you want to maintain vertically, rather than adding horizontal space to an imprecise alignment.
So this rephrasing could be an improvement:
\begin{equation}
\begin{aligned}
x=& y + z \\
& x^2 + x - r + \exp(x)
\end{aligned}
\end{equation}
@dginev , thanks for your comment. The fine-tune of alignment markers is not always possible. But sure, many cases can be solved just doing it.
@phkonzen Does that resolve your issue here? As the spaces are stylistic and no actual content is getting discarded, we can simply call this a "latexml quirk" and resolve.
Alternatively, there is a possible discussion whether the math-specific space trimming should be moving the spaces out into text mode, instead of discarding them completely. But I would need to check what side-effects that may have with alignments...
Yeah sure! There are suitable workarounds and no info are lost with this "latexml quirk".
Spacing (\quad, \qquad, ~) at the beginning of the equations are been lost after latexml conversion to HTML.
The last \align starting with \text{} produce the expected output. Is there another way to get the output with the correct spacing?