# plain tex: justify text after raggedright

I have played around with plain tex for a while now and can't figure out how to get back to justified text after e.g. \raggedright. Can it really be that I have to use \raggedright in a group \begingroup\raggedright...\endgroup in order to restore justified text? There has to be a way to get back the original justifying.

edit: I could get something similar to justified texts by using

\spaceskip3pt plus 2pt minus 1pt


But this is not the original justifying.

• You can use \show\raggedright to have TeX stop and show what it is defined as. Jul 8 '18 at 7:25
• @ShreevatsaR Nice thanks, I wasn't aware of it and checked plain.tex for its definition before.
– nox
Jul 8 '18 at 7:33

Just revert the settings of \raggedright.

\def\justifying{%
\rightskip=0pt
\spaceskip=0pt
\xspaceskip=0pt
\relax
}

\raggedright

\input knuth

\justifying

\input knuth

\bye


• +1. Using \begingroup and \endgroup to surround the ragged-right material doesn't seem to be such a bad idea after all... :-)
– Mico
Jul 8 '18 at 7:00
• Indeed, but since I am learning, I am trying out things :P Why should I use plain tex nowadays? It's more trying to handle the basics, too.
– nox
Jul 8 '18 at 7:02
• – lhf
Jul 8 '18 at 11:57