PSTricks 97, Bug with origin and text?
Denis Girou
Denis.Girou at idris.fr
Tue Jan 6 13:03:17 CET 1998
-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------
>>>>> "Harald.Kirsch" == kir at iitb.fhg.de <Harald> writes:
Harald.Kirsch> For subobjects of a drawing I use the approach to shift the origin
Harald.Kirsch> with
Harald.Kirsch> \psset{origin={x,y}}
Harald.Kirsch> right before drawing the object. This way it is trivial to move the
Harald.Kirsch> object as a whole to another place later, if necessary.
Harald.Kirsch> However, today I discovered what seems to be a bug. Please try the
Harald.Kirsch> following simple file and find that the `A' is not placed within
Harald.Kirsch> the circle.
Harald.Kirsch> .......................................................
Harald.Kirsch> \psset{origin={-3,-3}}
Harald.Kirsch> \cput(0,0){A} %% The `A' will not be in the circle!!
It is not a bug but a feature... (known sing!). It's described page 29
in III.12 just before "origin" definition:
"The following manipulations of the coordinate system apply only to pure
graphics objects".
Pure graphics objects are those of chapter II, plus special constructions
built with the \pscustom macro. \cput is not at all a "pure" graphic object.
Harald.Kirsch> While we are at it. In a future release it would be great, if
Harald.Kirsch> moving the origin to (3,4) could be done with
Harald.Kirsch> \psset{origin={3,4}}
Harald.Kirsch> instead of with
Harald.Kirsch> \psset{origin={-3,-4}}
Harald.Kirsch> For me it is surprising anyway that the given coordinates for origin
Harald.Kirsch> always refer to the `original origin' and are not interpreted
Harald.Kirsch> relative to the last origin.
It's possible easily to redefine it this way, but I strongly discourage it,
as you will loose portability. And, in any case, for explained limitation and
better technics existing, I think "origin" is not very useful (I never use it
myself!)
Sebastian> But how about using the technique I
Sebastian> adopted for the cat picture in the Graphics Companion of
Sebastian> \def\cat{....}
Sebastian> \rput(3,4){\cat}
Sebastian> \rput(-1,-3){\cat}
Sebastian> where the \cat draws things relative to 0,0, and \rput then shifts the
Sebastian> whole object. It would seem more readable than your origin technique
It is from far a clearer and more powerful technic. Define your own objects
as (La)TeX macros and assemble them, using explicit \rput (or \multirput
or \rput managed by \multido loops, which allow powerful repeating control)
or the psmatrix environment, if your objects are to be positioned on a
(rather regular) grid.
D.G.
-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------
More information about the PSTricks
mailing list