I wrote something similar a while ago https://github.com/agrafix/grabcite — I was surprised how far you could get with just heuristics. The nice thing is that many academic papers are also available with their LaTeX source which avoids a lot of the structure guessing from PDFs.
Shameless plug: I’ve built https://board.new to help with ad-hoc collaborative whiteboarding. One thing I’ve found using more sophisticated tools was that folks spent too much time making it look nice vs discussing the content. Hence this tool that doesn’t distract with that.
That said, mermaid looks pretty nice —- going to try that out for my design documents once settled on an approach.
[0] https://en.wikipedia.org/wiki/Structural_type_system