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

Generated components should have guide data attached [Zhook] #2

Open
joseph opened this issue Oct 6, 2010 · 1 comment
Open

Generated components should have guide data attached [Zhook] #2

joseph opened this issue Oct 6, 2010 · 1 comment

Comments

@joseph
Copy link
Owner

joseph commented Oct 6, 2010

The intermediate Book object doesn't have much meta info about components, which is useful when going from Zhook -> EPUB.

Zhook will create the Cover and Table of Contents components automatically, but there's no way to communicate to the destination format that these components are non-linear and have a particular "guide" type.

If we can say what the "guide" attribute of a component is, EPUB will be able to derive the linearity of the component (in the spine) from that. Ie, if cover.html is 'cover' in the EPUB guide, then it has a linear value of "no" in the spine.

In general, for both components and metadata, the intermediate book object should perhaps work with Component and Metadata objects, rather than arrays of filenames or hashes of key/values.

@elmimmo
Copy link

elmimmo commented Jan 27, 2011

Just for the sake of adding meaning to my zhook's outline, I am giving articles that define sectioning components a class name equivalent to one of the valid guide types according to OPF 2.0.1.

If peregrin would take that value and use it for the guide section in the OPF document, that would just rock.

Edit: Just to be a bit more specific about the way I am coding the books:

<article class="dedication"><h2>Dedication</h2>…</article>
<article class="epigraph"><h2>Epigraph</h2>…</article>
<article class="text">
    <h2>Text</h2>
    <article><h3>Chapter 1</h3>…</article>
    <article><h3>Chapter 2</h3>…</article>
</article>
<article class="notes"><h2>Notes</h2>…</article>
<article class="acknowledgements"><h2>Acknowledgements</h2>…</article>
<article class="copyright-page"><h2>Copyright</h2>…</article>

There are two not-so-good things about it:

  • Many of those sections do not actually need that title displayed. I am hiding those ones with display:none; visibility:hidden;.
  • Even if hidden, peregrin sees them, and in some cases will create a component that I do not need, such as for "Text" in the example above.

Needless to say that I am not one bit convinced about doing it this way. I am still finding my way.

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

2 participants