# Something like \hfill with pstricks and XeTeX

I have a line of text in a pspicture environment and I need to distribute the words in a way like \hfill could do. Here is an image of what I want:

I currently have this minimal example

\documentclass[pstricks,border=2cm]{standalone}
\begin{document}
\begin{pspicture}(12,3)

\psline(1,1)(11,1)
\rput[Bl]{0}(1,1){Word LongWord Words MuchLongerWord}

% command which draws the grid and labels it
\psgrid[subgriddiv=0, griddots=10, gridlabels=12pt]
\end{pspicture}

\end{document}


Which compiles to this (using another font):

How should I enhance it to get the desired result?

Condition: I need it to compile with xelatex (which, as far as I have read, doesn't like the idea of putting text on a path) so I can't experiment with pst-text much.

I don't necessarily need to place the text on any path. I essentially only need to equally distribute the words in a certain amount of horizontal space. Any ideas how to get there?

-

You can use a \makebox with Option s (stretch).

\documentclass[pstricks,border=2cm]{standalone}
\begin{document}
\begin{pspicture}(12,3)

\psline(1,1)(11,1)
\rput[Bl]{0}(1,1){\makebox[10cm][s]{Word LongWord Words MuchLongerWord}}

% command which draws the grid and labels it
\psgrid[subgriddiv=0, griddots=10, gridlabels=12pt]
\end{pspicture}

\end{document}


Result:

-
Thanks a lot. Works perfectly. –  Zababa Aug 4 '14 at 16:23