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

Parts in different files #532

Open
kalaspuffar opened this issue Dec 2, 2022 · 0 comments
Open

Parts in different files #532

kalaspuffar opened this issue Dec 2, 2022 · 0 comments

Comments

@kalaspuffar
Copy link
Collaborator

Reported by MTM to Textalk:

When parts are included in epub-files the following error occurs:

[nordic_nav_references_2b] The nesting of headlines in the content does not match the nesting of headlines in the navigation document. The toc item `(<a href="V005259-011-chapter.xhtml#level2_1">)` in the navigation document is not nested at the correct level. The referenced document (V005259-011-chapter.xhtml) occurs in the navigation document at nesting depth 2 (it is contained inside "DEL 1 PLANERING"). The referenced headline (V005259-011-chapter.xhtml#level2_1) occurs in the navigation document at nesting depth 2 (it is contained inside "DEL 1 PLANERING"). The referenced headline (`<h2 id="h2_1">Vem skriver du f?r?</h2>) occurs in the content document V005259-011-chapter.xhtml as a `h2` which implies that it should be referenced at nesting depth 3 in the navigation document.

After some investigation, I noticed that the check between files was not correctly implemented. It seems to require us to restart the heading levels when we switch to a new level. Currently looking for a solution.

Example table of contents:

                <li>
                    <a href="C00000-13-part.xhtml#test-part">
                        <span>Part title</span>
                    </a>
                    <ol>
                        <li>
                            <a href="C00000-14-chapter.xhtml#test-chapter">
                                <span>Chapter title</span>
                            </a>
                        </li>
                    </ol>
                </li>

Today we only accept the two files to have similar construction

    <body epub:type="bodymatter part" id="test-part">
        <h1>Part title</h1>
        <p>Part testing in different files</p>
    </body>

and

    <body epub:type="bodymatter chapter" id="test-chapter">
        <h1>Chapter title</h1>
        <p>Chapter testing in different files</p>
    </body>

Notice that the chapter file should have a heading level of h2

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

No branches or pull requests

1 participant