%% $Id: xyps-r.doc,v 3.7 1999/02/16 15:12:50 krisrose Exp $ %% %% Xy-pic ``PostScript Rotations and Scaling''. %% Copyright (c) 1993-1996 Ross Moore %% %% This file is part of the Xy-pic package for graphs and diagrams in TeX. %% See the companion README and INSTALL files for further information. %% Copyright (c) 1991-1996 Kristoffer H. Rose %% %% The Xy-pic package is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by the %% Free Software Foundation; either version 2 of the License, or (at your %% option) any later version. %% %% The Xy-pic package is distributed in the hope that it will be useful, but %% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY %% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License %% for more details. %% %% You should have received a copy of the GNU General Public License along %% with this package; if not, write to the Free Software Foundation, Inc., %% 675 Mass Ave, Cambridge, MA 02139, USA. %% %% As a special exception, you may use this file and all files derived %% from it without restrictions. This special exception was added with %% version 3.7 of Xy-pic. %% \expandafter\ifx\csname xyps-rloaded\endcsname\empty \message{not reloaded}\endinput \fi \expandafter\let\csname xyps-rloaded\endcsname=\empty \xycatcodes \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Header:}\leavevmode \DOCHEADER \DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Rotations and scaling} The included file |xyps-r.tex| (version \stripRCS$Revision: 3.7 $) provides \PS\ support for the effects defined in the |rotate| extension described in~\S??g[:rotate]. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The \PS\ style methods are required, so ensure that they are loaded. \DOCMODE( \expandafter\ifx\csname xyps-sloaded\endcsname\empty\else \xyinputorelse@{xyps-s}{\xyerror@{Could not load xyps-s}{}}% \xycatcodes\fi \DOCMODE) \DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This file is loaded and its effects are activated automatically whenever |\xyoption{rotate}| is requested and the current supports \PS\ rotations. Should there be any need to turn off this support, the following commands are available; they obey usual \TeX\ groupings. % \begin{defs} |\NoPSrotate| & remove \PS\ support\kern-50pt\cr |\UsePSrotate| & reinstate \PS. \end{defs} % Without \PS\ support diagrams can be expected to be displayed unrotated and unscaled. These commands are provided primarily for testing and trouble-shooting; \eg~with configurations untested by the authors of \Xy-pic, who should be notified of persistent difficulties. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Installation} Call the following macro to allow the \PS\ mechanisms to be used. \DOCMODE( \xydef@\installPSrotscale@{\installPSstyle@ \let\xyRotate@@=\xyPSrotate@@ % \let\xySpecialRotate@@=\xyPSspecialRotate@ \let\doSpecialRotate@@=\doPSspecialRotate@@ % \let\xyRotnamed@=\xyPSpsxy@ % \let\xyRot@named@=\xyPSrot@named@@ \let\xyscale@@=\xyPSscale@@ \xyPSshapes@true \xyuncatcodes } \xydef@\UsePSrotate{\installPSrotscale@} \xydef@\NoPSrotate{\UnloadRotate@\relax} \DOCMODE) \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% All effects defined in the |rotate| extension can be implemented using a \PS\ . However different s need not handle things in the same way; different \PS\ code may be required to match the specific environment used by the . This file provides generic \PS\ code which is known to work correctly with most drivers. It is written so as to indicate where modifications may be made to accomodate specific s. For such driver-specific variations, consult the appropriate -file, called |xy||.doc|. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Transform lists} \DOCMODE( \xydef@\xyPSpretransform@{\xyPSrawA@{\preXYtransform@@}} \xydef@\xyPSposttransform@{\xyPSrawZ@{\postXYtransform@@}} \let\preXYtransform@=\xyPSpretransform@ \let\postXYtransform@=\xyPSposttransform@ \xydef@\xyPSrotSplit@{% \expandafter\def\expandafter\preShape@@\expandafter{\xyPSpre@}% \expandafter\def\expandafter\postShape@@\expandafter{\xyPSpost@}} \DOCMODE) \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Rescaling} \DOCMODE( \xydef@\xyPSscale@@#1#2{% \xyPSsplitPS@{\xyscale@start(#1,#2)}{\xyscale@end}% \xyPSrotSplit@\xyPSpsxy@ } \DOCMODE) \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Rotations} \DOCMODE( \xydef@\xyPSrotate@@#1{% \xyPSsplitPS@{\xyrot@start(#1 xyd)}{\xyrot@end}% \xyPSrotSplit@\xyPSpsxy@ } \xydef@\xyPSspecialRotate@#1{% \xyPSsplitPS@{\xyrot@start(#1)}{\xyrot@end}\xyPSrotSplit@\xyPSpsxy@ } \xydef@\doPSspecialRotate@@#1@@{\xyPSspecialRotate@{#1}} \DOCMODE) The \PS\ operator |xyr| is defined in |xyps-ps.doc|, to store the given parameter as a rotation angle. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Shearing} This feature is not implemented yet. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{PostScript commands} The \PS\ codes to start the rotation or scaling are given as functions, |xyrot@start| and |xyscale@start| with arguments to include a specification of the rotation-angle or scaling factors. \DOCMODE( \xydef@\xyRotScale@@{% \def\xyrot@start(##1){{xyt ##1\space xyr}}% \def\xyscale@start(##1,##2){{xyt ##1\space##2\space xys}}% \def\xyrot@end{}\def\xyscale@end{}} \DOCMODE) These strings are placed using |\xyPSsplitPS@| so as to correctly occur before and after the code for the actual being typeset. This is always followed by |\xyPSpsxy@|, which results in \PS\ code to identify the current position, storing it with keys |xyXpos| and |xyYpos| so as to be accessible to the code for the rotation or scaling. A specific must either call |\xyRotScale@@| to use this default mechanism, or define its own macro to be called at installation time, which sets alternative expansions to |\xyrot@start(#1)|, |\xyscale@start(#1,#2)|, |\xyrot@end| and |\xyscale@end|. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{The end \& Log}\leavevmode \DOCMODE( \endinput % $Log: xyps-r.doc,v $ % Revision 3.7 1999/02/16 15:12:50 krisrose % Interim release (Y&Y fonts now free). % % Revision 3.3 1996/12/18 10:05:50 ross % minor improvements to file-loading commands % % Revision 3.1 1995/09/05 20:36:33 ross % Release! % % Revision 3.0 1995/07/07 20:13:19 ross % Major release w/new User's Guide! % % Revision 2.13 1995/07/04 15:04:51 ross % Ready for release of v3. % % Revision 2.9 1994/06/09 14:38:56 ross % Release 3beta. % Includes support for special effects: Rotations, Scaling, Line-width, Colour. % Back-ends are separated into separate files. % More back-ends are supported, experimentally --- needs testing. % % Revision 2.9 1994/06/09 14:38:56 ross % Release 3beta. % Includes support for special effects: Rotations, Scaling, Line-width, Colour. % Back-ends are separated into separate files. % More back-ends are supported, experimentally --- needs testing. % % NEW for version 2.9 by by Ross Moore. \DOCMODE) \DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Tell Emacs that this is a LaTeX document and how it is formatted: % Local Variables: % mode:latex % fill-column:77 % fill-prefix:"" % End: