Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-17-2016, 08:08 PM   #1
pluma
Enthusiast
pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.
 
Posts: 48
Karma: 854254
Join Date: Nov 2016
Device: none
Content on separate files??!!

hallo,

For testing purposes and learning I've grabbed two epubs that were reccomended here, "Alice in the Geilstadt" from a user here and "Huckleberry Fin" from guntenberg project.

They both got splitted content, "Alice" is rather confusing because sometimes splits a novel's chapters into two files and "Huckleberry Fins" is splitted by chapters.

What I'd like to do is to separate non-text content separately becouse the HTML code becomes quite long.

And example would be the "Alice" epub having separated the charactres dialogs. For instance like the following structure:

Chapter --> /root/Chatpers/{1,2,3,...}
Character A --> /root/Dialogs/Person_A/foo.html
Character B --> /root/Dialogs/Person_B/bar.html
Character C --> /root/Dialogs/Person_C/baz.html

Ok, that's just for the sake of example, perhaps it wont be the ideal organization for a play but what I am trying to illustrate is content splitting.

So for this I read a link but it's not entirely clear what to do as doesn't give a full example:

link: https://idpf.github.io/a11y-guidelin.../sections.html

Code:
    <section epub:type="chapter" id="c01">
    <h1 id="c01h01">Chapter 1. Loomings.</h1>
    <p>Call me Ishmael. … </p>
    …
    </section>

    <section epub:type="chapter" title="chapter" id="c01">
    <p>It was a dark and stormy night … </p>
    …
    </section>

    <section epub:type="chapter" aria-label="chapter" id="c01">
    <p>It was a dark and stormy night … </p>
    …
    </section>
Then there's a brief explanation about different approaches by using either:

Quote:
There are two approaches you can take to flattening out your content, and neither is optimal — at least in terms of retaining the original structural hierarchy in the markup. The first is to include the part heading with the first chapter:

<body>
<section epub:type="part">
<h1>Part I</h1>
<section epub:type="chapter">
<h2>Chapter I</h2>
</section
</section>
</body>

Each subsequent chapter file would contain a single section with an h2 heading. Although this markup approach appears to suggest that the part only contains a single chapter, consistent heading numbering will allow an assistive technology to correctly orient the reader.

The other approach is to separate the part heading into its own file:

<body>
<section epub:type="part">
<h1>Part I</h1>
</section>
</body>
In my case I am not trying to separate chapters but random HTML sections which I think is got to do with a comment on that link:

Quote:
Self-contained secondary content embedded within a section — such as sidebars, mini-articles, etc. — should be identified using the aside and article elements, as appropriate.
However it doesn't follow with a practical example.

Furthermore I am confused by the linking syntax wich is a bit counter intuitive:

Code:
<section epub:type="chapter" aria-label="chapter" id="c01">
^^^ w00t


Lastly the link only shows the code of the linker but what about the linked content? How does the html on the target file look like there?

I'd appreciate if somebody could provide a working example.

lots of dankes!
pluma is offline   Reply With Quote
Old 12-18-2016, 12:19 AM   #2
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
I'm not clear on what it is you are trying to do. When you talk about splitting out a character's dialogue...how do you perceive that working? If you did this, you'd end up doing it sequentially. It's not as though you can put all of Char. A's dialogue in one file, and then just call it at various places throughout the book.

Maybe I'm not understanding what it is you are trying to do?

Hitch
Hitch is offline   Reply With Quote
Old 12-18-2016, 02:25 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Don't forget, a new file will result in a new page in a reader. That is why the rule of thumb is a new file for each chapter. Large chapters are split because they are usually too big anyway (> 280Kb) which can give issues on older readers.
Toxaris is offline   Reply With Quote
Old 12-18-2016, 06:55 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
@pluma:

If you look at commercial epub3 books, you'll notice that almost all of them use separate html files for each chapter. This might be a leftover from a time when eInk readers didn't have much available RAM, but it'll also ensure a better performance on most modern eInk readers and ePub apps.

