3

I want to add to add the supersets of the sets U_\tau and V_\tau (respectively for \pi) to the following tikz-cd diagram

enter image description here

I managed to achieve the following result

enter image description here

Latex code:

\documentclass[openany]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{tikz-cd}

\newcommand{\AAA}{\mathbb{A}} \DeclareMathOperator{\Bl}{Bl}

\begin{document}

\begin{equation} \begin{tikzcd}[/tikz/column 1/.append style={anchor=base east}, /tikz/column 2/.append style={anchor=base west}] S \supset U_\tau \arrow[r, "\varphi_0"] \arrow[d, "\tau", "\sim"'] & U_\pi \subset T \arrow[d, "\pi", "\sim"']\ \Bl_{(0,0)}(\AAA^2) \supset V_\tau \arrow[r, "\epsilon"] & V_\pi \subset \AAA^2 \end{tikzcd} \end{equation}

\end{document}

I would like the arrows to be typeset as in the first diagram, i.e. going from U_\tau to V_\tau (respectively for \pi). I know i can move them manually, but i can't seem to get rid of the rotations.
Is there a way to tell tikz-cd that i want the arrows to start centered on U_\tau and end centered on V_\tau (respectively for \pi)?

sro5h
  • 133
  • 4
  • Get rid of the optional argument to tikzcd, the anchor=base east is changing how the arrows point, the default is to have vertical arrows, then you can manually shift them left or right as needed – Willoughby Feb 18 '23 at 22:32

2 Answers2

4

Add “symbol” arrows, plus a trick to make the first column right aligned.

\documentclass{article}
\usepackage{mathtools,amssymb,calc}
\usepackage{tikz-cd}

% see https://tex.stackexchange.com/a/216042/4427 \tikzset{ symbol/.style={ draw=none, every to/.append style={ edge node={node [sloped, allow upside down, auto=false]{$#1$}}} } }

\newcommand{\AAA}{\mathbb{A}} \DeclareMathOperator{\Bl}{Bl}

\begin{document}

\begin{equation} \begin{tikzcd}[ ] \mathmakebox[\widthof{$\Bl_{(0,0)}(\AAA^2)$}][r]{S} \arrow[r,symbol=\supset] &[-1.5em] U_\tau \arrow[r, "\varphi_0"] \arrow[d, "\tau", "\sim"'] & U_\pi \arrow[r,symbol=\subset] \arrow[d, "\pi", "\sim"'] &[-1.5em] T \ \Bl_{(0,0)}(\AAA^2) \arrow[r,symbol=\supset] & V_\tau \arrow[r, "\epsilon"] & V_\pi \arrow[r,symbol=\subset] & \AAA^2 \end{tikzcd} \end{equation}

\end{document}

enter image description here

egreg
  • 1,121,712
1

No tricks are needed, here is a pure tikz-cd solution:

\documentclass[openany]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{tikz-cd}

\newcommand{\AAA}{\mathbb{A}} \DeclareMathOperator{\Bl}{Bl}

\begin{document}

\begin{equation} \begin{tikzcd}[ /tikz/column 1/.append style={anchor=base east, column sep=0pt, inner xsep =0pt}, /tikz/column 3/.append style={column sep=0pt}, /tikz/column 4/.append style={anchor=base west, column sep=0pt, inner xsep =0pt} ] S \supset & U_\tau \arrow[r, "\varphi_0"] \arrow[d, "\tau", "\sim"'] & U_\pi \arrow[d, "\pi", "\sim"'] & \subset T \ \Bl_{(0,0)}(\AAA^2) \supset & V_\tau \arrow[r, "\epsilon"] & V_\pi & \subset \AAA^2 \end{tikzcd} \end{equation}

\end{document}

enter image description here

CarLaTeX
  • 62,716