0

It is not a good idea to break mathematical insertions in text.

It happens in this example:

\documentclass{report}
\begin{document}
dfasfsd asdfsdafds asdfsdfds gdsds sfsdd ssfsd  wwer sfdsf ggfh dh dgfdd $r=0.1$ sdfsd sdfdsf asgg sdfsdf a a sfsdf.
\end{document}

ext

How to do our best to preserve mathematical insertions on one line? Is there anything more handy than manually wrapping the troubled place in mbox?

Viesturs
  • 7,895

1 Answers1

1
\documentclass{report}
\begin{document}
dfasfsd asdfsdafds asdfsdfds gdsds sfsdd ssfsd wwer sfdsf ggfh dh
dgfdd $r=0.1$ sdfsd sdfdsf asgg sdfsdf a a sfsdf.

\bigskip

\begin{sloppypar}
\relpenalty=10000
dfasfsd asdfsdafds asdfsdfds gdsds sfsdd ssfsd wwer sfdsf ggfh dh
dgfdd $r=0.1$ sdfsd sdfdsf asgg sdfsdf a a sfsdf.
\end{sloppypar}


\end{document}

TeX only breaks after relations or binary operators, with penalty \relpenalty and binoppenalty, but as seen here in order not to break the math you need to excessively stretch the white space, and in this case no penalty less than the 10000 maximum value prevents a break.

David Carlisle
  • 757,742