TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to wrap around text in a table cell; therefore I use the p option in the definition of tabular. However, I'm writing in Hebrew, so it aligns the last line to the left, instead of to the right. Can it be solved?

share|improve this question
How about just issuing \raggedleft inside the cell? – Werner Feb 2 '12 at 20:29
Have a look at tex.stackexchange.com/questions/5017/… – lockstep Feb 2 '12 at 20:34
That works, thanks! However it doesn't change the spaces' lengths so the lines align up. I can live with that, but is it possible to easily do that? – Rob Feb 2 '12 at 20:34
lockstep: That only centers, doesn't it? Can't find a way to make it right to left. – Rob Feb 2 '12 at 20:37
You should not only accept, but also upvote Werner's answer. – lockstep Feb 2 '12 at 21:05
up vote 6 down vote accepted

If you want the entire cell contents to be justified, except the last line to be right justified (\raggedleft), you can use the following length settings (original source):

\leftskip=0pt plus .5fil
\rightskip=0pt plus -.5fil
\parfillskip=0pt plus .5fil

Here is a minimal working example (MWE) showing this in a tabular with p{5cm} column and some dummy text (provided by the lipsum package):

Right-to-left alignment in tabular

\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\newcommand{\RTLpar}{% right-to-left paragraph alignment
  \leftskip=0pt plus .5fil%
  \rightskip=0pt plus -.5fil%
  \parfillskip=0pt plus .5fil%

The MWE provides \RTLpar (short for "right-to-left paragraph") which modified these settings.

share|improve this answer
That's perfect for me, thanks! :-) – Rob Feb 2 '12 at 21:03
Anyone know the reason for the down vote on this? Seems to work fine for me. – Peter Grill Feb 3 '12 at 20:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.