Hello everyone,
I would like to render a bundle of outputs generated by Jupyter, all representing the same object. Some outputs are better suited for HTML and some for pdf. So the overall logic that I want to implement is "given this list of different representations of an object, include the one that is best suited to a specific sphinx builder.
Because I want to choose the highest priority node out of a list, the decision cannot be made by examining a single sphinx node. My proposed solution is drafted
here. Implement a MimeBundleNode, which modifies the walk and walkabout methods of a node to "pretend" only contained the highest priority child.
While it seems to work™, not being closely familiar with sphinx, I have an uneasy feeling that I'm doing something that I'm not supposed to do. Is there some subtlety that I overlook? Is there a better implementation?
Thanks in advance,
Anton