# ragged left in Plain TeX

I typeset Hebrew using Plain XeTex and BIDI. Past a certain font size full justification does not work (no hyphenation).

Thus I would to have right justification and a ragged left in Plain TeX. There is \raggedright, but no \raggedleft.

One of the answers was for doubly ragged and centred, but this is not what I want.

You can define your own \raggedleft by taking the definition of \raggedright and replacing \rightskip with \leftskip:
 \def\raggedleft{\leftskip=0pt plus2em \spaceskip .3333em \xspaceskip .5em\relax}

Afterwards, \leftskip has a stretch component (plus 2em), so the text is ragged un the left. Setting \spaceskip and \xspaceskip is used to make sure that the interword space is not stretchable, such that inter word spaces on different lines have the same width.
• @morrisroger The best source for all plain TeX definitions is the TeXbook. For example on page 101 you find an explenation why the definition makes sense and Appendix B contains the annotated code of the format. If you do not have a copy of the TeXbook, you can find all the plainTeX definitions in the source of the plain TeX format, the file plain.tex. Another way is to run tex on the command line and entering \show\raggedright, then TeX answers with the current definition of \raggedright. – Marcel Krüger Aug 21 '18 at 17:44
• But on modern TeX installations, texdef is the most simple way to find definition: Run texdef raggedright to get the definition of raggedright. You can also run texdef --tex xetex raggedright to show the definition from plain XeTeX (the same as the plain TeX one) or texdef --tex xelatex raggedright to see the LaTeX version. It might be interesting to read the help (texdef -h), there you find a lot of other features which make texdef incredibly powerful, especially when looking for LaTeX definitions. – Marcel Krüger Aug 21 '18 at 17:48