[Tex/LaTex] the unit of the coordinate system in PSTricks


If I use the following code, there two different kinds of units. One for the coordinate system used to declare \begin{pspicture} with (0,0) to (20,10), and the centimeter used in 4.2cm.

\rput[lt](0.5,9){\psframebox[linewidth=1pt,framearc=0]{\parbox[c]{4.2cm}{\raggedright Text Goes Here...}}}

Can I use a unified dimension for both PSTricks objects and \parbox?

Best Answer

The pstricks manual says on page 6:

The values of the runit, xunit and yunit parameters are stored in the dimension registers \psunit (also \psrunit), \psxunit and \psyunit.

So you should be able to use:


to get the width of 4.2 in the pstricks coordinate system. However, if you using complex transformations this might not work correctly, I guess. You can set the units using \psset{xunit=1cm} etc.

Related Question