[texhax] Set dimension for picture environment

Jean-Baptiste Valsamis jvalsamiug at gmail.com
Thu Mar 18 00:01:12 CET 2010


Thnks for your answer. But when I use:

\psset{xunit=\textwidth, yunit=\textheight}
\noindent\begin{pspicture}(1, 1)
\put(0, 0){Hello}
\put(0.5, 0.5){Hello}
\put(1, 1){Hello}
\put(10, 10){Hello}
\end{pspicture}

It does not produce the result expected... (the pspicture is a square and
not a rectangle, and the position (10, 10) should be out of the page)
And no way to make some basic arithmetic ? Maybe with \def or something like
that... (I'm not an expert)
Regards
jb


On Wed, Mar 17, 2010 at 1:29 PM, <hh-brasil at bol.com.br> wrote:

> How about at the very beginning of the picture or for the whole document
>
> \psset{xunit=\textwidth, yunit=\textheigt}
> or
> \psset{xunit=\textwidth, yunit=1.4\textwidth, runit=\textwidth}
>
> Do you need \runit for radius etc? Then define it.
>
>
> Then you use only numbers as you would normally do!
> hh
>
>
> ---------------- original mail ------------
>
> Message: 1
> Date: Sun, 14 Mar 2010 15:23:45 +0100
> From: Jean-Baptiste Valsamis <jvalsamiug at gmail.com>
> To: texhax at tug.org
> Subject: [texhax] Set dimension for picture environment
> Message-ID:
> <bdbdc7e41003140723u7ebc47c9hf619c61f1c90962f at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear all,
> I would like to create a picture in normalized unit so that everything is
> expressed by values between 0 and 1.
> The box would take the entire page (ie \textwidth, \textheight). I set
> \setlength{\unitlength}{\textwidth}. Unfortunately, this gives a
> noramlisation with x-coordinate but not with y-coordinate. So I want to
> create a command \yscale that allows to do a scaling:
> \put(0.5, \yscale{0.5}) or \put(0.5, 0.5\yscale)
>
> What should I set into \yscale ?
>
> I don't know how to make latex considering that the results of \yscale{0.5}
> is a number.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20100318/dcd31940/attachment.html>


More information about the texhax mailing list