holyschist: Image of a medieval crocodile from Herodotus, eating a person, with the caption "om nom nom" (Default)
holyschist ([personal profile] holyschist) wrote in [community profile] ebooks2011-02-11 06:33 pm

Editing and creating EPUB files

I recently picked up a used Sony PRS-600 to try out ereaders properly, and so far I like it. However, I have noticed that EPUB files converted from PDF annoy the hell out of me, because they have hard page breaks, which do not coincide with ereader pages on my preferred font size. So I have two questions:

1) What's the easiest way to edit EPUB files created by someone else to add a table of contents, fix formatting issues and typos, etc.?

2) What's the easiest way to create basic EPUB files from scratch, if one felt inclined to do so? (No images, no fancy formatting.)

I could do it entirely by hand, but that seems less than efficient--I'd rather generate the file automatically and clean up by hand if necessary. I'm using a Mac, current operating system, and I do have Adobe InDesign (CS3), but that sounds like it might be overkill. Free is good.

Has anyone tried Sigil or eCub? Have another favorite EPUB editor/creator?

Also--does anyone happen to know how the PRS-600 handles epub ebooks that were originally created from HTML that had non-Roman unicode characters (e.g. Chinese)? I know I am going to run into this on occasion. Do ebooks with non-Roman characters have to be PDFs to display correctly?

Thanks!
inverarity: (Default)

[personal profile] inverarity 2011-02-12 02:00 am (UTC)(link)
I've used Sigil. It's not too hard to get a basic epub file with a TOC, as long as you're not doing anything else fancy, but it is still going to require some manual editing of the markup here and there.
quivo: Watercolor of a daisy (Default)

[personal profile] quivo 2011-02-12 02:03 am (UTC)(link)
I've generally been used to creating ePubs by hand and only opening them in Sigil for epubcheck and so forth, but I can definitely recommend you try out a file in Sigil and see how that works. The UI and workflow is fairly simple to get along with, as far as I remember. Editing ePubs 'by hand' i.e. unzipping the file and editing its contents in a robust text editor is only as efficient as your macros and general familiarity with that text editor can make you, and if you're not comfortable with directly editing XML and XHTML, it would be better to just go with Sigil.

As far as the character question, I really have no idea, sorry. Maybe try searching the Mobileread forums? If anyone knows how to deal with that, they'll probably have posted about it there.
quivo: Watercolor of a daisy (Default)

[personal profile] quivo 2011-02-12 07:08 pm (UTC)(link)
Honestly, heavy use of find-and-replace usually fixes the problems I usually come across when editing fanfic files in HTML-- macros are just an example of the sort of thing that can make such editing a bit faster. Like [personal profile] inverarity said, you do tend to end up needing to edit epub files by hand in certain cases.

In your case, the hard page breaks created in the PDF->ePub conversion will probably be easier to take out by finding the offending tags in the html source and find/replacing them out. Sigil lets you edit the html files directly, IIRC, so you would probably be able to switch between editing out formatting errors and typos in their WYSIWYG mode, and taking out page breaks in the other.
elf: Computer chip with location dot (You Are Here)

[personal profile] elf 2011-02-12 03:51 am (UTC)(link)
Non-Roman characters shouldn't have to be PDFs but may need the fonts embedded in the epubs. I know nothing of how to do this; I just know it's more-or-less possible. PDFs manage by embedded part or all of the font in the PDF.

I haven't gotten to creating epubs by hand, but the easiest way to learn how, if you're code-minded, is to take one apart and look at the pieces:

1) Take an epub (AO3's are simple; Calibre's output less simple)
2) Rename from "epub" to "zip"
3) Unzip. Examine contents at will.
4) Tinker with contents; rezip; change extension; view on reader.

I gather that the build-an-epub part is easy; the reason people have programs is to do the .css and other formatting parts. A basic .epub consists of an html file and a tiny group of very simple metadata files.

Converting from PDF is always going to be problematic. I'm comfortable with Word, so I convert to doc or rtf and edit to remove the useless page breaks & such; other people prefer to convert them to HTML and edit that instead.
elf: Computer chip with location dot (You Are Here)

[personal profile] elf 2011-02-12 04:41 am (UTC)(link)
I barely use Calibre; when I make epubs, I always add a cover, even if it's Calibre's auto-generated one. I didn't know it would auto-convert some other part of the book into the cover.

Embedding fonts: there's apparently two options; putting it inside the zip (which is considered wasteful) and making the .css attach to an external font.

Mobileread thread from a couple of years ago, which means Calibre may have changed so much it's completely invalid now.

Embed fonts in epub instructions, which loses me at Step 2.

Person who claims embedding doesn't work, which I don't think is quite true, with a comment including link to epub with embedded font/s and an invitation to take it apart and see how it ticks. Link is dead, but commenter's site has sample ebooks which presumably could be played with.
valiha: watercolor painting of my cat Lola (Default)

[personal profile] valiha 2011-02-12 04:34 pm (UTC)(link)
I can attest that font embedding wasn't easy to solve. I had major problems trying to embed fonts so I could display Central European characters in my epubs in a textbook I was using to prepare for an exam. I had a 6" Astak reader at the time, which now belongs to my sister.

I posted threads in both the Astak reader forum and the Sigil forum. The Astak thread was about fixing embedding in the textbook, and the Sigil about doing the same in my lecture notes.

The Sigil posts contain links to some of the files used, and a detailed and simple description of what needs to be done to get embedding to work. I was close to pulling all my hair out.

Sigil creator Valloric noted that "the style rule that uses a new font family name has to come after the @font-face rules that declare it."
jumpuphigh: Pigeon with text "jumpuphigh" (Default)

[personal profile] jumpuphigh 2011-02-12 04:53 am (UTC)(link)
Do you know offhand how to get Calibre NOT to automatically turn the first page into a cover?

I think you have to have a cover image (or at least use Calibre's cover format) but I'm not certain. There are a number of ways to play with cover formation - metadata, the convert pop-up window, preferences. Are you looking for no cover or just not a page of text as the cover?
jumpuphigh: Pigeon with text "jumpuphigh" (Default)

[personal profile] jumpuphigh 2011-02-12 04:07 am (UTC)(link)
Here is a simple epub creator. Post title, author, text and add a cover if you want one and it will combine it all and prompt you to save it. http://www.halcyon-shift.net/gift-shop/squeebook/ You can also use it to grab text from LJ or DW if they don't have age warnings on them.
rebecca2525: Abby Sciuto from NCIS with the word "geek" (Default)

[personal profile] rebecca2525 2011-02-12 10:29 am (UTC)(link)
So far, I like using Calibre for creatind epubs:

1.) Create a simple html in one page, use h1 class="chapter" (or h2 or h3) for chapter headings.
2.) Import into Calibre and convert to Epub. Enter the metadata and title image as you whish.

This will create a table of contents automatically.

If you got the html from somewhere else and it doesn't use class="chapter", you can change what calibre will detect as chapter headings in the convert settings; it uses xpath expressions for that.

Another ePUB creation tool

(Anonymous) 2013-05-13 10:06 pm (UTC)(link)
Have anyone tried Atlantis Word Processor?

Seems to be the easiest way to convert MS Word to EPUB.
http://www.atlantiswordprocessor.com/en/help/ebook.htm

And a nice video tutorial (love the background music vs the raucous noise so many use):
http://www.atlantiswordprocessor.com/en/videos/creating_ebooks_introduction

tweak_epub

(Anonymous) 2013-05-13 10:09 pm (UTC)(link)
Another tool from the same site – the "tweak_epub" utility:
http://www.atlantiswordprocessor.com/en/help/tweak_epub.htm
Can be used to make "delicate" changes to EPUBs.

Re: tweak_epub

(Anonymous) 2014-01-07 07:08 am (UTC)(link)
I also have found another good tool that we maybe use, but it's not for the ePub creator but the eBook cover editor.
In a word the tool can be used to add cover to ePub.
I think it as good as Calibre.
http://www.epubor.com/how-to-add-cover-to-epub.html