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.

I would like to know the following:

Using xy-pic, how can I avoid that in the diagram below the one arrow's tail cuts the letter I? Is there a command in xy-pic to shorten arrows?

Thanks for the help.

\documentclass[a4paper]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage{dsfont}
\usepackage{rotating}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{eufrak}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{textcomp}
\usepackage{array}
\usepackage{graphicx}
\usepackage[pdftex]{color}
\usepackage{paralist}
\usepackage{ulem}
\usepackage{hyperref}
\usepackage[arrow, matrix, curve]{xy}
\usepackage{multirow}

\begin{document}

$\xymatrix@1{I\ar[r] \ar@{>->}[d]_f & K\otimes_R M \ar@{-->}[dl]\\ M^F & }$ 

\end{document}

screenshot

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I added a custom \mystrut before the I, in this case a \strut scaled by 1.3. However, the custom strut could consist of a simple \rule[depth]{0pt}{height} of the desired dimensions.

\documentclass[a4paper]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage{dsfont}
\usepackage{rotating}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{eufrak}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{textcomp}
\usepackage{array}
\usepackage{graphicx}
\usepackage[pdftex]{color}
\usepackage{paralist}
\usepackage{ulem}
\usepackage{hyperref}
\usepackage[arrow, matrix, curve]{xy}
\usepackage{multirow}
\def\mystrut{\scalebox{1.3}{\strut}}
\begin{document}

$\xymatrix@1{\mystrut I\ar[r] \ar@{>->}[d]_f & K\otimes_R M \ar@{-->}[dl]\\ M^F & }$ 

\end{document}

enter image description here

share|improve this answer

Arrows with a tail are a big problem with Xy-pic, because the tail isn't taken into account for the arrow width.

A source for the overlapping is the suffix @1 that squeezes the diagram. Exercise 14 in the manual gives a workaround:

\documentclass[a4paper]{scrartcl}
\usepackage[arrow, matrix, curve,cmtip]{xy}

\newdir{ >}{{}*!/-8pt/@{>}} % exercise 14

\begin{document}

$\xymatrix@1{
  I\ar[r] \ar@{ >->}[d]_f & K\otimes_R M \ar@{-->}[dl]\\
  M^F
}$

\bigskip

$\xymatrix{
  I\ar[r] \ar@{ >->}[d]_f & K\otimes_R M \ar@{-->}[dl]\\
  M^F
}$

\end{document}

Note the difference when @1 is omitted. I used cmtip, because I can't stand the default style.

enter image description here

Here's the same with tikz-cd:

\documentclass[a4paper]{scrartcl}

\usepackage{tikz-cd}

\begin{document}

$\begin{tikzcd}
  I\arrow{r}{} \arrow[swap,rightarrowtail]{d}{f} & K\otimes_R M \arrow[dash pattern=on 4pt off 3pt]{dl} \\
  M^F
\end{tikzcd}$

\end{document}

enter image description here

share|improve this answer

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.