9

Let's say I have a sentence like: "I will be at the beach from 4 to 7 this afternoon." and I want to add breakable spaces to prevent numbers from being isolated. So far, no problem, I could write something like: I will be at the beach from~4~to~7 this afternoon.

Now what if I'd like to say that I'd rather have a non-breakable space between 4 and to, but it's ok to remove it on emergency stretch if it doesn't fit then.

Is there a way to use "preferred" non-breakable spaces that will be honored only if there is no overfull lines?

1 Answer 1

6

It may not be exactly what you want, but try

\newcommand{\almostnonbreakablespace}{\leavevmode\penalty 9999 \space}

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .