[Xy-pic] Rotating a frame

Ross Moore ross at ics.mq.edu.au
Wed May 20 23:11:55 CEST 2009


Hi Joe,

On 20/05/2009, at 4:33 PM, Joe Foley wrote:

> Hi there.
>
> I'm trying to make an updated squaredance diagram class and running  
> into
> a bit of a problem.  I need to make some boxes with dots and rotate  
> them
> at a 45 degree angle.  I know how to make the rotate package rotate
> text, but I can't figure out how to get it to rotate the frame around
> the text (nor the dot).  As an example:
>
> \newenvironment{sqFormation}{\[\begin{xy} 0;<5mm,0mm>: % set units to
> 5mm x 5mm
> } {\end{xy} \] }
>
> \newcommand{\rotdancer}[3]{\POS(#1)*[@!45]=<5mm>[F]\txt{#2}="dancer",
> \POS"dancer"!#3(1.1)*{\bullet},}
>
> \xyoption{dvips}
> \begin{document}
>
> \begin{sqFormation}
> \rotdancer{0,0}{U}{U}
> \end{sqFormation}
> \end{document}
>
> Only rotates the U by 45 and not the box.  I think this should be
> possible, but I'm missing something since the rotation modifier is
> supposed to modify whatever the current object is.


Use \xybox{...}  to enclose your composite object,
and apply the rotation to this;
viz.


\newcommand{\rotdancerbox}[3]{\POS(#1)*[@!45]\xybox{*=<5mm>[F]\txt{#2} 
="dancer",
\POS"dancer"!#3(1.1)*{\bullet}},}


\xyoption{dvips}
\begin{document}

\begin{sqFormation}
\rotdancer{0,0}{U}{U}
\end{sqFormation}

\begin{sqFormation}
\rotdancerbox{0,0}{U}{U}
\end{sqFormation}

\end{document}


gives as in the attached image:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 9888 bytes
Desc: not available
Url : http://tug.org/pipermail/xy-pic/attachments/20090521/d71791e6/attachment.jpeg 
-------------- next part --------------

>
> Thank you for your advice/help in advance.

Hope this helps.

BTW, great application for Xy-pic.


>
> Joe


Cheers,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------





More information about the xy-pic mailing list