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

Writer.Docbook improvements: tight and loose lists, section levels #1250

Closed
wants to merge 3 commits into from

Conversation

neilmayhew
Copy link
Contributor

Current Docbook output renders tight and loose lists identically. By default, Docbook lists are loose, but it provides an attribute spacing="compact" to specify a tight list, on the list element itself. This commit adds the attribute when rendering tight lists. A list is considered to be tight if the first block of the first item is Plain.

Docbook can number section levels explicitly, eg <sect1>, or it can use the generic <section> element and let the nesting determine the level. The latter is preferable when Pandoc output needs to be inserted as a fragment into a larger Docbook document that already contains sections, because the fragment can then fit into any level in the section hierarchy.

@neilmayhew neilmayhew changed the title Distinguish tight and loose lists in Docbook output Writer.Docbook improvements: tight and loose lists, section levels Apr 16, 2014
@neilmayhew
Copy link
Contributor Author

I had intended to make this two separate pull requests, but Github has merged them. Oh, well.

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.
@neilmayhew
Copy link
Contributor Author

Just realized there's no need to limit depth any more, so pushed an amended commit. Hope this updates the pull request correctly.

@jgm jgm added this to the 1.12.4 milestone May 1, 2014
@jgm jgm closed this in abd3a03 May 4, 2014
@jgm
Copy link
Owner

jgm commented May 4, 2014

I cherry-picked your commit and made the change to use isTightList.

@jgm
Copy link
Owner

jgm commented May 4, 2014

Please feel free to reopen the conversation about <section> on pandoc-discuss, if you want me to consider the other pull request.

@neilmayhew
Copy link
Contributor Author

On 14-05-04 04:46 AM, John MacFarlane wrote:

I cherry-picked your commit and made the change to use |isTightList|.

Thanks, John. I'm away dealing with a family crisis at the moment, so
haven't been able to respond. I'll be in touch when I get back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants