[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}
   \advance\rightskip\@tempdima
   \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
Newsletters for me
You can use it too - and it's FREE!  http://www.ellaforspam.com << File:
driver.pdf >> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2188 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20031121/99cb269b/winmail.bin


More information about the texhax mailing list