I am having trouble with the interaction between discretionary line breaks and centering.
I have defined macros for math mode that contain discretionary line breaks to help TeX lay out inline formulas without overrunning the paragraph margins. However, in a centering environment, lines always break, even if there is plenty of room to make a longer line. The following is a complete example showing an unnecessary line break in a very short line.
\documentclass{article}
\newcommand{\qlambda}[1]{\lambda#1.\linebreak[1]\:}
\begin{document}
\centering
$\qlambda{x} x$ % This would fit in one line but is broken into two
\end{document}
Most of my document is not centered. I noticed the problem when I tried using the following method to center table cells vertically and horizontally.
\begin{tabular}{|m{20em}|}
\centering\arraybackslash
$\qlambda{x} x$ % This would fit in one line but is broken into two
\end{tabular}
How can I make a discretionary line break that doesn't break when a paragraph fits on a single line?