Today I read a paper titled “Mini-indexes for literate programs”
The abstract is:
This paper describes how to implement a documentation technique that helps readers to understand large programs or collections of programs, by providing local indexes to all identifiers that are visible on every two-page spread.
A detailed example is given for a program that finds all Hamiltonian circuits in an undirected graph..