# Tools for exploring and analysing document structure?

I'm currently writing a thesis. Just the introduction is 25 pages/8000 words. The whole document will probably be 70 pages or so. With a document this large, and on such a complex topic, it can be quite hard to keep track of what's going on where.

I'm looking for ways to summarise the document structure, that might make it easier to figure out what needs changing. Things like lists of topic sentences and signposts (possibly marked as such in the code); word, paragraph, and image counts per chapter/section/subsection; visualisations of flow; plots of keyword densities and readability; and so forth.

Are there any tools in existence that do anything like this, and preferably work with latex documents?

-
Oh yeah, something that made an automated one of these would be nice, too :D –  naught101 Jul 26 '12 at 4:24
Can't help with a lot of that stuff, but AUCTeX (with RefTeX) makes working with complex documents pretty easy, especially in terms of document structure, cross-referencing, etc. Some of the other stuff sounds like a bunch of pretty basic macros. Plots of keyword density, etc., sound like a fun way to procrastinate (and I don't mean 'totally useless'), but for a seventy-page document, it's not that complex. As for readability, the best test is reading it. Trade thesis chapters/sections with colleagues with similar interests, etc. –  jon Jul 26 '12 at 5:49
@jon: procrastination may be part of the reason, yes, but I wasn't talking about document complexity - the document isn't much more than a large scientific paper. I was talking about topic complexity - this stuff is really hard to think about, and that makes it hard to get on to the page in an easily digestible form. –  naught101 Jul 27 '12 at 1:33
I'm thinking now that I should have posted this on writers.SE... –  naught101 Jul 27 '12 at 1:34
A few suggestions. (1) The TOC helps analyse the structure. (2) Use imports to show the structure at the current sectional unit level. (3) Use a folding editor. (4) Don't start writing until the design of the document is clear. If possible, (5) use top-down writing (related to 4). (6) Index commands show where certain notions are mentioned. (7) You can redefine the sectional unit commands to draw a tree of the structure of your sectional units (not tried yet). –  Marc van Dongen Jul 31 '12 at 7:24
show 2 more comments

I have dealt only with word counting, for which I use `texcount`. I think it is, based on my research, the most comprehensive tool around for analyzing the document and it deals perfectly with `\input` and `\include`, as well as custom macros and environments.