CTAN Comprehensive TeX Archive Network

Directory macros/latex/contrib/proofgraph

README.md

proofgraph: Dependency Graphs of Results

About

The proofgraph package automatically produces a graph of the dependencies between the results (theorems, lemmas, propositions…) of a mathematical article. Unlike other approaches, it requires no manual annotation: it infers an edge from one result to another whenever the proof of the former refers to the latter through an ordinary cross-reference (\ref, \cref, \autoref…). A manual \uses command is also available for dependencies that are not expressed through a visible reference.

The package writes a Graphviz .dot file describing the graph, which can be rendered with dot (or, with shell-escape enabled, rendered and embedded into the document automatically). It can:

  • infer dependencies from cross-references inside proofs, with no annotation;
  • capture \ref, cleveref/hyperref variants (\cref, \autoref, \eqref…), manual \uses, and optionally \cite to external work;
  • remove self-loops, suppress specific (e.g. unwanted forward) citations, and exclude chosen nodes;
  • style nodes differently according to the type of result;
  • optionally run Graphviz and include the rendered graph automatically.

The documentation of this package is provided in the proofgraph.pdf file, produced from the documented source proofgraph.dtx.

Prerequisites

In addition to a working installation of , proofgraph relies on a few other packages, which should be provided by all reasonable distributions:

  • amsthm
  • etoolbox
  • xstring
  • kvoptions
  • graphicx (only to embed the rendered graph in the document with \proofgraph; not needed if you only emit and render the .dot file)
  • tikz and hyperref (optional, only to make the embedded graph's nodes clickable hyperlinks to their results; without them the graph is still embedded, just without links)

Rendering the .dot file into an image requires the external Graphviz tool dot. Automatic rendering additionally requires the document to be compiled with shell-escape enabled.

Manual installation

Simply copy the file proofgraph.sty in your working directory, or in any other directory where searches for packages.

License

Copyright © 2026 by Pierre Senellart.

This work may be distributed and/or modified under the conditions of the Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of version 2005/12/01 or later.

Contact

https://github.com/PierreSenellart/proofgraph

Pierre Senellart <pierre@senellart.com>

Bug reports and feature requests should preferably be submitted through the Issues feature of GitHub.

Download the contents of this package in one zip archive (433.9k).

proofgraph – Dependency graphs of the results of a mathematical article

The proofgraph package automatically produces a graph of the dependencies between the results (theorems, lemmas, propositions, and so on) of a mathematical article. It requires no manual annotation: an edge from one result to another is inferred whenever the proof of the former refers to the latter through an ordinary cross-reference (\ref, \cref, \autoref, \eqref, and similar), with a manual \uses command also available for dependencies not expressed through a visible reference. Citations to external work can optionally be captured as well. The package writes a Graphviz .dot file describing the graph; with shell-escape enabled it can additionally run Graphviz and embed the rendered graph into the document. Nodes can be styled according to the type of result, self-loops removed, specific citations suppressed, and chosen nodes excluded.

Packageproofgraph
Home pagehttps://github.com/PierreSenellart/proofgraph
Bug trackerhttps://github.com/PierreSenellart/proofgraph/issues
Repositoryhttps://github.com/PierreSenellart/proofgraph
Version1.0.0 2026-06-02
LicensesThe Project Public License 1.3c
MaintainerPierre Senellart
TopicsProof
Maths theorem
Math Diagrams
Label and References
...
Guest Book Sitemap Contact Contact Author