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

Support docbook <part>s #8712

Closed
anarazel opened this issue Mar 22, 2023 · 2 comments
Closed

Support docbook <part>s #8712

anarazel opened this issue Mar 22, 2023 · 2 comments

Comments

@anarazel
Copy link
Contributor

Hi,

I tried to use docbook to translate postgres' documentation into other formats. That mostly works, but postgres' docs use <part>. There's two issues with that:

  • links to parts end up named "part_title" (similarly, links to books end up as "book_title")
  • the TOC hierarchy ends up flattened (parts and chapters in the same hierarchy), making the TOC way too long to be useful, because toc-depth doesn't work anymore.

The first is quite easy to fix. Adding a line for part and book to xrefTitleByElem) + tests. I didn't yet open that as a PR, because to test that I need to add a part to test/docbook-xref.docbook - and I am not sure you want to do that without actually supporting part?

The second issue looks harder to fix entirely - I guess chapters, sect$n's all need to shift their heading level by one if they are in a a part?

How incrementally can things like this be integrated? It seems to me, a good first step would be to wire up part, partintro, partinfo, without adjusting the heading levels? And then subsequently adjust those as well?

Regards,

Andres

@jgm
Copy link
Owner

jgm commented Mar 22, 2023

OK, I've added support for part, but this needs testing. Can you test using your existing file?
If it works properly we could add to the automated tests.

@anarazel
Copy link
Contributor Author

That was fast - thanks!

Can you test using your existing file?
If it works properly we could add to the automated tests.

Not as-is, it takes pandoc about a minute to process :). But I can extract the useful bits of structure...

anarazel added a commit to anarazel/pandoc that referenced this issue Mar 22, 2023
This also adds a test xref to book and part. See also 4ea0508 / jgm#8712.
jgm pushed a commit that referenced this issue Mar 22, 2023
This also adds a test xref to book and part. See also 4ea0508 / #8712.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants