Open AllenDowney opened 12 years ago
I extended TreeCleaner to handle this case. Seems to be working.
This is still a problem if there are \index{} entries in the exercise that are not attached to a paragraph of text.
But this creates other problems elsewhere, so it may be that we want to require the LaTeX to attach index entries to text.
If you have a one-paragraph exercise like this
It generates DocBook that doesn't have a par around the contents of the exercise, so you get lots of errors.
If you put a newline in the LaTeX document before and after the paragraph, that works around the problem. But it would be preferable to handle correct LaTeX correctly.