0

Occasionally I have a long equation in math mode that overflows into the margins. When this happens, I usually experiment with a line break at various reasonable parts of the equation. Sometimes, such as in the image below, it is unavoidable for me to end up with some ugly white space due to an early line break. For example, see the image below.

Img1

Sometimes, when reading papers, I notice they have an issue where the words in a particular line of text will be equally spaced such that they fill all the horizontal space up to the margins. This looks especially strange if a line only has 3 or 4 words.

Is it possible for me to force that behavior so that the line

We define a distinguishing vertex labelling for $G_1\star G_2$ with

is spaced such that each space is uniformly increased until the line doesn't leave the extra 9 or so characters worth of whitespace at the end?

Echan
  • 511
  • 2
    Maybe you are using \. Use \linebreak instead. But use carefully. In general, it is better to let LaTeX do the job. – Sigur Dec 04 '19 at 14:57
  • @Sigur Ah, I was using \newline. That solved my issue immediately. Thank you. Sometimes LaTeX doesn't know how to properly separate something like the max function in my above example without exceeding the margins and I have to do it manually. Are you suggesting that there is a better way? – Echan Dec 04 '19 at 15:00
  • 1
    Instead of forcing the line break you could try \sloppy or increase \emergencystretch. You might want to check out https://tex.stackexchange.com/questions/241343/what-is-the-meaning-of-fussy-sloppy-emergencystretch-tolerance-hbadness – StrongBad Dec 04 '19 at 15:56
  • It is hard to comment if you don't provide an example document, but I would guess that if you use \linebreak instead of \newline you will have exactly the problem you describe in the question with words unreadably far apart, just to maintain the margin? – David Carlisle Dec 04 '19 at 17:18
  • @DavidCarlisle I couldn't make a minimum working example because I didn't know how to produce spacing, but \linebreak does exactly what I want. I will admit I am a surprised because I expected \newline and \linebreak to have the exact same functionality and keep the text left aligned with "normal" spacing. – Echan Dec 05 '19 at 06:11
  • Every question is better with an example document. The document doesn't have to show what you want (the examples in the answers do that) it is to highlight the problem and to provide a test file to make it easier to test possible answers. You haven't provided a test file so I haven't tested it but I can not see how using \linebreak can not produce exactly the undesirable output you describe here "I notice they have an issue where the words in a particular line of text will be equally spaced such that they fill all the horizontal space up to the margins. This looks especially strange" – David Carlisle Dec 05 '19 at 07:42

0 Answers0