[Tex/LaTex] Problem with automatic line break in math mode

line-breakingmath-mode

I've got a special problem with writing in math mode. In general there is absolutely no problem with, e.g., writing something like

$x+x+x++x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x$

will produce the required line break, whereas something like

The subset $\Xi\subseteq C^{1,\alpha\times C^{0,\alpha}$ is closed with
respect to the $C^{1,\beta}\times C^{0,\beta}$-Topology

will write the part C^{0,\beta}$-Topology of the text over the end of the line. Here it's important, that this part stands close to the end of a line.
In addition, I have to mention, that an \mbox{} command will occur writing further along the end of the line.

So is there someone who knows that problem, respectively how to solve it?
It's important because a manual line break yields a white space at the end of the line and this is strongly undesired.

Best Answer

The question is not clear but I assume that you get the 4th case, with the linebreak after \times

enter image description here

You can use \nobreak with the mathematics to stop the break there, if the break before -topology is not wanted you can force a linebreak with \linbreak (rather than \\) this does not leave the line short but instead over-stretches the line but is I think the output that you want here.

\documentclass{article}

\begin{document}

\noindent X\dotfill X

The subset $\Xi\subseteq C^{1,\alpha}\times C^{0,\alpha}$ is closed with
respect to the $C^{1,\beta}\times C^{0,\beta}$-Topology


xxThe subset $\Xi\subseteq C^{1,\alpha}\times C^{0,\alpha}$ is closed with
respect to the $C^{1,\beta}\times C^{0,\beta}$-Topology

xxxxxThe subset $\Xi\subseteq C^{1,\alpha}\times C^{0,\alpha}$ is closed with
respect to the $C^{1,\beta}\times C^{0,\beta}$-Topology

xxxxxxxxThe subset $\Xi\subseteq C^{1,\alpha}\times C^{0,\alpha}$ is closed with
respect to the $C^{1,\beta}\times C^{0,\beta}$-Topology


xxxxxxxxThe subset $\Xi\subseteq C^{1,\alpha}\times C^{0,\alpha}$ is closed with
respect to the $C^{1,\beta}\times\nobreak C^{0,\beta}$-Topology


xxxxxxxxThe subset $\Xi\subseteq C^{1,\alpha}\times C^{0,\alpha}$ is closed with
respect to the\linebreak $C^{1,\beta}\times  C^{0,\beta}$-Topology
\end{document}
Related Question