答案1
您可以使用tikz-cd
子集图。使用phantom
标有 的箭头\subset
。要使子集符号跟随箭头,请使用选项sloped
。请注意,对于指向左上方的箭头,您应该使用\supset
,因为方向会翻转。
\documentclass{article}
\usepackage{amssymb} % to use \varnothing
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
& \{a,b,c\} \\
\{a,b\}\arrow[ur, phantom, "\subset"{sloped}] & \{a,c\}\arrow[u, phantom, "\subset"{sloped}] & \{b,c\}\arrow[ul, phantom, "\supset"{sloped}] \\
\{a\}\arrow[u, phantom, "\subset"{sloped}]\arrow[ur, phantom, "\subset"{sloped}, pos=.4] & \{b\}\arrow[ul, phantom, "\supset"{sloped}, pos=.4]\arrow[ur, phantom, "\subset"{sloped}, pos=.4] & \{c\}\arrow[ul, phantom, "\supset"{sloped}, pos=.4]\arrow[u, phantom, "\subset"{sloped}] \\
& \varnothing\arrow[ul, phantom, "\supset"{sloped}]\arrow[u, phantom, "\subset"{sloped}]\arrow[ur, phantom, "\subset"{sloped}]
\end{tikzcd}
\]
\end{document}
为了避免子集符号重叠,您可以使用pos=.4
或任何您认为合适的位置。
作为该解决方案的替代方法pos=.4
,您可以使用xshift
。这样做的好处是使符号在行中保持相同的高度,但会使它们与两组略微不一致:
这些代码是
\{a\}\arrow[u, phantom, "\subset"{sloped}]\arrow[ur, phantom, "\subset"{sloped}, xshift=5pt] &
\{b\}\arrow[ul, phantom, "\supset"{sloped}, xshift=-5pt]\arrow[ur, phantom, "\subset"{sloped}, xshift=5pt] &
\{c\}\arrow[ul, phantom, "\supset"{sloped},xshift=-5pt]\arrow[u, phantom, "\subset"{sloped}] \\
& \varnothing\arrow[ul, phantom, "\supset"{sloped}]\arrow[u, phantom, "\subset"{sloped}]\arrow[ur, phantom, "\subset"{sloped}]
如果您希望符号像第一幅图那样反转,请将5pt
shifts 替换为-3pt
shifts 并-5pt
用 替换3pt
。