I would like to make a definition in the form:
\def\nameMYdef#1{
if (length of text #1) <= (width of the text on the page (? \textwidth ?) )
then (center(#1))
else ( justification(#1))
}
Of course, this entry is only symbolic. I hope that it is understandable.
Best regards and I am looking forward to your reply.
\box0, and measures the width (\wd) of the box0, comparing it to the allotted\linewidth. If it is less, use\centerline, otherwise, just set the multiline text as is. – Steven B. Segletes Apr 01 '20 at 15:21