From: David G. <go...@py...> - 2019-10-04 16:34:35
|
The way I would go about something like this is to write a new directive, "insert" or "subdoc", which spawns a new parser, parses the external subdocument file into a separate document tree, and grafts this doctree onto the master document tree. That would allow independent section structure in the subdocument. There are issues to consider here, like how much context is to be copied over between the master document's parser and the subparser (e.g. the section title adornments should not be copied over; but what about reference names, substitution definitions, etc.?). There are lots of notes on this (and many other topics) in the Docutils To Do List: http://docutils.sourceforge.net/docs/dev/todo.html#large-documents Note: many items in there may be stale, as it hasn't been updated/pruned in a while. David Goodger <https://david.goodger.org> |