1

I would like to improve the following Xy-pic drawing by putting the beginning of the arrow centered under the $x$ and its end centered under $f_u(x) u$:

\xymatrix@R=6pt{
    E \ar[r]^-{f_u} & \K \ar[r]^-{h_u} & E \\
    x \ar@{|->}[r] \ar@/_1.5pc/[rr]_-{\pi = h_u\circ f_u} & f_u(x) \ar@{|->}[r] & f_u(x)u
}

I read this answer: Xy-pic moving the position of an arrow but I can't understand how to apply it to my case in the \ar@/_1.5pc/[rr]_-{\pi = h_u\circ f_u} portion of code...

Any idea?

EDIT:

The MWE before tip:

\documentclass[francais,12pt]{article}

\usepackage[french]{babel}
\usepackage[ansinew]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}
%\usepackage{graphicx}
\usepackage{pb-diagram}
\usepackage[all]{xy}

\begin{document}

Try...

\[
\shorthandoff{;:!?}
\xymatrix@R=6pt{
    E \ar[r]^-{f_u} & \mathbb{K} \ar[r]^-{h_u} & E \\
    x \ar@{|->}[r] \ar@(_,_)[rr]_-{\pi = h_u\circ f_u} & f_u(x) \ar@{|->}[r] & f_u(x)u
}
\]

\end{document}
  • What's wrong with my "$" (latex)?? – biblio Feb 7 '18 at 19:27
  • Please post complete-but-minimal code rather than a snippet. – Thruston Feb 7 '18 at 20:48
  • We don't have TeX interpretation on this site -- too often we talk about the TeX source rather than the ouput. – Thruston Feb 7 '18 at 20:48
3

You can do this by changing the arrow bend modifier on the [rr] arrow.

(See p.42 in the reference manual ).

\documentclass[border=0.5]{standalone}
\usepackage[all]{xy}
\begin{document}
\xymatrix@R=6pt{
    E \ar[r]^-{f_u} & K \ar[r]^-{h_u} & E \\
    x \ar@{|->}[r] \ar@(_,_)[rr]_-{\pi = h_u\circ f_u} & f_u(x) \ar@{|->}[r] & f_u(x)u
}
\end{document} 

I'm not sure it looks any better though:

enter image description here

If you call \usepackage[all,cmtip]{xy}, the diagram becomes

enter image description here

  • Without the cmtip option, tips on bent arrows are awful; slightly less so on straight arrows. – egreg Feb 8 '18 at 8:28
  • OK, thanks, it's almost perfect, except that the bend is to large (I chose 1.5pc after several tries... ;)). How can I mix the bending control and this modifier, if possible? Otherwise, how can I change the bend with only the modifier? – biblio Feb 8 '18 at 14:19
  • @egreg: how can I call this option? Where do I have to put it (e.g. to which package is it related?) ? – biblio Feb 8 '18 at 14:20
  • @biblio \usepackage[all,cmtip]{xy} – egreg Feb 8 '18 at 14:20
  • OK, but I don't see any difference (what? it's not magical??), so I guess there are commands to add somewhere...? – biblio Feb 8 '18 at 14:22
1

An alternative with tikz-cd:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[row sep=6pt]
E \arrow[r,"f_u"] & K \arrow[r,"h_u"] & E \\
x \arrow[r,mapsto]
  \arrow[rr,swap,out=-45,in=-135,"\pi = h_u\circ f_u"] &
  f_u(x) \arrow[r,mapsto] & f_u(x)u
\end{tikzcd}

\end{document}

enter image description here

  • Thnks but it doesn't answer my question which is: how to put start and end of arrow centered under the scalar and its image? If I change the angles, the start and end move closer and it's quite the same my first try without the (,) modifier... Or maybe I was wrong somewhere? – biblio Feb 8 '18 at 15:08
  • By the way, I can't see the image, I have a "enter image description here", and when I click on the link, the server answers "unreachable"... Any explanation? – biblio Feb 8 '18 at 15:10
  • @biblio Apparently you can't momentarily reach Imgur, try again later. – egreg Feb 8 '18 at 15:16
  • OK, it seems it depends on the computer... – biblio Feb 9 '18 at 19:26

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.