Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line option to specify that DocBook should use recursive <section> elements #585

Open
wants to merge 1 commit into
base: master
from

Conversation

@simonbaird
Copy link

@simonbaird simonbaird commented Aug 14, 2012

I'm using Publican and it expects the nested section tags rather than the sect1 ... sect5 tags.

Currently I've got some hacks to work around it, but it would be nice if pandoc could do it.
Would you consider something like this?

This is working for me. My devel environment is Fedora 17.

Does it need a test? Do you think --nested-sections would be a better name for it? (I was considering --docbook-recursive-sections but thought it was a bit long).

If this option is set then DocBook output will use <section>
elements instead of <sect1>, <sect2> ... <sect5> and <simplesect>.
@travisbot
Copy link

@travisbot travisbot commented Aug 14, 2012

This pull request fails (merged 36a292f into bb0b5e9).

@simonbaird
Copy link
Author

@simonbaird simonbaird commented Aug 14, 2012

I see there is some discussion here:
https://groups.google.com/d/msg/pandoc-discuss/kMwuoj48k_M/Hex0kua2C4gJ

The arguments against seem to be:

  1. "it's easy to XSLT transform/sed hack/manual edit between the two formats so why bother"
  2. "let's not have too many command line options"
@simonbaird
Copy link
Author

@simonbaird simonbaird commented Aug 29, 2012

Ping? Any thoughts?

@jgm
Copy link
Owner

@jgm jgm commented Aug 29, 2012

I'll consider it further when I have a chance. But my main
thought is still as before -- I'd prefer not to add lots of
options for things that can be done so simply in postprocessing.

+++ Simon Baird [Aug 28 12 18:25 ]:

Ping? Any thoughts?

--
Reply to this email directly or [1]view it on GitHub.
[J6T91GIPIyhU-8ti4GCGP7AlC2fiocPKodp06RQqyLxofLqrjChXhFQrWy-EvaYS.gif]

References

  1. #585 (comment)
@crmoore
Copy link

@crmoore crmoore commented May 29, 2013

The current behavior generates invalid docbook xml for sections nested 7-levels deep or greater. According to the docbook 4 DTD and docbook 5 schema, 'simplesect's must be leaf sections and can't be nested. The only way to go more than 6 deep is to use 'section' throughout.

jgm referenced this pull request in neilmayhew/pandoc Apr 30, 2014
Docbook can infer the section level from the nesting, and leaving out
the level numbering allows Pandoc output to be inserted as a fragment
into a larger Docbook document that already contains sections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.