Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

enter image description here

\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}
share|improve this answer
    
i think you need a longer arrow ... –  barbara beeton Jun 18 '13 at 17:55
    
Thanks a lot. How do I set globally that the labels parallel with the arrows? –  Ma Ming Jun 18 '13 at 18:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.