2

I am searching for a latex package which allows to draw something like the DAGs in this page.

Does anyone know how to draw them?

Thanks for the support!

6

Generally "do it for me" kind of questions are not welcome in this site. But this is your first day on the site. So here we go.

Here is a sample with tikz.

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric,positioning}
\begin{document}
  \begin{tikzpicture}
    \begin{scope}[xshift=-2cm]
    \node[ellipse,draw] at (0,0) {Blob};
    \end{scope}
    \begin{scope}
      \node[ellipse,draw] (a) at (0,0) {Blob};
      \node[ellipse,draw,above = 2cm of a] (b) {Tree};
      \draw[-latex] (b) to[out=20,in=-20,looseness=4]
                        node [right,font=\tiny,align=left] {subdir\\+filename} (b);
      \node[ellipse,draw,above = 2cm of b,align=center] (c) {commit\\-message};
      \draw[-latex] (c) to[out=20,in=-20,looseness=4]
                        node [right,font=\tiny,align=left] {parents} (c);
      \draw[-latex] (c) -- (b);
      \draw[-latex] (b) -- node[right, align=left]{+ File name \\ + node} (a);
    \end{scope}
  \end{tikzpicture}
\end{document}

enter image description here

  • Thank you very much! I'll use it as pattern for future graphs! – Lorlo Feb 5 '15 at 15:23
  • 1
    @Lorlo Glad it helped. Remeber that you can accept the useful answers to say thanks. For details see: How do you accept an answer – user11232 Feb 5 '15 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.