[pstricks] PSTricks Digest, Vol 77, Issue 11

Troy Woo troy.woo at gmail.com
Mon Jun 15 13:23:22 CEST 2009


Thanks alot

On Sun, Jun 14, 2009 at 6:00 PM, <pstricks-request at tug.org> wrote:

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



-- 
Yuanqing Wu   Phd Candidate
Institute of Robotics Research
Shanghai Jiaotong University
Shanghai,P.R. China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20090615/eeb96b75/attachment.html>


More information about the PSTricks mailing list