U_\tau
我想将集合和的超集V_\tau
(分别为)添加\pi
到以下 tikz-cd 图中
我成功实现了以下结果
乳胶代码:
\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}
我希望箭头的排版方式与第一张图相同,即从U_\tau
到V_\tau
(分别为\pi
)。我知道我可以手动移动它们,但似乎无法摆脱旋转。
有没有办法告诉 tikz-cd 我希望箭头从 开始居中U_\tau
并以 结束V_\tau
(分别为\pi
)?
答案1
添加“符号”箭头,再加上一个技巧使第一列右对齐。
\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}
答案2
不需要任何技巧,这是一个纯粹的tikz-cd
解决方案:
\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}