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 navigation document-based sectioning depth in epub3-to-pef #93

Open
josteinaj opened this issue Mar 4, 2016 · 1 comment
Open

Comments

@josteinaj
Copy link
Member

In the nordic epub guidelines (and possibly other EPUBs as well, I'm not sure), we always start with a <h1> in each HTML flie, regardless of the actual sectioning depth in the book. If you have a file representing the cover, a file representing the foreword, one representing the part or volume, and more files representing chapters within the part/volume, then you won't get proper nesting when concatenating the files.

I suggest we add an XSLT step to the epub3-to-pef script which can be enabled or disabled with a script option (default should probably be true). The XSLT would take the navigation document and spine documents as input, and the output would be the spine documents with the <h1>-<h6> elements renamed to their appropriate sectioning depths.

@bertfrees
Copy link
Member

bertfrees commented Mar 21, 2020

We can add an option to px:html-merge to merge HTML documents based on a navigation doc and use that in px:epub3-to-pef.

On the other hand I'm also thinking about skipping the merge altogether and instead apply the CSS and XSLT stylesheets and the braille translation on each document individually, and support a sequence of documents at the input of the CSS formatter (#195). The issue with merging and other pre-processing is that you have to take these things into account in your CSS. This is also partly the reason why we need the "apply-document-specific-stylesheets" option.

I think it would be best to keep the merge as an option, and make it more configurable like you suggest, but disable it by default.

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