bell notificationshomepageloginedit profileclubsdmBox

10.05% popularity   0 Reactions

Trying to explain the title: I am creating an EPUB document which is a programming course. In the document I want to refer to texts describing labs: these are not in the main flow of the main document: you can click if you want to read the labs (or not) and then get back to the main document.

In the lab documents there are also links to solutions (you need to click and later come back)

this means I want to have an hypertext tree in my epub with a main text with a normal flow and additions which are not part of the normal flow.
How do I do that?
thanks

(note: EPUB is created using ASCIIDOC but I can write unix scripts massaging the files in the zip)


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (5)

Login to follow story

More posts by @Karen

5 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

The link to the file would look like: file://mydir/myfile.txt. But that doesn't mean the editor (like Calibre) would make a valid link out of that.
Most programs only look for links that begin with "http://", "https://" or "ftp://" and do not linkify anything else.

On a similar note you would create text like "click here for the lab", select that text, and create a link to "file://mydir/myfile.txt".

So, where your epub is stored, you have to have a folder called "mydir" and under that would be "myfile.txt". The directory tree would look like this:

myepub.epub
mydirmyfile.txt


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

10% popularity   0 Reactions

apparently there is no need in readers to create another anchor to go back to the main flow (tested with Ibook and Calibre)
just adding correctly the documents in the opf file does work (plus the link from the master flow to the "non linear" documents)


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

10% popularity   0 Reactions

I am not sure it's what you want/need, but the easiest way to do it is to add an (internal) anchor to the addendum, and at the end of the addendum another anchor to go back to the main flow.

If the addenda are short, you may also consider putting them in footnotes.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

@Karen

10% popularity   0 Reactions

as suggested by "idiotprogrammer" it is possible to add such documents that are not part of the 'normal' reading flow.

for instance while using the a2x epub generator from ASCIIDOC it is possible to add html documents that are listed in a RESOURCE_MANIFEST file. these documents are added in the OEBPS directory (in my case in a 'labs' subdirectory of OEBPS) and are not listed as part of the normal flow.

BUT (there is a but) behaviour depends on the epub reader you use: Mac's Ibook works perfectly (you have special window for this lab document and you can come back to the book) but Calibre passes the document to your browser (which is not the thing I would expect)


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

@Karen

10% popularity   0 Reactions

I don't really understand the question, but it is possible for an epub file to contain html files which do not appear in the main navigation document. They can be accessed indirectly through hyperlinks within the HTML document.

See the answer I gave for a different but related question here: ebooks.stackexchange.com/a/7211/417
By the way, if that is your question, I recommend ignoring the epub2 way to do it and just do it the epub3 way. A lot of reading systems (including the Kindle ones) are ignoring the toc.ncx document if you have a <nav epub:type="toc"> element.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

Back to top