答案1
一种可能的解决方案是使用 Ti 手动调整节点位置钾z。
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (l1) at (0,0){\ldots};
\node (l2) at (5,0){\ldots};
\foreach \x/\sub in{1/i,2/j,3/k,4/l}{
\node (V\sub) at (\x,0){$V_{\sub}$};}
\node [white,circle,inner sep=5pt,label={[rotate=180]right:{\color{black}$\perp$}}] (T1) at (2.5,1.5){};
\draw (l1.north)--(T1.180);
\draw (l2.north)--(T1.0);
\draw (Vi.north)--(T1.210);
\draw (Vj.north)--(T1.265);
\draw (Vk.north)--(T1.270);
\draw (Vl.north)--(T1.-30);
\node [white,circle](T2) at (2.5,-1.5){\color{black}$\perp$};
\draw (l1.south)--(T2.180);
\draw (l2.south)--(T2.0);
\draw (Vi.south)--(T2.120);
\draw (Vj.south)--(T2.95);
\draw (Vk.south)--(T2.90);
\draw (Vl.south)--(T2.30);
\end{tikzpicture}
\end{document}
答案2
一种替代方案:
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}
\begin{document}
\begin{tikzpicture}[node distance=3cm and 10mm]
\node[circle](Top){$\top$};
\node[circle,below=of Top](Bot){$\bot$};
\node[anchor=center] (Vj) at ($(Top)!0.5!(Bot) + (-5mm,0mm)$){\strut$V_j$};
\node[left=of Vj.center,anchor=center](Vi){\strut$V_i$};
\node[left=of Vi.center,anchor=center](Ldots){\strut$\cdots$};
\node[right=of Vj.center,anchor=center](Vk){\strut$V_k$};
\node[right=of Vk.center,anchor=center](Vl){\strut$V_l$};
\node[right=of Vl.center,anchor=center](Rdots){\strut$\cdots$};
\foreach \n in {Ldots,Vi,Vj,Vk,Vl,Rdots}{
\draw(Top)--(\n)--(Bot);
}
\end{tikzpicture}
\end{document}
答案3
一个可能更简单的解决方案是使用tikz-cd
,它是对称的,用户不必手动输入大量箭头。您需要做的就是说
\begin{tikzcd}[Hasse matrix]
\dots &V_i & V_j & V_k & V_\ell & \dots
\end{tikzcd}
代码
\documentclass{article}
\usepackage{tikz-cd}
\tikzcdset{Hasse matrix/.style={column sep=tiny,execute at end picture={
\path ([yshift=3em]\tikzcdmatrixname.north) node(t) {$\top$}
([yshift=-3em]\tikzcdmatrixname.south) node(b) {$\bot$};
\foreach \X in {1,...,\the\pgfmatrixcurrentcolumn}
{\draw (\tikzcdmatrixname-1-\X) -- (t) (\tikzcdmatrixname-1-\X) -- (b);}}}}
\begin{document}
\begin{tikzcd}[Hasse matrix]
\dots &V_i & V_j & V_k & V_\ell & \dots
\end{tikzcd}
\end{document}
答案4
一个简单的 tikz-cd 代码:
\documentclass{article}
\usepackage{mathtools, amssymb}
\usepackage{tikz-cd}
\begin{document}
{\boldmath
\tikzcdset{every arrow/.append style={dash}}
\begin{tikzcd}[column sep=tiny]
& & \ar{dll} \dlar \dar \boldsymbol{\top} \drar \ar{drr}\ar{drrr}\\
\dots &V_i & V_j & V_k & V_l & \dots \\
& & \ar{ull} \ular \uar \bot \urar \ar{urr}\ar{urrr}
\end{tikzcd}
}%
\end{document}
编辑:另一段代码,使用psmatrix
环境:\documentclass{article} \usepackage{pst-node, multido} \usepackage{auto-pst-pdf}
\begin{document}
{ \boldmath%
\[ \psset{linewidth=0.5pt, nodesep=3pt, rowsep=0.9cm, colsep =0.5cm,nodesep=3pt}
\begin{psmatrix}
& &[name=T] \top\psspan{2}\\
... &V_i & V_j & V_k & V_l & ... \\%
& & [name=B]\bot \psspan{2}
%%% node connections
\foreach \i in {1,...,6}{\ncline{T}{2,\i}\ncline{B}{2,\i}}
\end{psmatrix}
\]
}%
\end{document}