%%
%% The LaTeX Companion, 3ed
%%
%% Example 5-4-13 on page I-406 in "truncate --- Truncate text to a given length".
%%
%% 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{153.0pt}

  \setlength\parindent{0pt}

%StartShownPreambleCommands
\usepackage{truncate}
%StopShownPreambleCommands

\begin{document}
|This text is not~truncated| (to compare)     \par
|\truncate{50pt}{This text is not~truncated}| \par
|\truncate[{\,[..]}]{95pt}{This text is not~truncated}|
\end{document}