<div dir="ltr"><br><br><div class="gmail_quote">On Sun, Apr 11, 2010 at 8:29 PM, Donald Arseneau <span dir="ltr"><<a href="mailto:asnd@triumf.ca">asnd@triumf.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Vafa Khalighi <<a href="mailto:vafakh84@gmail.com">vafakh84@gmail.com</a>> writes:<br>
<br>
> I can say \hbox to 10pt{This is a test.}<br>
><br>
> Now I want to define the macro \hboxR, so that when I say<br>
><br>
> \hboxR to 10pt{This is a test.}<br>
><br>
> it actually means<br>
><br>
> \hbox to 10pt{\beginR This is a test\endR}<br>
<br>
</div>To add to the other solutions... this one only defines one<br>
macro and works with both { } and \bgroup \egroup...<br>
<br>
\def\hboxR{\begingroup<br>
\everyhbox{%<br>
\aftergroup\endgroup<br>
\everyhbox{}%<br>
<div class="im"> \beginR<br>
\bgroup<br>
\aftergroup\endR<br>
\aftergroup\egroup<br>
</div> }\hbox}<br>
<font color="#888888"><br>
</font><br clear="all"></blockquote><div><br>Thanks Donald and others. This has been very helpful for me. I actually
like Donald's solution better. I have got one more questions and that
is it. I also need to implement another primitive like command \halignR
such that when I say<br>
<br>\halignR to 2pt{#1}<br><br>It actually will mean<br><br>\hbox\bgroup\beginR\vbox\<div>bgroup\halign to 2pt{#1}\egroup\endR\egroup<br><br>so
again \halignR accepts both {} and \bgroup \egroup. I have tried to
implement this with using your solutions but I only could do it when it
actually accepts {} and not \bgroup \egroup.<br>
<br>Thanks</div> </div></div><br>-- <br>Best wishes,<br>Vafa Khalighi<br>
</div>