A preceding neighbouring punctuation mark like opening bracket may be kept in a previous line of text whereas a formula is transferred to a next one.
A succeeding neighbouring punctuation mark like comma may be transferred to a next line of text whereas a formula is kept in a previous one.
This happens when MathJax is employed for display, no matter in which language formula is written. For instance, both of following will be prone to the display error:
is the arc length along `c(s)`,
is the arc length along <math><mi>c</mi><mrow><mo>(</mo><mi>s</mi><mo>)</mo></mrow></math>,
This happens when MathJax is employed for display, no matter in which language formula is written. For instance, both of following will be prone to the display error:
See pictures: