1

I want to draw this diagram using XY-pic.enter image description here But I have trouble with the position of the arrows. enter image description here

Any help would be appreciated. The codes are as follows:

\documentclass{article}
\usepackage{amsmath}
\usepackage[all]{xy}
\usepackage{bm}

\begin{document}

$$\begin{gathered} \xymatrix{ \beta(X)\subset Q^{F(X)}\ar[rr]^{\bm{f}^{**}} & & Q^{F(Y)}\supset\beta(Y)\ X\ar[u]^{\bm{e}} \ar[rr]^{f} & & Y\ar[u]^{\bm{g}} \ } \end{gathered}$$

\end{document}

Miyase
  • 2,544
  • 2
  • 12
  • 26
mio
  • 113
  • 1
    Welcome to SE. You don't explain what trouble you think you have, and you don't show any LaTeX code that people could test or correct. Please provide a Minimal Working Example. – Miyase Jun 20 '22 at 11:11
  • I have trouble when adding pictures. – mio Jun 20 '22 at 11:13
  • I don't understand your answer: I was asking about code, not picture. And you seem to have included a picture just fine in your question. – Miyase Jun 20 '22 at 11:18
  • Show the code used to generate the second image. – daleif Jun 20 '22 at 11:22
  • Your code compiles correctly and gives a result that is very close to the original image. Could you be clearer about what you don't like with "the positions of the arrows"? Also, would you accept a solution that doesn't use xy? – Miyase Jun 20 '22 at 11:39

1 Answers1

1

In the particular case you can make the objects in the first row larger by using phantoms.

\documentclass{article}
\usepackage{amsmath}
\usepackage[all,cmtip]{xy}
\usepackage{bm}

\begin{document}

[ \xymatrix@C+2em{ \hphantom{Q^{F(X)}\subset{}}\beta(X)\subset Q^{F(X)} \ar[r]^{\bm{f}^{**}} & Q^{F(Y)}\supset\beta(Y)\hphantom{{}\subset Q^{F(Y)}}\ X\ar[u]^{\bm{e}} \ar[r]^{f} & Y\ar[u]^{\bm{g}} \ } ]

\end{document}

  1. Never use $$ in LaTeX
  2. Avoid superfluous columns, it's better to increase the column separation
  3. Use cmtip or the arrow tips are awful
  4. Is there a reason why just one label is not \bm?

enter image description here

The same with tikz-cd and the nice code from https://tex.stackexchange.com/a/216042/4427

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

\tikzset{ symbol/.style={ draw=none, every to/.append style={ edge node={node [sloped, allow upside down, auto=false]{$#1$}}} } }

\begin{document}

[ \begin{tikzcd}[column sep=4em] \beta(X) \arrow[r,symbol=\subset] &[-3.5em] Q^{F(X)} \arrow[r,"\bm{f}^{**}"] & Q^{F(Y)} \arrow[r,symbol=\supset] &[-3.5em] \beta(Y) \ X \arrow[u,"\bm{e}"] \arrow[rrr,"f"] &&& Y\arrow[u,"\bm{g}"] \end{tikzcd} ]

\end{document}

enter image description here

egreg
  • 1,121,712