Thanks alot<br><br><div class="gmail_quote">On Sun, Jun 14, 2009 at 6:00 PM,  <span dir="ltr">&lt;<a href="mailto:pstricks-request@tug.org">pstricks-request@tug.org</a>&gt;</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;">
Send PSTricks mailing list submissions to<br>
        <a href="mailto:pstricks@tug.org">pstricks@tug.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://tug.org/mailman/listinfo/pstricks" target="_blank">http://tug.org/mailman/listinfo/pstricks</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:pstricks-request@tug.org">pstricks-request@tug.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:pstricks-owner@tug.org">pstricks-owner@tug.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of PSTricks digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Vertical alignment of an inline pspicture? (Troy Woo)<br>
   2. Re: Vertical alignment of an inline pspicture?<br>
      (Jean-C?me Charpentier)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 13 Jun 2009 19:03:14 +0800<br>
From: Troy Woo &lt;<a href="mailto:troy.woo@gmail.com">troy.woo@gmail.com</a>&gt;<br>
To: <a href="mailto:pstricks@tug.org">pstricks@tug.org</a><br>
Subject: [pstricks] Vertical alignment of an inline pspicture?<br>
Message-ID:<br>
        &lt;<a href="mailto:57dce3420906130403o4aac2dfdp61886ac866d27d81@mail.gmail.com">57dce3420906130403o4aac2dfdp61886ac866d27d81@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Just as tabular and array can be vertically aligned by \begin[pos]{tabular}<br>
and \begin[pos]{array}{...}, is there a way to vertically align a pspicture<br>
(inlined)?<br>
<br>
Such as \begin[pos]{pspicture}? (which I tried and failed.)<br>
<br>
Best Regards?<br>
--<br>
Yuanqing Wu   Phd Candidate<br>
Institute of Robotics Research<br>
Shanghai Jiaotong University<br>
Shanghai,P.R. China<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://tug.org/pipermail/pstricks/attachments/20090613/93b220be/attachment-0001.html" target="_blank">http://tug.org/pipermail/pstricks/attachments/20090613/93b220be/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 14 Jun 2009 10:51:38 +0200<br>
From: Jean-C?me Charpentier     &lt;<a href="mailto:jean-come.charpentier@wanadoo.fr">jean-come.charpentier@wanadoo.fr</a>&gt;<br>
To: Graphics with PSTricks &lt;<a href="mailto:pstricks@tug.org">pstricks@tug.org</a>&gt;<br>
Subject: Re: [pstricks] Vertical alignment of an inline pspicture?<br>
Message-ID: &lt;<a href="mailto:4A34BA1A.4090000@wanadoo.fr">4A34BA1A.4090000@wanadoo.fr</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Troy Woo a ?crit :<br>
&gt; Just as tabular and array can be vertically aligned by<br>
&gt; \begin[pos]{tabular} and \begin[pos]{array}{...}, is there a way to<br>
&gt; vertically align a pspicture (inlined)?<br>
&gt;<br>
&gt; Such as \begin[pos]{pspicture}? (which I tried and failed.)<br>
<br>
  It seems to me that an old version of pspicture have this feature.<br>
Actually, it was \begin{pspicture}[-0.5](...) which shifts the picture<br>
by half of its height. I&#39;m not sure and Herbert will correct me if I<br>
write some garbage :-)<br>
  Nowadays, pspicture environment accept optional argument and the key<br>
&#39;shift&#39;. Yhis key indicates the vertical shift of the whole picture.<br>
Example below will be clearer than a long talking:<br>
<br>
\documentclass{article}<br>
\usepackage{pstricks}<br>
<br>
\makeatletter<br>
\def\cpspicture(#1,#2){%<br>
  \@ifnextchar({\pst@cpicture(#1,#2)}%<br>
               {\pst@cpicture(0,0)(#1,#2)}%<br>
}<br>
\def\pst@cpicture(#1,#2)(#3,#4){%<br>
  \pssetylength\pst@dima{#2}%<br>
  \pssetylength\pst@dimb{#4}%<br>
  \advance\pst@dimb -\pst@dima<br>
  \pst@dimb -.5\pst@dimb<br>
  \edef\pictureshift{shift=\the\pst@dimb}%<br>
  \expandafter\pspicture\expandafter[\pictureshift](#1,#2)(#3,#4)<br>
}<br>
\let\endcpspicture\endpspicture<br>
\makeatother<br>
<br>
\begin{document}<br>
% Without shift parameter<br>
Hello<br>
\begin{pspicture}(-1,-1)(3,3)<br>
  \psframe(-1,-1)(3,3)<br>
\end{pspicture}<br>
world!<br>
<br>
% In order to center, shift = -(ymax-ymin)/2<br>
% Here: -(3-(-1))/2 = -2<br>
Hello<br>
\begin{pspicture}[shift=-2](-1,-1)(3,3)<br>
  \psframe(-1,-1)(3,3)<br>
\end{pspicture}<br>
world!<br>
<br>
% Automatic way<br>
Hello<br>
\begin{cpspicture}(-1,-1)(3,3)<br>
  \psframe(-1,-1)(3,3)<br>
\end{cpspicture}<br>
world!<br>
\end{document}<br>
<br>
  Jean-C?me Charpentier<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
PSTricks mailing list<br>
<a href="mailto:PSTricks@tug.org">PSTricks@tug.org</a><br>
<a href="http://tug.org/mailman/listinfo/pstricks" target="_blank">http://tug.org/mailman/listinfo/pstricks</a><br>
<br>
<br>
End of PSTricks Digest, Vol 77, Issue 11<br>
****************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Yuanqing Wu   Phd Candidate<br>Institute of Robotics Research<br>Shanghai Jiaotong University<br>Shanghai,P.R. China<br>