Inserting links in an ePub with Sigil


Lately I’ve been asked to get back into books that I’ve formatted and change text and links. Authors often update their websites or construct new ones, and if they have links in their eBooks then those must change too. Of course changing out the links in a Word doc (such as one you wish to upload to Smashwords) is a snap. But editing an ePub can bring in all kinds of problems.

1) If you’re going to be taking out a whole section (offset by page breaks) then you’ll end up with a blank section in your html list in your ePub (each chapter and section… anyplace you have a page break… is considered a separate html document). I haven’t figured out a way to delete an entire html document within a book and keep the ‘content.opf’ file (which is the contents of the file in code) from getting wacky… but when I do, then I’ll post the instructions immediately. And remember if you do decide to delve into the content.opf file, and change anything be sure that you address the ‘manifest’, the ‘spine or toc.ncx’ and look over your ‘guide’ to make sure that’s good. There’s got to be a way to re-organize and re-number those html lists within the ‘content.opf’. But for now if you are taking out a whole section, leaving a blank html, you might want to go back to your underlying Word to HTML file. In fact it’s probably better to go back to the document (HTMLBook.doc) that you formatted specifically for ePub and mobi conversion. Just edit that, then save as Webpage filtered… then go from there. It may actually take less time than editing the ePub within Sigil and trying to figure out how to work with the contents file (content.opf).

2) If you are changing every link in a section, but little else, then Sigil may be for you. Get into the appropriate html file in Sigil and begin taking out the links that you don’t want anymore. There is now an ‘unlink’ icon right next to the ‘link’ icon on your task bar (broken chain, unlink… strong chain, link). After you have unlinked whatever you are changing, just copy the correct link (you may have that in a Word file such as in the Smashwords file that you just edited) highlight the text to be linked in Sigil, click on the strong chain icon (link), and paste the new link using not your mouse but the paste feature within Sigil. Do this as many times as necessary for all the links you want changed. You of course can instead of copy/paste, just manually type in each link… but I’m a copy/paste freak. It takes the chance for errors out.

The files that I’m working on now have such extensive deletions and new links that I found it more efficient to go back to the HTMLBook.doc, correct them there, save as Webpage Filtered, edit the Book.html file which you got from this save, run it quickly through Calibre to get yourself an ePub, then open it in Sigil and do your normal tweaking (Guides, removing the instances of embedded fonts which is important for the mobi but not so much for the ePub). Don’t forget to save your epub file and don’t forget to validate it either within Sigil itself or through the IDPF website (http://validator.idpf.org/).

Advertisements

About athirstyblog

If you're a published author and are sitting on a basement full of backlisted books, then you've found the right blog. Although I formerly filled these pages with book reviews, they will now be filled with tips on eBook formatting, talk about the current technology of eBooks, and other stuff that interests me and hopefully interests you. I'm currently an eBook formatter, formerly a bookseller, archaeologist, illustrator and lover of all things historical and scientific. And I'm now a permanent citizen of DownEast Maine with my own beach and 175 year old house and everything! Come along for the Journey!
This entry was posted in Ebooks, Editing, How To Books and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s