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.

1 Answer 1


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.

  • I in fact thought of redefining \raggedright, but there was only one problem---which I have had since I started using \TeX in the 1980s---where does one find these definitions?? You seem to be/have been studying mathematics so in exchange for your answer I can offer you my "pick a number" trick to impressive people even more than you do already: web.ncf.ca/en493 ==> pick a number Aug 21, 2018 at 17:20
  • @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. Aug 21, 2018 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. Aug 21, 2018 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .