Press ⌘3, or click the node count in the status bar. The expand icon in the
pane header opens it full width.
A LaTeX project is already a graph. It is just written in four unrelated syntaxes, so nobody sees it as one:
| Written as | Means |
|---|---|
\input{sections/intro} |
this file pulls in that file |
\label{sec:method} |
this file defines an anchor |
\ref{sec:method} |
this file consumes one |
\cite{knuth1984} |
this file cites a bibliography entry |
\includegraphics{figures/plot} |
this file needs that image |
\bibliography{references} |
this file uses that .bib |
OpenLeaf reads all of them and draws a single picture.
Colour is the kind of thing:
| Accent | .tex files |
| Cyan | .bib files |
| Blue | labels |
| Amber | citations |
| Green | images |
Files take whichever accent colour you have chosen in settings, since the file structure is what you are usually looking for. The others are fixed, and spaced far enough apart on the wheel to stay distinguishable at the few pixels a label node gets when the graph is zoomed out.
Size is word count. A chapter with 4,000 words is visibly larger than one with 400, so the balance of a document is apparent without opening anything.
The white ring marks your main document.
A dashed red circle is something referenced that does not exist.
An amber ring is a file that exists but is not reachable from the main document.
Line style is the kind of link. Solid thick lines are structural (\input,
\bibliography), because those determine what actually gets built. Dotted lines
are references and citations.
| Hover | dims everything unrelated, and shows details |
| Click | opens what the node stands for |
| Drag | pins a node where you put it |
| Double-click a node | releases the pin |
| Double-click the background | fits everything in view |
| Scroll | zooms around the cursor |
| Drag the background | pans |
The chips in the toolbar filter by kind. Labels and citations are the most numerous nodes in a real project, so turning them off is the quickest way to see just the file structure.
Animate parks the physics simulation when off. The layout also settles on its own and stops consuming CPU once it stops moving, so leaving the graph open costs nothing.
This is the part worth the screen space. Six classes of problem show up here that LaTeX either reports badly or does not report at all.
\ref with no matching \label. Renders as ?? in the PDF. LaTeX mentions
it once in the log, near the end, in a sentence that is easy to scroll past.
\cite with no bibliography entry. Renders as [?]. Same problem: a
warning, buried.
\includegraphics pointing at nothing. This one does fail the build, but the
error message names the file without saying which of your files asked for it.
Here you can see both, and click through.
Files not reachable from your main document. Usually a chapter you forgot to
\input, or one you split out and never wired up. Silent: LaTeX has no reason to
mention a file it was never asked to read.
Labels never referenced. Often harmless, sometimes a sign you referenced a typo of the label instead of the label.
Bibliography entries never cited. Clutter, and occasionally a hint that you cited the wrong key for a paper you do have.
The sidebar lists all of these as text, most serious first. Clicking an entry opens the file where the problem is and puts the cursor on the line.
The six numbers at the top of the pane:
| files | .tex files found, including unreachable ones |
| words | total across the project, ignoring macros and maths |
| labels | anchors defined |
| citations | distinct bibliography entries that exist |
| broken links | undefined refs plus undefined citations |
| unused files | not reachable from the main document |
The word count is the one people check most. It ignores commands, maths
environments and comments, so it approximates what a reader would count rather
than counting \begin{align}.
Scanning is fast because it reads files rather than compiling: a hundred-file thesis takes a few tens of milliseconds.
It parses LaTeX with regular expressions rather than a full parser, which is the right trade for a tool that has to be fast and tolerant of files that do not compile. Consequences:
\iffalse ... \fi blocks are not\ref{\thekey}) cannot be traced\subimport and standalone’s conventions are not yet followedIf your project uses something it misses, that is worth an issue.