For future reference, an unmaintained package exists under the name “minitoc”, which uses the first approach (query heading in-between).
I find @janekfleper’s approach much more elegant though!
For future reference, an unmaintained package exists under the name “minitoc”, which uses the first approach (query heading in-between).
I find @janekfleper’s approach much more elegant though!