View Full Version : More beginners hand made epub questions


AlexBell
08-23-2009, 07:13 AM
I'm struggling through several tutorials and the sample files, but have some questions for which I've not yet found the answers.

- Is it possible to put comments in container.xml, content.opf, and toc.ncx files as one can with HTML and CSS files?

- Is it necessary to specify font family etc?

Regards, Alex

Jellby
08-23-2009, 07:24 AM
- Is it possible to put comments in container.xml, content.opf, and toc.ncx files as one can with HTML and CSS files?

I would think so, comments are allowed in XML files, with the same syntax as in HTML.

- Is it necessary to specify font family etc?

No, it is not. An it's better if you don't for the main text (you can do that for titles and other display text).

zelda_pinwheel
08-23-2009, 08:32 AM
- Is it possible to put comments in container.xml, content.opf, and toc.ncx files as one can with HTML and CSS files?
as jellby said, yes you can, and (particularly for the .opf) it can be really useful (if you ever need to go back to your files, or if someone else takes a look). feedbooks does this and i've started to do it as well when i'm coding by hand. the comments must be enclosed in code to set them apart like in html. for instance :

<!-- Content Documents -->

the parts in blue are the comment code.

AlexBell
08-24-2009, 07:19 AM
Thanks to you both, that's most helpful.

Regards, Alex

AlexBell
08-27-2009, 05:58 AM
More questions:
- Harrison Ainsworth's guide says ADE 1.0 doesn't support 'text-align: justify;', but parts of 'The Little Nugget' do have justified text on the desktop ADE and on my ECO reader. How can one tell what version of ADE one has? Or is this statement incorrect?

- His guide content.opf has a <guide> </guide> section though he says that it is optional - and other content.opf files I've reviewed don't have this section. What does a guide section do? What's it for?

- My XHTML 1.1 files are in the form content.html, not content.xhtml, but they do validate - eventually. Is it necessary to use the xhtml suffix in ePubs?

Regards, Alex

Jellby
08-27-2009, 07:06 AM
- Harrison Ainsworth's guide says ADE 1.0 doesn't support 'text-align: justify;', but parts of 'The Little Nugget' do have justified text on the desktop ADE and on my ECO reader. How can one tell what version of ADE one has? Or is this statement incorrect?

More recent versions of ADE support "text-align: justify", and so do the ECO, Opus and other readers (not the Sonys, though). What none support is applying justification to default text with no explicit "text-align" property.

- His guide content.opf has a <guide> </guide> section though he says that it is optional - and other content.opf files I've reviewed don't have this section. What does a guide section do? What's it for?

See Section 2.6 of the spec (http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.6). It could be used by systems that don't support the full toc.ncx, or in addition to that. Another use is specifying the cover (i.e., whether the first page is intended to be a cover or just the first page of text).

- My XHTML 1.1 files are in the form content.html, not content.xhtml, but they do validate - eventually. Is it necessary to use the xhtml suffix in ePubs?

No, I don't think the extension matters, all you need is the right media-type in the <manifest> and the right content in the file.

AlexBell
08-28-2009, 02:29 AM
Thanks, Jellby, I really appreciate being able to pick your brains, and have bookmarked the spec and will review it at my leisure.

But of course helpful answers only lead to more questions.

I've finished and validated the html/css of my first hand made ePub book, and am now working through making the content.opf and toc.ncx match the html/css and vice versa.

The next thing will be to assemble the whole package. I've starting looking at the Winzip tutorials and help files, but can't work out how to make the mimetype the first item in the ePub file and make sure it is uncompressed. I've read in some tutorials that this has to be done, but they've not shown how to do it.

Can you help please, or point me to a how to?

Regards, Alex

Jellby
08-28-2009, 06:07 AM
I use command-line zip in linux, so it's probably a bit different, but what I do is:

1. Create the zip file only with "mimetype", and set to no compression.
2. Add the rest of the files with maximum compression.

zelda_pinwheel
08-28-2009, 10:18 AM
I use command-line zip in linux, so it's probably a bit different, but what I do is:

1. Create the zip file only with "mimetype", and set to no compression.
2. Add the rest of the files with maximum compression.

i use winrar, so no command line. i usually create an empty zip file, then add the mimetype only and in the dialogue box specify "no compression". then you can add all the other files after, and specify compression for them.

AlexBell
08-29-2009, 03:03 AM
Thanks again to you both, that's most helpful.

Actually there was something like that in one of the tutorials, but it was so brief that I couldn't make sense of it.

I'll go back to Winzip and see if I can get your suggestions to work.

Regards, Alex