[Xy-pic] rotate labels (follow-up)

Ross Moore ross at ics.mq.edu.au
Thu May 17 17:56:29 CEST 2007


Hello Wolfhart,

On 15/05/2007, at 3:19 AM, Wolfhart Totschnig wrote:

> Hi,
>
> Let me follow up on the question I asked at the end of April. I can  
> now
> further specify the problem I have. I hope someone will then be  
> able to
> help me out.
>
> I would like to rotate the labels in a diagram. I have the following:
>
> \ar[ur]_{causation} \ar@{-}[u]_{predication} & ...
>
> I would like to have both labels aligned with the arrows, that is, the
> one diagonally and the other vertically. With the Rotate and Scale
> extension, this should work by using the [@] modifier, if I understand
> correctly. So, with \xyoption{rotate} in the preamble, I tried:
>
> \ar[ur]_[@]{causation} \ar@{-}[u]_[@]{predication} & ...
>
> Yet this does not work. The labels are moved slightly (the first  
> one up,
> the second to the right), but they are not rotated.

That works fine, provided ...

> The Reference Manual says that, in order for the Rotate and Scale
> extension to work, there needs to be a suitable "back-end". But in my
> case, the back-end does not seem to be the problem.

  ... you load Xy-pic using:

     \usepackage[dvips,ps,all,rotate]{xy}

and typeset in a TeX + dvips + Ghostscript mode.
You will not see the labels rotated until you view a .ps
or .pdf file generated by this process.


You need to be careful with positioning.
e.g. check the following example, and try to understand the
role of each of the object modifiers:

\[
\xymatrix @C=5pc @R=4pc{
A & B \\
C\ar[ur]_*[@]=0+!U\txt\tiny{causation}
  \ar@{-}[u]^*[@]\txt\tiny{predication}& D
}\]


You need to appreciate that when a box is rotated,
the new size becomes the rectangle (with horiz.
and vertical sides) that encompasses the rotated
contents. Hence it can be *much* larger than the
original rectangle fitting snugly around the text.


> I found a
> work-around to rotate the labels, namely via the graphicx package and
> the \rotatebox command. This works, so my back-end can display rotated
> text. But with this work-around, I am only able to approximate what I
> have in mind, it doesn't give me exactly what I want (besides, it's
> rather clumsy), so I still would like to make the Rotate and Scale
> extension work. Is there anything else I need to load, besides the
> graphicx package, in order to make the extension work?

See the loading line above, with options:   [dvips,ps,...
You need both the PostScript back-end, and a driver
that implements the features that you want to use.
Then you need to process for PostScript.

If your job requires some PDF effects that cannot be done using
PostScript, then you can make use of the  ps4pdf  package,
or another that supersedes it -- sorry I forget it's name.
  pdftricks  is also a good package for this kind of hybrid
processing.

>
> Thanks in advance for your help,
> Wolfhart


Hope this helps,

	Ross

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




More information about the xy-pic mailing list