答案1
一个非常简单的尝试tikz-cd
,但我不知道如何定义单个双向箭头。
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[row sep=50, column sep=50, arrows={rightharpoondown, shift right=.25ex}]
A \arrow[r] \arrow[d, "\beta"'] \arrow[dr, "\alpha"' pos=2/5]
& C \arrow[l, "\beta"'] \arrow[d] \arrow[dl] \\
T \arrow[r, "\beta"'] \arrow[u] \arrow[ur]
& G \arrow[l] \arrow[u, "\beta"'] \arrow[ul, "\alpha"' pos=2/5]
\end{tikzcd}
\end{document}
答案2
纯tikz
:
\documentclass[12pt, tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta, positioning, quotes}
\begin{document}
\begin{tikzpicture}[auto=right,
node distance = 32mm and 32mm,
N/.style = {minimumsize=8mm},
ys/.style = {yshift=#1},
xs/.style = {xshift=#1}
]
\node (a) {A};
\node (c) [right=of a] {C};
\node (t) [below=of a] {T};
\node (g) [below=of c] {G};
\draw[-{Straight Barb[right]}]
([ys= 1.4pt] c.west) edge ["$\beta$"] ([ys= 1.4pt] a.east)
([ys=-1.4pt] a.east) edge ([ys=-1.4pt] c.west)
([ys= 1.4pt] g.west) edge ([ys= 1.4pt] t.east)
([ys=-1.4pt] t.east) edge ["$\beta$"] ([ys=-1.4pt] g.west)
;
\draw[-{Straight Barb[left]}]
([xs=-1.4pt] t.north) edge ["$\beta$" '] ([xs=-1.4pt] a.south)
([xs= 1.4pt] a.south) edge ([xs= 1.4pt] t.north)
([xs= 1.4pt] c.south) edge ["$\beta$" '] ([xs= 1.4pt] g.north)
([xs=-1.4pt] g.north) to ([xs=-1.4pt] c.south)
%
([ys=-2pt] g.north west) edge [pos=0.55,"$\alpha$" '] ([xs=-2pt] a.south east)
([ys= 2pt] a.south east) edge ([xs= 2pt] g.north west)
%
([xs=-2pt] t.north east) edge [pos=0.55,"$\alpha$"] ([ys= 2pt] c.south west)
([xs= 2pt] c.south west) to ([ys=-2pt] t.north east)
;
\end{tikzpicture}
\end{document}