# Rotating labels in xypic

How do I rotate the label on a arrow in xymatrix? Say, I want the label texts parallel with the arrow?

\documentclass[12pt, a4paper]{article}% a minimal example

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[all]{xy}
\xyoption{pdf}
\begin{document}
$\xymatrix{ x\ar[d]^{looooooong}\\ y }$
\end{document}

-

Perhaps xy has it's own rotation support, but I think not, but you can use standard LaTeX rotations:

\documentclass[12pt, a4paper]{article}% a minimal example

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,graphicx}
\usepackage[all]{xy}
\xyoption{pdf}
\begin{document}
$\xymatrix{ x\ar[d]^{\rotatebox{90}{\scriptstyle looooooong}}\\ y }$
\end{document}

-
i think you need a longer arrow ... –  barbara beeton Jun 18 at 17:55
Thanks a lot. How do I set globally that the labels parallel with the arrows? –  Ma Ming Jun 18 at 18:04