1
此源如何使用基於tikz的包gitdags來繪製git merge -no-ff的結果?
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{gitdags}
\begin{document}
\begin{tikzpicture}
\gitDAG{
A -- {B, C} -- D
};
\end{tikzpicture}
\begin{tikzpicture}[
commit/.style={circle, draw=green!30!blue, fill=green!20!white, thick, text=black, font=\ttfamily},
]
\node (a) [commit] {A};
\node (c) [commit, below right = 0.8cm of a] {C};
\node (d) [commit, right = 1.3cm of a] {D};
\draw (d) edge [->] (a)
(d) edge [->] (c)
(c) edge [->] (a);
\end{tikzpicture}
\end{document}
編譯成以下圖片:
如何gitdags
(包用於創建所述第一圖像)被說服繪製所示的拓撲的圖第二個圖像?
作爲A
既是C
和D
,既C
和D
應的支撐一起以下A
母體。由於D
是A
和C
的孩子,所以A
和C
應該在D
之前加在一起。因此C
必須與A
一起支撐,同時在A
之後的單獨大括號中。我不明白這是可能的。
是否有一些gitdag
我缺少的語法?