paragraph 1
    equation 1
paragraph 2

paragraph 3
    equation 2
paragraph 4

paragraph 5

There's an inline equation in paragraph 4 which I keep on one line by preceding it with \linebreak. However, I have found out that sloppypar, along with surrounding the equation in brackets, is preferable as it selects better line breaks, i.e. \begin{sloppypar} paragraph 4 \end{sloppypar} and ${a=b}$. The problem is that this increases the vertical spacing between equation 2 and paragraph 4 (but not to paragraph 5). Similarly, enclosing paragraph 3 in sloppypar increases the spacing to equation 2 (but not to paragraph 2).

By starting paragraph 4 with \sloppy instead, the spacing to equation 2 is not increased, but the spacing between equation 1 and paragraphs 1 and 2 is increased; perhaps it makes the whole document sloppy?

How do I make the paragraph sloppy without such adverse effects?

Edit: here's code to reproduce the sloppypar issue.


    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Cras arcu arcu, volutpat sed rhoncus porttitor, tincidunt at eros. Praesent at leo non arcu rutrum maximus in ut nibh. Ut rutrum efficitur tincidunt. Etiam fermentum nunc vitae sapien mattis cursus. Proin venenatis nulla velit, at dictum risus commodo non. Pellentesque semper
        \frac{lorem}{ipsum} = dolor\frac{sit}{amet}
    Donec malesuada mollis mauris id fermentum. Vivamus arcu felis \linebreak $lorem = ipsum+dolor$.
    Vestibulum ornare euismod est a rutrum. In dictum elit dapibus velit consequat, vitae accumsan purus fermentum. Morbi aliquam, purus eget euismod interdum, arcu mi molestie turpis, ut sodales urna dolor pharetra dui.

Compare to \begin{sloppypar}Donec malesuada mollis mauris id fermentum. Vivamus arcu felis ${lorem = ipsum+dolor}$.\end{sloppypar}.

  • I recommended to use sloppypar as a last resort. Don't worry about such problems until your document is in final form as regards to the text. Anyway, debugging the issue needs code that reproduces it.
    – egreg
    Jun 7, 2021 at 20:55
  • as egreg says sloppypar is rather intrusive, Also it is very tricky ti put a display equation in a group without adversley affecting the spacing why "urrounding the equation in brackets"?? but you should provide an example it would be hard to guess your input or the effect that has on the output from your description. Jun 7, 2021 at 21:43
  • @egreg There's code now.
    – H.v.M.
    Jun 7, 2021 at 22:44
  • @DavidCarlisle The brackets ensure that the equation stays on one line instead of being broken up at the equals sign.
    – H.v.M.
    Jun 7, 2021 at 23:09
  • oh I thought you meant you put braces around \begin{equation}..\end{equation} but you mean you put the braces inside inline math, there are better ways of stopping line breaking, I'll link to an answer. You have added an example but it is very hard to give sensible improvements to the line breaking if the text and math just has fake latin Jun 7, 2021 at 23:17


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.