TL; DR Is there a package that auto-generates a graph for the inference structure from a tex source file?
Writing mathematics is hard. A reason is that, while the underlying structure of the arguments is a directed graph, we are forced to write linearly. It's therefore important to separate ideas into subsections, and explain one (and only) one main point clearly.
I reckon it would be helpful for the readers to see how the arguments are knitted together. Is there any package that does this out of the box? For example, let's say I have four lemmas A, B, C, D, among which
- A => B
- A => C
- (B and C) => D
- D => E (the main theorem)
I hope to automatically generate a graph from the source file
\begin{lemma}\label{A}[A]
..
\end{lemma}
\begin{lemma}\label{B}[B]
\ref{A}
\end{lemma}
\begin{lemma}\label{C}[C]
\ref{A}
\end{lemma}
\begin{lemma}\label{D}[D]
\ref{B}, \ref{C}
\end{lemma}
\begin{theorem}\label{E}[E]
\ref{D}
\end{theorem}
a graph as follows (with suitable arrows..)
A ---> B
| |
| |
v v
C ---> D ---> E
Question Is there a package that does this out of the box?

tikz-cd. – Nov 23 '20 at 17:25graphdrawinglibrary of TikZ could do what you want, but it's only available for LuaTeX. – Dec 23 '20 at 20:07