%%
%% The LaTeX Companion, 3ed
%%
%% Example 3-1-4 on page I-126 in "nolbreaks --- Preventing line breaks in text fragments".
%%
%% Copyright (C) 2022 Frank Mittelbach
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%% See
https://www.latex-project.org/lppl.txt for details.
%%
\documentclass{tlc3exa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{129.0pt}
%StartShownPreambleCommands
\usepackage{nolbreaks} \sloppy
%StopShownPreambleCommands
\begin{document}
However, to keep several \nolbreaks*{words together,}
it is not a good idea to place them together
with the spaces between them into \nolbreaks{a box};
use \verb=\nolbreaks= instead.
\end{document}