I'm using \usepackage[all,cmtip]{xy}
and I'd like to create a circle for $\overline{D_1^n}$
, I'd like to color in red the $f\circ\pi$
-arrow, I'd like also to shade the $S^n/\mathbb{Z}^2$
. I inserted the dsfrac-funcion, where dsfrac stands for
\newcommand{\dsfrac}[2]{\displaystyle{\Huge{\sfrac{#1}{#2}}}}
The code is:
\documentclass{book}
\usepackage[all,cmtip]{xy}
\usepackage{stix}
\usepackage{mathtools}
\usepackage{xfrac}
\usepackage[bb=ams]{mathalpha}
\begin{document}
\Large
\newcommand{\dsfrac}[2]{\displaystyle{\Huge{\sfrac{#1}{#2}}}}
\newcommand{\tonde}[1]{\bigl(#1\bigr)}
\newcommand{\Z}{\mathbb Z}
\renewcommand{\P}{\mathbb P}
\newcommand{\R}{\mathbb R}
\begin{equation}
\xymatrix{{\overline{D_1^n}}\ar@{^{(}->}[rr]^{i}\ar@{>>}[d]_{\pi_1}\ar@{^{(}->>}[drr]_{f\circ\pi_1}^{\pi_2\circ i}&&S^n\ar@{>>}[d]^{\pi_ 2}\\\dsfrac{\overline{D_1^n}}{\!\!\sim}\ar@{^{(}->>}[rr]^{f}_{\cong}&&\boxed{\dsfrac{S^n}{\Z^2}}\ar@{=}[r]&\P^n\tonde{\R}}
\end{equation}
\end{document}
Thank you so much
Best Answer
Here is a solution with
tikz-cd
, which makes this somewhat easier. In particular, you can usecells=nodes
to get your box and circle.There are a few problems with the way you are changing type size in your code. If you want to enlarge the whole diagram, use the
adjustbox
package and\adjustbox{scale=1.5,center}{\begin{tikzcd}...\end{tikzcd}}
I wasn't sure what you meant by shading the
$S^n/\mathbb{Z}^2$
, so I made it blue. Easy to change that.To change the arrowheads, add
arrow style=tikz, >={Triangle[length=2mm]}
to thetikzcd
options. You can adjust thelength
andwidth
of the arrowheads however you like. You might also consider>={latex}
as a similar option.