There are very few ePub3 capable eInk readers available at this time and the most frequently used epub3 app is most likely iBooks. I.e., if you limit your choice to epub3 books, only a limited number of readers will be able to read your book.

Also note that Sigil doesn't support nested sub-folders and'll automatically flatten them. That leaves only Calibre Editor, which usually doesn't break ePub3 books, but doesn't have any dedicated epub3 features either.

As for the section tag, it's an epub3-only feature. AFAIK, only some epub apps for visually impaired readers actually use it.

Quote:
Originally Posted by pluma View Post
Furthermore I am confused by the linking syntax which is a bit counter intuitive:

Code:
<section epub:type="chapter" aria-label="chapter" id="c01">
The section tag does not have a special "linking syntax," epub:type="chapter" is merely a semantics attribute. Of course, you could link to the section tag from the nav document or a regular HTML TOC.

Quote:
Originally Posted by pluma View Post
I'd appreciate if somebody could provide a working example.
Have a look at the official IDPF epub3 sample books. For example, Shared Culture uses sections.

Last edited by Doitsu; 12-18-2016 at 08:13 AM.
Doitsu is offline   Reply With Quote
Old 12-20-2016, 03:15 PM   #5
pluma
Enthusiast
pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.
 
Posts: 48
Karma: 854254
Join Date: Nov 2016
Device: none
Thanks alle!!

Ok, what I am seeing that the 'section' part is about separating content that's has to be used with the TOC if I am not mistaken.

But this is not what I am trying to do. My question is any random TEXT content can be put on separate file, just like images that are all stored on a separate directory but loaded accordingly.

Let's say I have a text a section with text:

Code:
<p> 1 2 3 4 5 </p>
<p> 123 123 123 </p>
<p> aaa bbb ccc </p>
<p>[the text here is loaded from another file]</p>
<p> a b c d e f</p>
Can this be done? I want to try this because sometimes the html code becomes quite messy, case in point the weird shaped poem in Alice, that alone takes several lines. The idea is to have the poem HTML stored separately.

danke
pluma is offline   Reply With Quote
Old 12-20-2016, 03:46 PM   #6
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,070
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by pluma View Post
My question is any random TEXT content can be put on separate file, just like images that are all stored on a separate directory but loaded accordingly.
No. There are ways to include content from one html file into another using JavaScript, but that isn't supported by most reading software.
jhowell is offline   Reply With Quote
Old 12-21-2016, 11:15 AM   #7
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by pluma View Post
Thanks alle!!

Ok, what I am seeing that the 'section' part is about separating content that's has to be used with the TOC if I am not mistaken.

But this is not what I am trying to do. My question is any random TEXT content can be put on separate file, just like images that are all stored on a separate directory but loaded accordingly.

Let's say I have a text a section with text:

Code:
<p> 1 2 3 4 5 </p>
<p> 123 123 123 </p>
<p> aaa bbb ccc </p>
<p>[the text here is loaded from another file]</p>
<p> a b c d e f</p>
Can this be done? I want to try this because sometimes the html code becomes quite messy, case in point the weird shaped poem in Alice, that alone takes several lines. The idea is to have the poem HTML stored separately.

danke
Not an HTML file but you can make an image and insert it. An SVG could include text with no actual graphics.

Dale
DaleDe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate HTML Chapters/Files Doctor T Kindle Formats 1 10-19-2014 02:47 PM
Is it possible to separate out the Mobi and epub files? Dr. Drib Calibre 2 12-20-2012 11:54 AM
Newbie Question: Separate XHTML files become separate ePub files marck Conversion 3 09-02-2011 12:58 PM
Separate content server? dskaggs Calibre 2 06-16-2010 01:21 PM
Omnibus editions or separate books for Reader content? HarryT Sony Reader 43 07-02-2007 01:44 PM


All times are GMT -4. The time now is 03:39 AM.


MobileRead.com is a privately owned, operated and funded community.