3

Few hours ago I have added my answer for this question How to make a math diagram on LaTex?

\documentclass[12pt]{standalone}
\usepackage[all,cmtip]{xy}
\usepackage[bb = boondox]{mathalfa}
\begin{document}
\xymatrix@R=.6pc@C=.6pc
   { & \mathbb{F} \ar[dl]_{\scriptscriptstyle\mu} \ar[dr]^{\scriptscriptstyle\nu}  & \\
     \mathbb{P} & & \mathbb{M}
   }
\end{document} 

but the labels are a little too far from the arrows. I have not found in the manual what I am looking for. Is there a way to bring the labels closer to the arrows?

enter image description here

  • \xymatrix@R=.6pc@C=.6pc { & \mathbb{F} \ar[dl]_{\scriptscriptstyle\mu\!\!} \ar[dr]^{\!\!\scriptscriptstyle\nu} & \\ \mathbb{P} & & \mathbb{M} } – user121799 Jul 31 '19 at 18:54
  • @marmot Kind marmot therefore there is not into the documentation to bring the labels closer to the arrows. – Sebastiano Jul 31 '19 at 18:56
1

Here is a possible solution. You have to set the values by hand.

enter image description here

The idea is to print the default arrow with no labels and then insert an invisible arrow translated by some amount in parallel, with the label on it.

Observe the \ar[dl] \ar@<3pt>@{}[dl]_{}.

\documentclass[12pt]{standalone}
\usepackage[all,cmtip]{xy}
\usepackage[bb = boondox]{mathalfa}
\begin{document}
$\xymatrix@R=.6pc@C=.6pc{
& \mathbb{F}    \ar[dl] \ar@<3pt>@{}[dl]_{\scriptscriptstyle\mu} 
                \ar[dr] \ar@<-3pt>@{}[dr]^{\scriptscriptstyle\nu}
& \\
\mathbb{P} & & \mathbb{M}
}$
\end{document} 
  • I saw this in the manual, but I didn't think it was related to a shorter distance of the labels. – Sebastiano Jul 31 '19 at 19:11
  • 1
    @Sebastiano, well, to be true, it moves everything: the arrow and label. It is very useful to draw 2 parallel arrows. – Sigur Jul 31 '19 at 19:30
  • With lot of sincerity he'd move the labels from one side to the other: pag. 6 of xyguide.pdf :-). I approved however your code! My best regards. – Sebastiano Jul 31 '19 at 19:34
  • @Sebastiano, sorry, I didn't follow your comment about pg 6. I see no problems there. – Sigur Jul 31 '19 at 19:43
3

Use \labelmargin, see 24i on page 40 of the reference manual.

\documentclass[12pt]{standalone}
\usepackage[all,cmtip]{xy}
\usepackage[bb = boondox]{mathalfa}

\begin{document}

\xymatrix@R=.6pc@C=.6pc{
 & \mathbb{F} \ar[dl]_{\scriptscriptstyle\mu}
              \ar[dr]^{\scriptscriptstyle\nu}  & \\
   \mathbb{P} & & \mathbb{M}
}

\labelmargin-{2pt}

\xymatrix@R=.6pc@C=.6pc{
 & \mathbb{F} \ar[dl]_{\scriptscriptstyle\mu}
              \ar[dr]^{\scriptscriptstyle\nu}  & \\
   \mathbb{P} & & \mathbb{M}
}

\end{document}

enter image description here

  • "Gentilissimo" egreg thank you very much for your answer. At this moment I can not upvoted you. I have finished all my votes :-(. Thank you very very very much. But for respect of Sigur the check mark remains to him. I hope that my English is correct. – Sebastiano Jul 31 '19 at 20:54
  • @Sebastiano That's your choice, between a proper solution and a hack. – egreg Jul 31 '19 at 20:57
  • @Sebastiano, don't worry and feel free to change your decision. – Sigur Jul 31 '19 at 21:18
  • @Sigur I never liked to disrespect other people. Fairness and humility come first. I am the first to make mistakes and when I make mistakes I do apologize. In my questions almost everyone has a green check. If they are not there it is because I have evaluated them at the same level. You were both very good. Always every best to you and the good users. – Sebastiano Aug 1 '19 at 10:17
  • @egreg Done! +1 for your very good answer. – Sebastiano Aug 1 '19 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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