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

Projects
None yet
4 participants
@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).

Add boolean --recursive-sections option. Affects DocBook writer.
If this option is set then DocBook output will use <section>
elements instead of <sect1>, <sect2> ... <sect5> and <simplesect>.
@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Aug 14, 2012

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

travisbot commented Aug 14, 2012

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

@simonbaird

This comment has been minimized.

Show comment
Hide comment
@simonbaird

simonbaird 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 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

This comment has been minimized.

Show comment
Hide comment
@simonbaird

simonbaird Aug 29, 2012

Ping? Any thoughts?

simonbaird commented Aug 29, 2012

Ping? Any thoughts?

@jgm

This comment has been minimized.

Show comment
Hide comment
@jgm

jgm Aug 29, 2012

Owner

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)
Owner

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

This comment has been minimized.

Show comment
Hide comment
@crmoore

crmoore 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.

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

Don't explicitly number section levels in Docbook output
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