I have a .tex document which is divided into \section
, \subsection
, \subsubsection
, etc. I would like to produce a separate second document which is an outline of this first document. What's the best way to do this?
Of course, it would be fairly trivial to write a script to extract the section headings--presumably this exists already?
Or I could just put in a temporary \tableofcontents
and then extract this from the resulting PDF.
(I'm using LyX as a TeX front-end, so if this exists in LyX, that would be helpful too. I know there's an outline viewer in LyX, but I don't see a feature to export this outline.)