AllenDowney / plastex-oreilly

Branch of plastex that generates DocBook 4.5 that meets O'Reilly style guidelines.
7 stars 7 forks source link

legal LaTeX can generate illegal DocBook #21

Open AllenDowney opened 12 years ago

AllenDowney commented 12 years ago

This is a general issue with lots of specifics. Here's one example: in LaTeX you can put a \subparagraph or \paragraph anywhere, but in XML that generates a sect5 or a sect4 tag, and sections have to be properly nested. You can put sect5 inside sect4, but not inside sect3.

One option would be to generate whatever tags are necessary to get proper nesting, but the most likely option is to tighten the requirements on the LaTeX code.

But in that case we need to generate better error messages.

tiarno commented 12 years ago

I agree, it is a problem. In DocBook5, you can have nested 'section' elements which gets around the problem. Some things are going to have to be enforced on the authoring side as you say.