# [texhax] minipage

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Fri Nov 21 16:02:39 CET 2003

> Yes, I already tried adjusting the left & right margins,
> but i am not getting the desired output (please view the
> attachment).
> ...
> The right margin of the last line alone should be more
> when compared with the other lines.

This does what you want:

\makeatletter%
\newenvironment{myblock}[1]
{\@tempdima2cm
\def\endbit{#1}
\hangindent8pt
\noindent
\ignorespaces}
{\nolinebreak\hspace*{\stretch2}
\parfillskip-\@tempdima
\makebox[\@tempdima][r]{\endbit}\par}
\makeatother%

Use it like this

\begin{myblock}{yy/yy/yy}
Here's some text in my block. Here's some text in my block.
Here's some text in my block. Here's some text in my block.
\end{myblock}

Cordialmente,  Philip G. Ratcliffe

P.S. If you want to get overfull hbox messages when yy/yy/yy is too long,
change
\makebox[\@tempdima][r]{\endbit} to
\hbox to\@tempdima{\hfill\endbit}

__________________________________________________________________
<< ella for Spam Control >> has removed Spam messages and set aside